To calculate the line length of a document (a-option),
lpr assumes tab positions at 9, 17, 25, and so on. Since changes of the line length
through character translations (tr-parameter in css.devices(C))
happen at the time of the printout, they will not be taken into account. The calculation
of the number of pages in a document is dependent of several definitions and options. In
normal operation, the ps capability of the form description in css.forms(C) defines the number of lines per page. This
value may be overwritten by a positive, non zero P-option. An input page break
occurs, whenever a formfeed character is encountered or the number of lines per page has
been reached. A P-option value of zero (0), causes CSS to assume variable
form length, where only formfeed characters trigger an input page break.
In a similar manner, the top of form processing of the lpd despooler daemon is
controlled by multiple definitions and options. Again the ps capability of the form
description or a positive, non zero P-option define the number of lines per page.
Each page is preceded by the bop sequences and terminated by the eop
sequences. An output page break occurs whenever a formfeed character is encountered or the
number of lines per page are reached, i.e. a page overflow occurs. If the pg (page
printer) flag has not been set for the device (css.devices(C)),
the formfeed characters are not transmitted to the printer. Top of form positioning
is accomplished by inserting the necessary number of empty lines. If however the pg
flag is set, no empty lines will be generated and formfeeds are transmitted to the device.
Page overflows do not insert an extra formfeed. The last page is guaranteed to be
terminated with a formfeed. If each page should be terminated with a ff character, the :eop
-f=...\f...: definition may be used. In either case, a P-option value of zero
(0), causes CSS to assume variable form length, and page overflows do not trigger
an output page break.
The use of -P 0 generates a potential problem. The variable $
(i.e. last line as in :eol ($-3)=...:) is determined relative to the
page size of the form definition (ps capability) and may thus be missing or out of
sequence on pages with variable number of lines.
If a printer port cannot be opened, it will be put into the 'hold' state. On some
system this will also happen with parallel ports, if the printer is 'off-line'.
Lpr options may be also defined in the file $HOME/.lprrc as well as in
the shell environment variable LPROPT. The evaluation order is described in the
section 'Syntax of Command Lines' page 1-7.
For compatibility reasons, the shell environment variable CSS is still supported.
It is evaluated before the remote control file $HOME/.lprrc and has thus the
lowest priority. We recommend however the use of the standard variable LPROPT. As
an example, to always use the a-option, and to route output to device 2, you may
enter the following command in your .profile:
LPROPT="-a -r 2"; export LPROPT;
or in the file $HOME/.lprrc:
-a -r 2
The lpr options are scanned in the following order:
1. |
CSS shell environment variable |
2. |
File $HOME/.lprrc |
3. |
LPROPT shell environment variable |
4. |
lpr command line |
5. |
options embedded in the document |
Thus the options in the remote control file have the lowest and the document embedded
controls have the highest priority.
There are different ways to select a output device:
- If the selected form class designates a particular output device (ld-parameter
in css.forms(C)), the given device is selected. There
is no way to overwrite this setting.
- The use of the d-option follows the priority schema outlined above.
- If the r-option is set and no printer has been assigned by the
rules above, the device given in the option is used for printout.
|