Specifications

4-134
Guide to Printers and Printing
This is a test version of /etc/motd, used to demonstrate
what happens when a printer device driver, such as
/dev/lp0, is placed into or taken out of passthru mode.
Printers will print either exactly what they are sent,
if you set the job conditions up correctly, or, on the
most current printers, you may be able to direct the
printer to perform certain mappings for you.
There are no carriage returns in
this file, and the only blank line occurs
immediate before this one.
Notice that the –r parameter dictates the mapping of each linefeed to a linefeed and
carriage return if the value of –p is !. This is necessary as most UNIX–based operating
systems only use linefeeds; unlike DOS or OS/2 or other operating systems, in UNIX–based
operating systems a linefeed implies a carriage return. While this works well with text editors
and in other similar situations, it does not work with printers. Printers print only the data
which they are sent. For example, issuing the two commands
splp –p+ lp0
cat /etc/motd > /dev/lp0
results in output similar to the following appearing on the printer.
This is a test version of /etc/motd, used to demonstrate
what happens when a printer device driver, such as
/dev/lp0, is placed into or taken out of passthru mode.
Printers will print either exactly what they are sent,
if you set the job conditions up correctly, or, on the
most current printers, you may be able to direct the
printer to perform certain mappings for you.
There are no carriage returns in
this file, and the only blank line occurs
immediately before this one.
In the first example, all of the device driver settings are honored. In particular, the mapping
of a linefeed to a linefeed and a carriage return is turned on. When the device drivers are
writing characters to the physical printer, it sends a carriage return after each linefeed. It
also honors the settings for page width.
In the second example, the device driver is limited to simply writing each single–byte
character of /etc/motd to the physical printer, without any mapping or other modification of
the data stream occurring. When the first sentence of /etc/motd ends, the linefeed drops
the printhead straight down one line; there is no carriage return to move the printhead back
to the left margin. The first four letters of the word ”printer, prin, are printed. At that point
the printer itself, not the device driver, determines that the right margin has been reached
and so prints a carriage return, returning the printhead to the left margin. Printing continues
with the next character in the data stream.
In the second example, the job does not even print until the reset button on the printer is
pressed. This is because the printer has not received enough date (characters) to
automatically eject a page, and no formfeeds were sent to the printer to cause it to eject the
page; the –f parameter on the device driver is ignored.
Formatter Filter Pass–Through Mode
After a job is submitted to the spooler it eventually passes to the formatter filter for
processing and delivery to the printer device driver. The formatter filter always opens the
printer device driver in pass–through mode. Jobs submitted to the spooler, as opposed to
data streams that are sent directly to the printer device driver, are always processed or
otherwise modified by a formatter filter and not by the printer device driver.
Like the printer device driver, the formatter filter also has two modes of operation:
pass–through and non–pass–through. Again, the mode of operation selected for a given job
determines how or even if a data stream is processed.