[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 4

pioformat Command

Purpose

Drives a printer formatter.

Syntax

/usr/lpd/pio/etc/pioformat -@ DataBaseFile [ -! FormatterName ] [ -# + PassThroughOption ]

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 as appropriate. The formatter driver also provides the piogetvals subroutine, piogetopt subroutine, piocmdout subroutine, piogetstr subroutine, piomsgout subroutine, and pioexit subroutine used by the formatter.

The flags listed below are processed by the formatter driver and are not passed on to the formatter. However, all flags NOT listed below are assumed to be formatting flags and are passed on to the formatter.

Flags

-@ DataBaseFile Specifies either of the following:
  • The full path name of the (digested) database file to be accessed
  • The print queue and queue device names, separated by a colon

If the argument string begins with a / (slash) character, it is assumed to be a full path name.

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 standalone 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 defined by the mf attribute name in the database is used. A default formatter name is provided as a convenience when the formatter driver and formatter are run as standalone devices, instead of by the spooler.

-# + PassThroughOption
                          Specifies that the print file should be passed through unmodified. If the -# + flag is not specified, the print file will be formatted.

The parameter that is passed to the formatter's setup routine contains a value of 1 instead of 0, indicating that the file should be passed through instead of being formatted.

Examples

  1. To format the myfile file according to the database file (virtual printer description) for the queue device named std associated with the print queue named pro , overriding the page width to 132 characters, and using the pioformat command and a formatter as a standalone filter, enter:
    cat myfile | pioformat -@ pro:std -w 132 >/dev/lp0
  2. To use the pioformat command and a formatter in a pipeline running under the spooler, enter:
    %Ide/pioformat -@ %Idd/%Imm -! %Idf/piof420x %Fbb %Fee ...
    For this example, assume that: Before the print job manager (the piobe command) passes the pipeline to a shell to format the file, it resolves the pipeline's embedded references to attribute values. Based on the assumptions listed above for this example, the attribute references would be resolved as:
    %Ide -> /usr/lpd/pio/etc
                              Directory where the pioformat command resides
    %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 formatters
    %Fbb  -> Null string, since submitter did not specify the -b flag
    %Fee -> -i 5 Submitter specified this flag and argument.
    The resulting pipeline shown below would be passed to a shell to format the file (shown on multiple lines for readability):
    /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

/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.

Related Information

The piobe command, pioburst command, piodigest command, piofquote command, pioout command, piopredef command.

The piocmdout subroutine piogetvals subroutine, piogetopt subroutine, piogetstr subroutine, piomsgout subroutine, pioexit subroutine.

Printer Overview for System Management in the AIX Version 4.3 Guide to Printers and Printing.

Virtual Printer Definitions and Attributes in the AIX Version 4.3 Guide to Printers and Printing.

Printer Addition Management Subsystem: Programming Overview in AIX Kernel Extensions and Device Support Programming Concepts.

Printer Code Page Translation Tables in the AIX Version 4.3 Guide to Printers and Printing.

Printer Colon File Conventions in the AIX Version 4.3 Guide to Printers and Printing.

Printer Colon File Escape Sequences in the AIX Version 4.3 Guide to Printers and Printing.

Printer Specific Information in the AIX Version 4.3 Guide to Printers and Printing.

Printer Support in the AIX Version 4.3 Guide to Printers and Printing.

Printer Backend Overview for Programming in the AIX Version 4.3 Guide to Printers and Printing.

Adding a Printer Using the Printer Colon File in the AIX Version 4.3 Guide to Printers and Printing.


[ Previous | Next | Contents | Glossary | Home | Search ]