pioformat Command
Purpose
Drives a printer formatter.
Syntax
Description
The pioformat command initiates the printer formatter
driver. The formatter driver establishes access to the database values, loads and links a printer
formatter, and then drives the formatter by calling its setup
function,
initialize
function, lineout
function, passthru
function, and restore
function. The formatter driver also provides the
piogetopt subroutine, piogetstr subroutine,
pioexit subroutine used by the formatter.
The flags that are listed after this are processed by the formatter driver and are not passed on to the formatter. However, all flags NOT listed after this are assumed to be formatting flags and are passed on to the formatter.
Flags
Item | Description |
---|---|
-@ DataBaseFile | Specifies either of the following
If the argument string begins with a The combination of the queue name and the queue device name results in a unique string that is a part of the database file name and is used to search for the database file name in the /var/spool/lpd/pio/@local/ddi directory. This short-form alternative is provided as a convenience when the formatter driver and formatter are run as stand-alone devices, instead of by the spooler. |
-! FormatterName | Specifies the full path name of the formatter to be loaded, linked, and driven. If the -! flag is not specified, the default formatter
name that is defined by the |
-# + PassThroughOption | Specifies that the print file must be passed through unmodified. If the -#
+ flag is not specified, the print file is formatted. The
parameter that is passed to the formatter's |
Examples
- To format the
myfile
file according to the database file (virtual printer description) for the queue device that is namedstd
associated with the print queue namedpro
, overriding the page width to 132 characters, and by using the pioformat command and a formatter as a stand-alone filter, enter:cat myfile | pioformat -@ pro:std -w 132 >/dev/lp0
- To use the pioformat command and a formatter in a pipeline running under the
spooler, enter:
For this example, assume that:
- The printer is a 4207 Model 2 Proprinter.
- The print queue name is
pro.
- There is only one queue device (virtual printer) defined for the print queue and its name is
std
and its output data stream type isasc
(extended ASCII). - The printer device name is
/dev/lp0.
- The print job submitter specified the flag and argument
-i 5
.
The resulting pipeline that is shown after this can be passed to a shell to format the file (shown on multiple lines for readability):Item Description %Ide -> /usr/lpd/pio/etc
Directory where the pioformat command is present %Idd
->
/var/spool/lpd/pio/@local/ddi
Directory for database files %Imm
->
4207-2.asc.lp0.pro:std
Database file name %Idf -> /usr/lpd/pio/fmtrs
Directory for formatter %Fbb
->
Null string, since the submitter did not specify the -b flag %Fee -> -i 5
The submitter specified this flag and argument. /usr/lpd/pio/etc/pioformat # initiate the formatter driver -@/usr/lpd/pio/ddi/4207-2.asc.lp0.pro:std # (digested) database file -!/usr/lpd/pio/fmtrs/piof420x # loadable formatter -i5 # formatting option # (indent 5 characters)
Files
Item | Description |
---|---|
/usr/lpd/pio/etc/pioformat | Contains the formatter driver. |
/usr/lpd/pio/fmtrs/* | Contains the formatters. |
/var/spool/lpd/pio/@local/ddi/* | Contains the digested database files. |