[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Guide to Printers and Printing

Virtual Printer Definitions and Attributes

A virtual printer definition is a file that pairs the attributes or characteristics of a specific printer with the attributes of a specific data stream type. If a specific printer supports more than one data stream type, you must create a virtual printer definition, pairing the attributes of the printer with each data stream type. Thus, if a printer supports both ASCII and PostScript data streams, you must create two virtual printer definitions for the printer.

The colon file stores the virtual printer definition for a printer or plotter. Colon files reside in the predefined and customized database directories. The printer backend uses the attribute values stored in colon files to format print requests.

All attribute values reside in colon files as character strings, regardless of whether they represent strings, integers, or Booleans. An attribute value can contain embedded references to other attribute values or embedded logic that dynamically determines the content of the value.

For more information on colon files and how embedded references and logic are used in attribute strings, see Printer Colon File Conventions and "Printer Colon File Escape Sequences" .

Working with Virtual Printer Attributes

The commands used to create a virtual printer (the mkvirprt or smit virprt commands) copy a predefined virtual printer definition and create a customized virtual printer definition for the specified queue and queue device. The attribute values in the custom definition can be further changed, with the chvirprt or smit lsvirprt commands.

You must create a virtual printer for each data stream type supported by a specific printer device. The supported data stream types include:

Data Stream Type Code for Attribute Name/Value Description
asc a Extended ASCII
pcl c Hewlett-Packard PCL
630 d Diablo 630
gl g Hewlett-Packard GL

p Pass-through (sent to printer unmodified)
ps s PostScript
855 a Texas Instruments 855
kji k Kanji

When you use the mkvirprt or smit virprt command to create a virtual printer, the system prompts you to select the desired printer from a list of defined printers. If you have just configured a printer port for a new printer, select the new printer port. When the virtual printer command is executed, the system creates a print queue and copies the colon file for the selected printer in the predefined database directory, /usr/lib/lpd/pio/predef/*, to the customized database directory /var/spool/lpd/pio/custom/*.

Note: If no flags are specified, the mkvirprt command becomes interactive.

Use the chvirpt or smit lsvirprt command to change or further customize the attribute values stored in a virtual printer definition. To change an attribute value with smit lsvirprt, enter attribute_name=attribute_value with no spaces on either side of the = (equal) sign.

Each attribute name in a virtual printer definition must be unique. Attribute names can contain the characters a through z, A through Z, 0 through 9, and _ (underscore). Attribute names must not begin with a numeral. All attribute names must be two characters long, except for group header attribute names, which can be five characters long.

Attribute names for group headers begin with _ _ (two underscores) and must not be longer than five characters. A group header attribute marks the beginning of a group of related attributes.

The following is a list of groups of virtual printer attributes addressed in this section.

Examples show some of the typical attributes for a supported PostScript laser printer (4029 LaserPrinter). Each example shows how the lsvirprt and smit lsvirprt commands display virtual printer attributes (with a descriptor for each attribute) and how those same attributes are stored in the printer colon file.

Default Flag Value Attributes

Default flag value attributes are grouped under the _ _FLG group header attribute. If a flag corresponding to the attribute is used with a print command, values for these attributes are overridden from the command line. For example, the _l attribute in a virtual printer definition contains a value for the number of lines to print on a page. Assume that the default value stored in the _l attribute is 66. The following print request does not specify a number of lines per page with the -l flag:

qprt -P Pro myfile

The printer subsystem uses the default _l value of 66 to process the print request. The following print request uses the -l flag to specify 50 lines of text per page:

qprt -l 50 -P Pro myfile

The -l flag value overrides the default value in the _l attribute of the virtual printer definition for the Pro printer.

The first character for a default flag value attribute is always the _ (underscore). The second character corresponds to the command flag for which the default value is stored.

The following example shows some of the attribute values under the _ _FLG group header. These values are typical for a supported PostScript laser printer.

Name  Description                                      Value
_ _FLG VALUES THAT MAY BE OVERRIDDEN WITH FLAGS
        ON THE COMMAND LINE
_1    Page Headings Wanted For Text Converted          !
        to PostScript? (!: no;  +: yes)
_2    Use Two Columns for Text Converted to            !
        PostScript? (!: no;  +: yes)
_3    Gaudy Mode Wanted for Text Converted to          !
        PostScript? (!: no;  +: yes)
_4    Print Garbage File Anyway for Text               !
        Converted to PostScript? (!: no;  +: yes)
_5    List Characters Not In Font When Converting      !
        Text to PostScript? (!: no;  +: yes)
_6    Font Name for Header Line of Text Converted      300
        to PostScript
_A    stderr returned? 0:no; 1:yes, & pipelines;   1
        2:yes, & values, pipelines
_H    Name To Replace Host Name On Burst Page
_J    Restore the Printer at the End of the ?          +
        Print Job (!: no;  +: yes)
_L     Wrap Long Lines (!: no;  +: yes)                +

The preceding attributes are stored in the colon file as:

:056:_ _FLG::
:466:_1::!
:467:_2::!
:469:_3::!
:470:_4::!
:471:_5::!
:472:_6::300
:013:_A::1
:022:_H::
:027:_J::+
:030:_L::+

System Administration Attributes

The _ _SYS group header attribute stores values for attributes such as the sh, si, and st attributes. The sh and st attributes store the pipelines for the header page and the trailer page.

The si attribute identifies who receives printer-intervention messages when the printer needs attention. A null string specifies that intervention messages should go to the user who submitted the print job. Separate user names with a comma. Use the SMIT Virtual Printers option or the chvirprt command to change the attribute as needed.

For example, si= specifies that the user who submitted the print job should receive the messages, si=mary specifies the user mary should receive the messages, and si=,jim@server02 specifies that both the user who submitted the print job and jim at node server02 should receive intervention messages.

The first character for a system administration attribute is s.

Some typical _ _SYS attributes for a supported PostScript laser printer are:

_ _SYS OTHER VALUES OF INTEREST TO THE SYSTEM
         ADMINISTRATOR
sh     Pipeline for Header Page                       %Ide/pioburst
                                                      %F[H] %Idb/H.p
                                                      s | %Ide/piofo
                                                      rmat -@%Idd/%I
                                                      mm -!%Idf/piof
                                                      pt%f[j]
si     Users, Separated by Commas, to Get Intervention
         Messages; Null String Is Job Submitter
sp     Command Line Flags Prohibited For All -d values;
         Ignored: cmnrBDMPRT
st     Pipeline for Trailer Page                      %Ide/pioburst
                                                      %F[H] %Idb/T.p
                                                      s | %Ide/piofo
                                                      rmat -@%Idd/%I
                                                      mm -!%Idf/piof
                                                      pt%f[j]
sw     Width of Attribute Value Area On Header Page   78
         (0 means ignore width)

These same attribute values would be stored in the printer colon file as:

:060:_ _SYS::
:321:sh::%Ide/pioburst %F[H] %Idb/H.ps | %Ide/pioformat -@%Idd/%Imm
-!%Idf/piofpt %f[j]
:322:si::
:323:sp::
:324:st::%Ide/pioburst %F[H] %Idb/T.ps | %Ide/pioformat -@%Idd/%Imm
-!%Idf/piofpt %f[j]
:325:sw::78

Input Data Stream Attributes

The _ _IDS group header attribute heads the list of attributes that store pipelines for different input data streams. Some of the attributes in this group are the ia attribute that stores the extended ASCII input data stream pipeline, and the is attribute that stores the PostScript input data stream pipeline. The ip attribute is another typical attribute in this group. The ip, or pass-through, attribute passes the output from a formatter filter to the printer unmodified.

The first character for an input data stream attribute is i. The second character designates the input data stream type.

The following example of _ _IDS attributes shows typical input data stream pipelines for a supported PostScript laser printer (4029 LaserPrinter).

_ _IDS PIPELINES FOR INPUT DATA STREAMS (2 char, 1st="i",
         2nd=data stream name)
ia     Pipeline for Input Data Stream "a" (extended    /usr/bin/enscr
         ASCII)                                        ipt -p- -q%?%G
                                                       _2%t -2%;%?%G_
                                                       z%t -r%;%?%G_3
                                                       %t -G%;%?%G_1%
                                                       t%e -B%;%?%G_L
                                                       %t%e -c%;%?%Ch
                                                       %t%fbh%e%?%L_h
                                                       %t -b'%I_h'%;%
                                                       ; -L%G_l%d -f%
                                                       ?%Cs%t%f!s%e%I
                                                       _s%;%G_p%d %?%
                                                       G_1%t-F%Iw7%G_
                                                       p%d%;%?%G_4%t
                                                       -g%;%?%G_5%t -
                                                       o%;%?%L_f%t%e
                                                       %I@1%; | %Iis
il     Command Line Flags Prohibited For Input Data    /interleaf/ile
         Stream; Ignored: cmnrBDMPRT                   af5/bin/pl2ps
                                                       -ppd IBM17521.
                                                       PPD -r 1270-nf
                                                       -np | %Ide/pio
                                                       format -@%Idd/
                                                       %Imm-!%Idf/pio
                                                       fpt %f[juJZ]
in     Pipeline for Input Data Stream "n" (troff       /usr/bin/psc |
         (ditroff) intermediate output)                s%Ii
ip     Pipeline for Input Data Stream "p"              %Iis
         (pass-through)
is     Pipeline for Input Data Stream "s" (PostScript) %Ide/pioformat
                                                       -@%Idd/%Imm -!
                                                        %Idf/piofpt %U
                                                        H %f[juJZ]

The colon file stores these same attributes in the following format:

:057:_ _IDS::
:274:ia::/usr/bin/enscript -p- -q%?%G_2%t -2%;%?%G_z%t -r%;%?%G_3%t
-G%;%?%G_1%t%e -B%;%?%G_L%t%e -c%;%?%Ch%t%fbh%e%?%L_h%t -b'%I_h'%;%;
-L%G_l%d -f%?%Cs%t%f!s%e%I_s%;%G_p%d %?%G_1%t-F%Iw7%G_p%d%;%?%G_4%t
-g%;%?%G_5%t -o%;%?%L_f%t%e %I@1%; | %Iis
:001:il::/interleaf/ileaf5/bin/pl2ps -ppd IBM17521.PPD -r 1270 -nf -
np | %Ide/pioformat -@%Idd/%Imm -!%Idf/piofpt %f[juJZ]
:465:in::/usr/bin/psc | %Iis
:277:ip::%Iis
:273:is::%Ide/pioformat -@%Idd/%Imm -!%Idf/piofpt %UH %f[juJZ]

Prohibited Flags Attributes

The attributes grouped under the _ _PFL group header attribute store the names of command flags to be rejected by the printer backend for a particular data stream. If you use a prohibited command flag in a front-end print request (such as qprt), the system rejects the flag and returns a message that the flag is prohibited by system administration. The first character of a prohibited flag attribute name is I and the second character represents the data stream type to be rejected.

To prohibit multiple flags for a data stream type, store the single-character flag names with no spaces, commas, or other delimiters. For example, to reject the -e (emphasized print) flag and the -E (double-high print) flag for the extended ASCII input data stream, run the smit lsvirprt command and enter the following to set this attribute:

Ia=eE

The following example shows the Is attribute that sets the prohibited flag attribute for the PostScript data stream on a supported PostScript printer. The descriptor for the Is attribute contains the string Ignored: cmnrBDMPRT. This string indicates that the backend ignores the flags represented by the individual characters cmnrBDMPRT. These flags are flags that address the spooling subsystem, not the backend. Thus, listing one of these flags as a prohibited flag has no effect on the backend; the flag is not prohibited.

_ _PFL FLAGS PROHIBITED FOR INPUT DATA STREAMS (2
         char,1st="I",2nd=data str name)
Is     Command Line Flags Prohibited For Input Data
         Stream; Ignored: cmnrBDMPRT

The colon file stores the attributes in the preceding example as follows:

:059:_ _PFL::
:001:Is::

Filter Flag Attributes

Attributes grouped under the _ _FIL group header attribute store command strings for text filter flags. The first character of the attribute name is always f and the second character denotes the type of filter. Filter flags, such as -p and -n specify to the backend program the type of filter used to format the print job. Filter attribute designations are:

fp pr filter
fn Formats files containing ditroff (device-independent troff) data
fl Prints control characters and suppresses page breaks
ft Formats files containing data produced with troff commands
fd DVI filter formats files created with tex
fg Formats standard plot data files (files created with plot)
fv Formats raster image files
fc Formats files containing data produced with cifplot
ff Interprets the first character of each line as a FORTRAN carriage control character.
fb Determines the locale support for Arabic and Hebrew. Must be /usr/bin/bprt. The width must be set to 80 and the data stream set to a for extended ASCII. Add the flag - tashkeel to print documents with diacritics.

The value stored in a filter attribute designates the command string for the specified filter. Entries for a supported PostScript laser printer can include:

_ _FIL COMMAND STRINGS FOR FILTER FLAGS (2 char,
         1st="f",2nd=flag)

fn     Command String for the "n" Filter.             /usr/bin/psc
                                                      %is
fp     Command String for the "p" Filter              /bin/pr -l%G_l
                                                      %d -w%G_w%d%F[
                                                      h] %I@1%ia
fb     Command String for the "b" Filter.             /usr/bin/bprt
                                                      -w%I_w -d%I_d
                                                      -tashkeel

These same attribute values are stored in the colon file as follows:

:055:_ _FIL::
:269:fn::/usr/bin/psc%is
:270:fp::/bin/pr -l%G_l%d -w%G_w%d%F[h] %I@1%ia

The fd attribute is a typical filter attribute. It is used to specify a DVI filter for the virtual printer. Use SMIT or the chvirprt command to specify this filter. For example, to specify a DVI filter by using SMIT, enter:

smit lsvirprt

Select the desired virtual printer and type the following:

fd=/usr/bin/dvi_to_printer%ip

where dvi_to_printer specifies the full pathname of the filter that converts the DVI output from tex to the format expected by the printer. The %ip designation forces the pass-through pipeline (the ip attribute) to be used to process the print file instead of the ASCII pipeline (ia attribute). The pass-through pipeline causes the output from the filter to be passed to the printer unmodified.

Once the DVI filter has been specified in the fd attribute, you can send a print command such as lpr -d DviFile or qprt -fd DviFile. The -d and -fd flags for the respective commands pass DviFile, an output file produced by tex, through the DVI filter and send the results to the printer.

Directory Attributes

Directory attributes are grouped under the _ _DIR group header attribute. These attributes store path names to various files needed to process print requests, such as translate tables, files containing header and trailer page text, downloadable font files, and temporary files. The first character in a directory attribute name is d, and the second character designates the directory.

The following example shows some of the directory attribute values for a supported PostScript laser printer:

_ _DIR                                   DIRECTORIES
d1  Directory Containing Stage 1         /usr/lib/lpd/pio/trans1
    Translate Tables
    (data stream to intermed.)
d2  Directory Containing Stage 2         /usr/lib/lpd/pio/trans2
    Translate Tables
    (intermediate to printer)
dD  Directory Containing Dummy Device    /usr/lib/lpd/pio/
    Files For Printers Driven By,
    But Not Attached To, the dev
    Host Computer
dF  Directory Containing Flags files    /var/spool/lpd/pio/@local/flags
    (keeps track of loaded fonts)

The same attribute values are stored in the colon file as:

:053:_ _DIR::
:160:d1::/usr/lib/lpd/pio/trans1
:161:d2::/usr/lib/lpd/pio/trans2
:509:dD::/usr/lib/lpd/pio/dev
:414:dF::/var/spool/lpd/pio/@local/flags

Miscellaneous Attributes

The _ _MIS group header attribute groups miscellaneous printer attributes. Miscellaneous attributes begin with the letter m and store values such as the printer description and printer model number. The device name and queue name are also stored in the miscellaneous group. The mn attribute stores the device name and the mq attribute stores the queue name.

Here are some typical miscellaneous attributes for a supported PostScript laser printer:

_ _MIS MISCELLANEOUS
mA    Printer Data Stream Description                   PostScript
mD    Name of message catalog Containing Attribute      pioattr1.cat
        Descriptors
mF    Path Name of Font File To Be Downloaded (must
        include download commands)
mL    Printer Description                               IBM 4029 Laser
                                                        Printer
mN    Printer model number                              029
mY    Datastream Mode to Which Printer is Restored at   3
        End of Job (0: IBM PPDS;  1: HP PCL;  2:
        Plotter;  3: PostScript)
mc    String to Send to Printer "mz" Times When         \0
        Job Is Cancelled
md    Output Data Stream Type (example: ascii);         ps
        Initialized By "piodigest"
mf    Path Name of the Default Formatter (used when     %Idf/piofpt
        running standalone)
mi    Input Data Stream Names (1 character,             s,l
        separated by commas) for mp Attribute
mm    File Name Of (Digested) Data Base; Init. By
        "piodigest" (mt.md.mn.mq:mv)
mn    Device name (example: lp0); Initialized By        lp1
        "piodigest"
mo    Command String to Invoke Device Driver I/F        %Ide/pioout %v
        Program (end of pipeline)                       [ABCDFINOPRS]
mp    Strings (separated by commas) That Identify       %%!,\320OPS
        Print File Data Types (see mi)
mq    Queue Name; Initialized By "piodigest"            ps1

These same attributes are stored in the colon file in the following format:

:058:_ _MIS::
:330:mA::PostScript
:332:mD::pioattr1.cat
:287:mF::
:331:mL::IBM 4029 LaserPrinter
:295:mN::4029
:516:mY::3
:301:mc::\0
:302:md::ps
:303:mf::%Idf/piofpt
:304:mi::s,l
:305:mm::
:306:mn::lp1
:307:mo::%Ide/pioout %v[ABCDFINOPRS]
:308:mp::%%!,\320OPS
:309:mq::ps1

Work Variable Attributes

Work variable attributes (values change while formatting) begin with the letter w and are listed under the _ _WKV group header attribute.

Some typical work variable attributes for a supported PostScript printer are:

_ _WKV WORK VARIABLES
w7     Font Name for Header LIne of Text Converted to   %?%S_s%"Courie
        Postscript                                      r"%=%tCourier-
                                                        Bold%e%S_s%"Ti
                                                        mes-Roman"%=%t
                                                        Times-Bold%e%S
                                                        _s%"Helvetica"
                                                        %=%tHelvetica-
                                                        Bold%e%S_s%"Ti
                                                        mes-Italic"%=%
                                                        tTimes-BoldIta
                                                        lic%e%S_s%"Hel
                                                        vetica-Oblique
                                                        "%=%tHelvetica
                                                        -BoldOblique%e
                                                        %Iw8%;
wl    Smallest legal sheetfeeder drawer number          0
wu    Largest legal sheetfeeder drawer number           3

The colon file stores these same values as:

:062:_ _WKV::
:472:w7::%?%S_s%"Courier"%=%tCourier-Bold%e%S_s%"Times-Roman"%=%tTim
es-Bold%e%S_s%"Helvetica"%=%tHelvetica-Bold%e%S_s%"Times-Italic"%=%t
Times-BoldItalic%e%S_s%"Helvetica-Oblique"%=%tHelvetica-BoldOblique%
e%Iw8%;
:370:wl::0
:381:wu::3

Command Aggregate Attributes

Command aggregate attributes, grouped under the _ _CAG group header attribute, store values such as the command to initialize the printer and the command to restore the printer after a print job is completed. Attributes in this category begin with the letter c. Typical command aggregate attributes for a supported PostScript printer are:

_ _CAG COMMAND AGGREGATES
ci    Command To Initialize the Printer               %Iez\4%?%G_j%{
                                                      1}%=%tstatusdi
                                                      ct begin%Iat %
                                                      Iar %?%Gmw%t%I
                                                      aF%; end%;
cr    Command To Restore the Printer at Job End       %o\4%Iex

These same attributes are stored in the colon file as:

:051:_ _CAG::
:144:ci::%Iez\4%?%G_j%{1}%=%tstatusdict begin %Iat %Iar %?%Gmw%t%IaF
%; end%;
:152:cr::%o\4%Iex

ASCII Control Code Attributes

The _ _CTL group of virtual printer attributes store ASCII control codes used by the printer. These attributes begin with the letter a and store such values as the control code used to advance paper to the next page. The following control codes are typical for a supported PostScript printer:

_ _CTL CONTROL CODES (ASCII)
aF     PostScript Command to Set Simplex/Duplex and   %?%G_Y%ttrue
         Tumble Mode                                  duplex %?%G_Y%
                                                      {1}%=%tfalse t
                                                      umble%etrue tu
                                                      mble%;%efalse
                                                      duplex%;
af     ASCII Control Code to Advance the Paper to     showpage
         Top of Next Page (FF)
ar     Cannot access message catalog pioattr1.cat.    %G_6%d setreso
                                                      lution
at     Cannot access message catalog pioattr1.cat.    %G_u%d setpape
                                                      rtray

The colon file stores these attributes as follows:

:052:_ _CTL::
:512:aF::%?%G_Y%ttrue duplex %?%G_Y%{1}%=%tfalse tumble%etrue tumble
%;%efalse duplex%;
:113:af::showpage
:119:ar::%G_6%d setresolution
:115:at::%G_u%d setpapertray

Escape Sequences Attributes

Escape sequence attributes begin with the letter e and are grouped under the _ _ESC group header attribute. Typical PostScript printer values are:

_ _ESC ESCAPE SEQUENCES
ex     Command to Restore Printer Datastream Mode     \33[K\3\0\4\61
         (used only on restore)                       %?%GmY%{2}%>%t
                                                      %{8}%c%e%GmY%{
                                                      1}%+%c%;
ez     (used only on init/restore) Set initial        \33[K\5\0\4\61
         conditions                                   \10\0\0
         

These same values are stored in the colon file as:

:054:_ _ESC::
:514:ex::\33[K\3\0\4\61%?%GmY%{2}%>%t%{8}%c%e%GmY%{1}%+%c%;
:263:ez::\33[K\5\0\4\61\10\0\0

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]