This document applies to all levels of AIX.
The datastream that the virtual printer expects is determined by an _d or datastream attribute. If this is set:
When ascii data is sent to a PostScript virtual printer with the -da qprt flag or with the a _d attribute set _d=a, then the 'enscript' command is applied to the ascii data to create PostScript. In this case, many of the flags are used to determine equivalent flags for the enscript command. The data is converted to PostScript and sent to the printer in this manner.
The following is a list of most of the attibutes that are used for ASCII data, and what they do:
For use with qprt, the _x attribute would be used as: qprt -x value
Attribute Description _E Double wide printing, Used most on dot matrix printers _I Font ID, Used only for a few laser printers. GFID _K Set condensed mode for proprinters, and so on. Not lasers. _O Archaic, Type of paper handling, manual, sheetfeed, continuous. _Q Paper size sent to printer. _S High speed printing option, Not really used. _U + Unidirectional printing, ! bidirectional (impact only) _V Vertical printing, whatever that means, not used. _W + Continuous double wide printing. (impact printers) _Y + or 1 Duplex, - or 0 simplex, 2 duplex/tumble (laser only) _e + emphasized print, - normal print, (mostly impact) _j + Send initialization sequence, ! Don't send initialization _k Color to print entire document. Not for spot color (not currently used. _l Used in this part to send part of page size to printer for impact printers. See also formatting flags. _p pitch (character size in 1/72 of inch). This is very restricted. Proprinters usually can have _p=10 or 12 only. Most laser printers will also take _p=17, and it is possible to add more values for some laser printers by changing the mU or other attributes accordingly. _q Quality mode. Mostly used for impact printers, For laser printers this is usually 300 or 600 for dpi. _s Style: This is used by laser printers to designate some of the FIXED point fonts, Usually only courier, italic, and lineprinter are allowed. This can be customized again on some virtual printers by changing teh mU or associated attrib. _u Source of paper. This is usually used for laser printers to designate the paper drawer. _v line density in lines per inch. Usually this has a fixed value of 6 or 8, but for some laser printers the lines per inch is determined by the page length if more than 60 lines per page. _w page width sent to some impact printers. _z Orientation - (laser printers only) Portrait, Landscape, and so on.
_f a single character that denotes the filter to be used. The filter program can be found at the attribute starting with f that contains this letter. For example if _f=p, then fp=/usr/bin/pr, and this filter will be run on the data before it is sent to the virtual printer formatter. The filter reads from standard in and writes to standard out and can modify the program in any way. One example is 'pr' which can add page numbers and provide 2up printing. Another is 'fpr' also called 'asa' which interprets column one (FORTRAN) carriage control characters. A third example is a filter to add carriage returns to line feeds.The standard filters supplied with AIX ASCII text virtual printers and their associated virtual printer attributes are shown here:
Attribute | Program | Description |
---|---|---|
fc | No Default | cifplot filter |
fd | No Default | Tex (DVI) Filter |
ff | /usr/ucb/fpr | FORTRAN filter: Handles column one control characters. |
fg | No Default | Plot filter |
fl | %ip | Passthrough filter |
fn | /usr/bin/hplj | ditroff filter (like troff formatting) |
fp | /usr/bin/pr | pr filter does formatting similar to virtual printer. Can create 2-UP text from text. |
ft | No Default | troff filter |
fv | No Default | Raster image file |
f1, f2, f3, f4, f5 | No Default | User-specified filters |
Type: smitty spooler
Select: Programming Tools
Select: Change/Show Pre-processing Filters
Select the queue to be processed.
Change the filter or add one on this page.
Change / Show Pre-processing Filters Type or select values in entry fields. Press Enter AFTER making all desired changes. [Entry Fields] Print queue name pcl Printer name lp0 User defined filter 1 [/usr/local/bin/myfilt> User defined filter 2 [/usr/local/bin/overfilt> User defined filter 3 [] User defined filter 4 [] User defined filter 5 [] cifplot filter [] TeX (DVI) filter [] FORTRAN filter [{ [[ -x /usr/ucb/fpr ]]> plot filter [] pass-through filter [%ip] ditroff filter <fi; /usr/bin/hplj; }%ip] 'pr' filter [/usr/bin/pr -l%IwL -w%I> troff filter [] Raster image filter [] |
The formatter primarily does the following things:
Formatting flags:
_L + Wrap long lines, ! truncate lines longer than _w _Q Paper size, used to calculate with and length. _X Codepage of input data. _Z + make sure Formfeed sent at end of job _b Number of lines to skip at bottom margin _d Datastream, determined which set of programs is run d=s PostScript Data. Minimal formatting is done. This is basically a 'transparent or passthrough' formatter. d=p Pass the data through unaltered to the device driver. This will not add a carriage return to line feeds. d=c PCL formatted data handler. d=n troff data filter (for example with HP uses 'hplj' filter). d=g Hewlett-Packard GL d=k Kanji d=d Diablo 630 datastream _g Page number to restart on printing. Useful only for ASCII. _i Number of spaces to indent on left column of page. _l Lines per page before formfeed is added. _p Used in calculating page width. _t Top margin in lines. This count will also be used in when adding linefeeds after _l lines. _v Used in calculating page length. _w Page width is used to add line feeds after this count is exceeded. This can cause problems if you have a graphics file that is sent through the formatter. _x Convert line feeds to carriage return and line feed, and so on. _z Orientation - used to calculate page width and length.
The stage one translator translates characters in the file from the initial code page (also called symbol set) to to an intermediate. The initial code page is determined by the _X variable and determines what the ASCII characters between 128 and 257 represent. The stage two translator converts the intermediate table to the output symbol set for the printer. This is determined by searching through a set of symbol translation tables until the particular character is found. Then the command is sent to the printer to change to that code page. This command is only sent once until the character is no longer found in that code page and then it sends the command for the new symbol set.
_X Input codepage assumed for data. At AIX 3.2.5 in the U.S. this is IBM-850. At AIX 4.1 this is ISO8859-1. These can give different results with different files. There are no flags for the output symbol sets, but the search list is usually given by the t0, t1, t2, .. attributes.
Based on the value of the _J attribute, the command to reset the printer, which is the 'cr' attribute, can be sent. This usually doesn't matter too much. In general this will send the same commands as the initialization command except that it will always use the virtual printer attribute and not the command line print flags.
_J + Send the reset commands, ! Don't reset after printing.
There are no flag attributes for the header and trailer pages. These are contained in the /etc/qconfig file, or by command line flags such as -Ban for qprt and enq. The lpr command sends a flag to send headers by default. If an application uses this command and you cannot specify options, headers can be turned off by sh, set sh=[enter], so that it is set to nothing.
[ Doc Ref: 91911179513906 Publish Date: Mar. 28, 2000 4FAX Ref: 6446 ]