AIX Printer Tips: Expanding Options for Page Orientation


Contents

About This Document
Overview
Determining the Necessary Information
Changing the Virtual Printer
Create a Queue and Test

About This Document

The AIX virtual printer allows two page-orientation options for most laser printers (portrait and landscape). Some printers support additional orientations such as portrait tumble and landscape tumble, also called reverse portrait and reverse landscape. This document describes how to expand the virtual printer options to allow the selection of more page-orientation options.

The instructions in this document are specific to AIX 4.1, but can be applied to AIX 3.2.5 systems without the limits fields.

NOTE: The printer you are printing to must support the additional options.


Overview

Landscape options for AIX virtual printers are described in the "Portrait and Landscape" section of the technical document AIX Printer Tips: Virtual Printer Overview.

At AIX 4.1, the allowed virtual printer options are determined by a limits field. This field determines two things:

  1. What options will show up on the smit chpq screens
  2. What values will be allowed for flag options when printing or changing virtual printers

Based on the predef templates, it becomes readily apparent that the PCL printers get their _z attribute from the generic.pcl file. The _z attribute in generic.pcl is:

:618:_z:S[E005]I[1810520]EnR[pioattr1.cat,1,620;portrait,landscape=!,+]:!

This means that the only options that you will see are landscape and portrait.

The man pages on qprt indicate that there are 4 values for orientation:

  1. Portrait
  2. Landscape right
  3. Portrait upside-down
  4. Landscape left

Yet most of the printer definitions only had '+' and '!' for values. The qprt command would give errors on invalid values for the -z flag using anything other than + or !.

The objective of this document is to describe how to make changes to a virtual printer predef file to support these options. The examples are for a PCL printer.


Determining the Necessary Information

  1. What are the printer codes allowed by the printer?

    For example, for the HP LaserJet Family the PCL values are:

    
       Function  Parameter    Command     Decimal Value        Hexadecimal
                                                                  Value
      Orientation
       Orientat Portrait     Ec&0O     027 038 108 048 079   1B 26 6C 30 4F
       ion                   (o)       (111)                 (6F)
                Landscape    Ec&1O     027 038 108 049 079   1B 26 6C 31 4F
                             (o)       (111)                 (6F)
                Reverse      Ec&2O     027 038 108 050 079   1B 26 6C 32 4F
                Portrait     (o)       (111)                 (6F)
                Reverse      Ec&3O     027 038 108 051 079   1B 26 6C 33 4F
                Landscape    (o)       (111)                 (6F)
    
    
  2. What are the catalog messages available to use?

    The messages that are used by the virtual printer program can be displayed with the dspcat command. An appropriate message to use would be one with landscape or portrait, so try the following:

    
    # dspcat pioattr1.cat | grep landscape
     1 : 107 Rotate Page Printer Output (!:no - portrait  +:yes - landscape)
     1 : 620 portrait,landscape
     1 : 725 portrait,landscape right,portrait upside-down,landscape left
     1 : 751 portrait,landscape left,portrait upside-down,landscape right
     1 : 950 Rotate Page Printer Output (0: portrait  1: landscape)
    
    

    Pick out the one that makes sense, and use that as the number replacing the 620 above. Let's say we wanted to use the 725 value above.

  3. What are the virtual printer attributes that use the _z attribute to determine what is sent to the printer?


Changing the Virtual Printer


Create a Queue and Test

  1. Use: smitty mkpq and choose your printer type (for example, HP LaserJet 4).

  2. Enter a PCL queue name.

  3. Change the queue with smitty chpq

  4. Choose Option 2: Change / Show Default Print Job Attributes

  5. Look for: Page ORIENTATION

  6. Popup Menu Now Shows
    portrait
    landscape right
    portrait upside-down
    landscape left
    
  7. Select the desired option, then print to queue.
    qprt -z allowed values should now equal 0,1,2,3.

Expanding Options for Page Orientation: AIX Printer Tips:orient.html ITEM: FAX
Dated: 99/03/03~00:00 Category: zap
This HTML file was generated 99/06/24~12:42:10
Comments or suggestions? Contact us