This man page also describes the filters which PPR can invoke in order to convert the input file to PostScript. A number of filters are supplied with PPR. These include a line printer filter, a Fortran carriage control filter, and a dot matrix printer language filter. Other filters are available if certain common Unix programs such as Troff, TeX, and NetPBM are available. The filters are described in the section for the -T switch.
The switchset macro is useful in cases where ppr is not invoked directly. For example, PPR's LPR/LPD server lprsrv invokes ppr with the -I switch. If you have a printer called ``chipmunk'' and want to make a special queue for it which always makes booklets you can define a group which contains only one member:
$ ppad group add chipbook chipmunk
and then set a switchset for the ``chipbook'' group:
$ ppad group switchset chipbook -s booklet
When this has been done, if remote machines print to the queue ``chipbook'' through lprsrv, the `` -I '' switch, which lprsrv puts in the command line when invoking ppr, will be expanded to `` -s booklet ''.
Remember though, that the switchset macro is only effective if -I occurs somewhere in the ppr command line. For example:
$ ls -l /usr/bin | ppr -d chipbook -I
will print a booklet, but
$ ls -l /usr/bin | ppr -d chipbook
will not.
This switch only has an effect if the user who invokes ppr is a privledged user or the -a switch is used. For this purpose a privleged user is defined as the user ``ppr'', a the user with the id 0 (``root''), or a user who is a member of a group called ``pprprox''.
(If ppr is invoked by a non-privledged user without the -a switch, then the -f switch is silently ignored and the name which will appear in queue listings and banner pages will be either the user name from /etc/passwd or the comment field from /etc/passwd. See the -u switch.)
If the -R for switch or the -a switch is used then the first ``%%For:'' line in the document will override the -f switch.
Prior to version 1.30 of PPR, if the first character of the -f switch argument was ``-'' then the -f switch could be overridden by a ``%%For:'' line within the document. This feature has been removed. Use the -R for or -a switch to achieve a similiar result.
If this option is true (the default) when -a is used, then the real name field from the ppuser database will be used in queue listings. For example, if the command is:
$ ppr -d aardvark -a
and the document header contains the line ``%%For: chappell'' and the real name for the ppuser account ``chappell'' is ``David Chappell'', then the cost of printing the job will be charged to ``chappell'' but ``David Chappell'' will appear in the queue listing and on the banner page. On the other hand, if the command is:
$ ppr -d aardvark -a -u yes
then the cost will be charged to ``chappell'' and ``chappell'' will appear in the queue listing and on the banner page.
If there is a charge and this switch is ommited, then the name of the account to charge to is taken from one of the following sources: the name of the Unix user who invoked ppr, the value from a -f switch, or the value from a ``%%For:'' line if the -R for or -a switch has caused it to be read. Possibilities later in this list will override those earlier in the list.
This switch is provided so that a full user name such as ``David Chappell'' may appear in the queue listing while the cost is charged to a terse user name such as ``chappell''. If a terse user name will be appearing in the queue listing then this switch is unnecessary. Below are two example command lines. In the first the --charge-to switch is used, in the second it is unnecessary because we have using the terse name in the queue listing.
$ ppr -d aardvark -f ``David Chappell'' --charge-to chappell
$ ppr -d aardvark -f chappell
%%For:
''
comments override the ppr
-f
switch. Only in authcode mode can an
ordinary user use the
-f
switch or a ``%%For:
'' line in the document to
specify a user name other than the one in /etc/passwd which cooresponds
to his UID. In authcode mode PPR uses the authcode (password) provided in a
``%TCHCTAuthCode:'' comment line to verify the identity of the user.
The value ``write'' causes the message to be written to the user's terminal if he is logged in, and to be sent by mail is he is not. The default address is usually appropriate. If it is desired to send the message to a user other than the one who invoked ppr, the -r switch may be used to specify a user name.
The value ``mail'' causes the notification to be sent by email. The default address is the name of the user who invoked ppr. The address may be change by means of the -r switch.
The value ``errmail'' causes a response to be sent by email, however the response if discarded if it mearly indicates that the job is done. This responder is simply the mail responder with a default option of ``printed=no''.
The value ``netsend'' causes LAN Manager network messages to be used. The name of the client to receive the message should be specified by means of the -r switch. The sample LAN Manager print processor does this.
The value ``samba'' causes the notification to be sent by means of the messaging facilities of the LAN Manager compatible Unix server Samba. The name of the client to receive the message should be specified with the -r switch. For an example of how this is done, see the ``print command'' described in the ppr2samba(8) man page.
The value ``xwin'' causes the notification to be sent to an X-Windows display. The display must be specified with the -r switch. This will not work if the user ``ppr'' can not open the display. The xpprgrant command, described in the xppr man page, can be used to grant the necessary permission. If xmessage is available, this responder implements timeout=.
The value ``atalk'' causes the notification to be sent to a Macintosh program such as ``Messages'' which comes with CAP60 or ``Broadcast''. (The first supported message receiver discovered on the Macintosh will be used.) In order for this responder to work, you must have CAP and the appropriate Unix programs to dispatch messages to Macintosh's. The CAP60 distribution includes a program called ``macto'' in the contrib/Messages directory which will send messages to a Macintosh system extension called ``Messages'' which is also included with CAP60. The configuration file /etc/ppr/atalk.conf indicates which Unix programs are available to send messages to Macintoshs. It is also necessary to start the Appletalk Map Daemon /usr/ppr/bin/atalkmapd.
The value ``pprpopup'' causes the notification to be sent to the PPR popup program for MS-Windows 95. The PPR popup program is a Tcl/Tk script designed to be on a MS-Windows 95 machine in a public area such as a computer lab. The PPR popup program is primarily part of a mechanism whereby users are required to enter their names each time they print. When a job is received through Samba and the samba_submitter program is used as the ``print command'', the samba_submitter program attempts to open a connexion to the PPR popup program on the client and requests it to ask the user for his name. If the transaction is sucessful, samba_submitter will subsequently run ppr with the -m pprpopup switch. Thus the PPR popup program will also be used to inform the user of what happened to his job.
The value ``audio'' causes a voice announcement to be made. If the address is in the form ``smith.pc.trincoll.edu:15009'' then the announcement will be played through the Tcl/Tk script mentioned in the previous paragraph. If the address begins with ``/dev/'' then it will be played through a sound card on the local machine. As supplied, program /usr/local/bin/play is used to acomplish this. If you wish to substitute another program, you must edit /usr/ppr/lib/play_local.pl. The responder option ``voice='' may be used to specify a set of audio files to build the message from. The default is ``voice=male1''. Currently, no alternate audio files exist so this option has no practical effect.
With the exception of the value ``none'', the -m parameter actually specifies the name of the program in /usr/ppr/responders which should be executed to notify the user. A description of the operation of a responder program may be found in the document "PPR, a PostScript Print Spooler".
Common responder options include the following:
The currently recognized values for string are:
%%BeginFeature: *PagesSize Legal
'' comment
appears in the document, then the media type ``legal'' will be selected
because it is 8.5 by 14 inches but has all the other attributes of ``letter''.
ppad bins
series of commands.
The features available for a certain printer are described in its PostScript Printer Description (PPD) file. In order for PPR to invoke printer features, it must have a copy of the correct PPD file and the PPD file must be selected using the ``ppad ppd'' command.
%%IncludeFeature:
'' comment will
be inserted instead, in the forlorn hope that some mysterious piece of
software between PPR and the printer will be able to insert the code. (If
N-Up printing has been selected, PPR may attempt to synthysize missing
feature code for selecting page sizes. This is on the theory that though
the printer may not be able to accomodate a certain paper size and hence not
have a command for it, it may still be represented by a rectangle on a
physical page.)
A feature which is commonly invoked by this command is duplex:
$ ppr -d adshp4m -F '*Duplex DuplexNoTumble'
Paper input trays are another example:
$ ppr -d adshp4m -F '*InputSlot Upper'
%%BeginFeature:
'' and
``%%EndFeature
'' comments is simply copied if replacement code is not found
in the PPD file. The exception is duplex code. Any duplex code which is
not defined in the PPD file is removed regardless of the setting of the
-K
switch.
%%BeginFeature: *Duplex
'' comments in order to determine whether the
document is printed in simplex or duplex mode.
Here are the hacks available in PPR version 1.30:
%%BeginDocument:
'' and
``%%EndDocument
'' comments. Some programs which generate PostScript,
including many which run under MacOS ommit these. This is a serious offense
since it results in DSC comments which substantially misrepresent the
structure of the job. PPR, acting on this false information may rearange
the parts of the job incorrectly. This hack tries to deal with this
situation by relying on the fact that most EPS files end with the line
``%%EOF
''. If however, the EPS file does not end with such a line, the use of
this hack will probably make matters worse.
%%IncludeResource:
'' comments if identically named and
version numbered resources are already in the cache or the one being
stripped out can be put in the cache. Doing so can save disk space in the
spool area. The default value is true.
This feature could cause problems if you have a driver with an incorrect
resource name. For instance, certain HP printer drivers for Macintoshes
have a procedure set which is labeled as the standard LaserWriter procedure
set but is not. When this mislabeled procedure set is stripped out and
replaced with the standard LaserWriter procedure set at print time, the job
may fail and be arrested. If you encounter this problem, you should put a
``PPRParms: -S false
'' line in the papsrv configuration file. (See
papsrv.conf(5).
%%Title:
'' line in document.
If this switch is ommited and a file name is specified on the ppr command line (rather than reading from stdin), the file name will be the default title. In cases where the filename is meaningless, such as when it is a temporary file created by Samba, it is advisable to use the option -C ``'' to make the default a blank title.
%%Title:
'' lines in the job. This
has the effect of making a default title specified with
-C
a firm title.
%%Routing:
'' line. The final routing instructions string will
appear on the ``%%Routing:
'' line which is sent to the printer and on the
banner page. This string is free-form. It is intended to contain
instructions to help an operator send the print job to the person who
printed it, but it may be used for other purposes as well.
%%EOF
''. The absence of a
%%EOF
comment may indicate that the job is truncated. This can be used
when accepting jobs from Macintosh computers. If the user cancels printing
before the entire job has been transmitted, this option would prevent it
from being printed. QuickDraw GX, however, ommits the %%EOF
comment, so
using this option would cause all jobs prepared by QuickDraw GX to be
discarded.
%%EOF
'' (default).
Whether the type is automatically detected or is specified manually with the -T switch, if the input file is not PostScript, it must be converted to PostScript. This is done by means of filters. The filters programs are stored in /usr/ppr/lib. They have names consisting ``filter_'' followed by the file type name. For example, the filter for files of type ``dvi'' is /usr/ppr/lib/filter_dvi.
If the desired filter does not exist, the job will be rejected. Some filters are supplied with PPR and will always be present. These include the filters for types ``lp'', ``lp_autolf'', ``dotmatrix'', ``fortran'', and ``pr''; others depend on filter programs that are not distributed with PPR. These include the filters for ``tex'', ``dvi'' ``ditroff'', ``cat4'', ``pcl'', ``jpeg'', ``gif'', ``tiff'', ``sunras'', ``cif'', ``plot'', and ``wp''.
When a filter is not supplied with PPR, it may be necessary to create one, possibly in the form of a shell script which invokes programs such as TeX, Dvips, Troff, Groff, or PBMPlus.
When PPR is installed, a script called ``/usr/ppr/install/setup_filters''. is run. This script looks for some potential filter programs and builds filter scripts to run them. If you add programs which can be used as filters after PPR is installed, you should log in as ``ppr'' and run /usr/ppr/install/setup_filters again.
This filter supports many -o options. These are described in the section which describes the -o switch.
The default value for the ``charset='' option is ``ISOLatin1''.
This filter supports the gutter= option which specifies an amount to be added to the margin on the side on which the paper will be bound. The effect of the gutter= option is influenced by the setting of the duplex= option. With duplex=undef , the gutter= option has no effect. With duplex=none the gutter is added to the left hand margin. With duplex=notumble the gutter is added to one of the long edge margins, the left one on odd numbered pages, the right one on even numbered pages. With duplex=tumble the gutter width is added to a short edge margin, the top one on odd numbered pages, the bottom one on even numbered pages.
This filter supports the orientation= option. If no orientation= option is used or orientation=auto is used, then the orientation will be decided upon automatically.
If the orientation is to be decided automatically, then the descision is based upon the parameters landscape_lentrigger and landscape_asptrigger. These parameters are described in detail in the section for the -o switch.
Among the filter supported by this filter are ``noisy'', ``bin'', ``duplex'', and ``charset''. For a description of these options, see the description of the -o switch. The default value of the ``charset'' option is ``CP437''. This filter also supports the following options which are unique to the dotmatrix filter:
The -o ``emulation='' option sets specific emulation modes to more closely emulate specific printers. The recognized values are ``epson'', ``proprinter'', and ``p6''. The value ``epson'' means to interpret the commands as an Epson LX-80 or FX-850 would. The value ``proprinter'' means to emulate an IBM proprinter, but it has not been well tested and may be incomplete. The value p6 means to interpret the commands as an NEC Pinwriter 6 would and implies `` pins=24 '' as well. The default is ``emulation=epson''.
The -o ``pins='' option sets the emulator to mimic a 9 pin or a 24 pin printer. If `` pins=9 '' or `` pins=24 '' is not used, a 9 pin dot matrix printer will be emulated unless 24 pin commands are seen on the first pass through the input file. The motion commands are interpreted differently in 9 and 24 pin mode.
The -o ``perfskip='' option sets the perforation skip in lines. The default is 0.
The -o ``narrowcarriage='' option sets 8 inch line narrow carriage emulation to true or false. When it is true, text printed at the left margin will be printed 0.25 inch from the left hand edge of the sheet.
The -o ``xshift='' option specifies an amount to shift the page image right. The units are 72ths of an inch.
The -o ``yshift='' option specifies an amount to shift the page image down. The units are 72ths of an inch.
It is assumed that the file you print is compatible with your system's version of pr. The file name or the string specified with the -C switch will be used as the title. The -o option ``width='' specifies the value for pr's -w switch and ``length='' specifies a value for pr's -l option. Since, after being processed by pr, the file is passed through the ``lp'' filter, lines will be wrapped at the length specified by the -o width= switch. All of the other ``lp'' filter options will work with this filter as well.
The filter script supplied with PPR assumes that the document uses the man macro package. The filter does not have any options. If you need more elaborate Troff processing, you should create your own, improved version of /usr/ppr/lib/filter_troff.
If the -o ``noisy=yes'' option is used, this filter will allow DVIPS and MetaFont to print their running commentary output to stderr, otherwise, they run silently.
By default, this filter automatically generates a config file for DVIPS. The automatically supplied -o options ``mfmode='', ``freevm='', and ``resolution='' are used to generate the DVIPS configuration file.
The -o ``dvipsconfig='' option can override the automatic generation of a DVIPS configuration file. The value of the option is passed to dvips with dvips's -P switch.
If TeX or LaTeX fails, the log is printed instead of the document. If the -o ``noisy=yes'' option is used, this filter will allow TeX, LaTeX, DVIPS, and MetaFont to write their running commentary output to stderr, otherwise, they run silently. Since this filter passes its output to the DVI filter, all the other options supported by the DVI filter are supported by this filter as well.
Most of the picture format filters are shell scripts which call the PBM utilities and the independent JPEG group's utilities.
Options which should apply to only one filter should have the filter name and a hyphen prepended. For example:
$ ppr -d aardvark -o 'dvipsconfig=hp4 fortran-width=132 pr-width=80'
This will pass the option ``dvipsconfig=hp4'' to all filters, pass ``width=132'' to the fortran filter, and pass ``width=80'' to the pr filter.
Here is a complete list of the -o options. No filter supports all of these options. (The filters which support each option are named in parentheses.)
(Supported by: lp, lp_autolf, pr, tex, texinfo, dvi, dotmatrix, and fortran at the very least)
(Supported by: dotmatrix, all picture format filters)
(Supported by: tex, texinfo, dvi)
(Supported by: tex, texinfo, dvi)
(Supported by: dotmatrix, most if not all of the image format filters)
(Supported by: dvi, tex, texinfo)
(Supported by: fortran, pr, lp, lp_autolf)
(Supported by: fortran, pr)
(Supported by: lp, lp_autolf, pr)
(Supported by: lp, lp_autolf, pr)
(Supported by: lp, lp_autolf, pr)
(Supported by: lp, lp_autolf, pr)
(Supported by: lp, lp_autolf, pr)
(Supported by: lp, lp_autolf, pr)
(Suported by: lp, lp_autolf, pr)
(Supported by: lp, lp_autolf, pr)
The default values for landscape_lentrigger and landscape_asptrigger depend on the paper size, margins, gutter width, and other parameters such as char_height and char_width. For letter size paper with margins of half an inch or so, landscape_lentrigger is about 114 and landscape_asptrigger is about 1.75.
(Supported by: lp, lp_autolf, pr)
ppr -o 'fontnormal=Times-Roman fontbold=Times-Bold
''.
As a general rule only fixed width fonts will yield satisfactory results.
(Supported by: lp, lp_autolf, pr)
(Supported by: lp, lp_autolf, pr)
(Supported by: dotmatrix, lp, lp_autolf, pr)
%%DocumentMedia:
'' comment in an attempt to select paper of the specified size.
The size names are the same as those which appear in *PageSize lines in a
printer's PPD file. Typical values are ``letter'' and ``a4''. This parameter
is not case-sensitive.
(Supported by: lp, lp_autolf, pr)
(SUpported by: lp, lp_autolf, pr)
Duplex modes set with the duplex= option will be overriden by duplex options set with the -F switch.
%%DocumentMedia:
'' comment. By
default this field is left empty. Typical values for this field as
suggested in the ``PostScript Language Reference Manual, Second Edition'',
page 659 are ``19HoleCerlox'', ``3Hole'', ``2Hole'', ``ColorTransparency'',
``CorpLetterHead'', ``CorpLogo'', ``CustLetterHead'', ``DeptLetterHead'', ``Labels'',
``Tabs'', ``Transparency'', and ``UserLetterHead''. The value of the mediatype=
option should be considered case-sensitive.
For example, to run a file through the Unix pr program and then print it on 3 hole paper:
$ ppr -d chipmunk -T pr -o 'mediatype=3Hole' myfile.txt
(Supported by: lp, lp_autolf, pr)
%%DocumentMedia:
'' comment. The value
should be a real number. The units are grams per square metre. The default
is 0 which means no specific weight is requested.
(Supported by: lp, lp_autolf, pr)
%%DocumentMedia:
'' comment. Typical values are ``white'', and ``blue''.
(Supported by: lp, lp_autolf, pr)
(Supported by: dotmatrix)
(Supported by: dotmatrix)
(Supported by: dotmatrix)
(Supported by: dotmatrix)
(Supported by: dotmatrix)
%%ProofMode:
'' line in the document. If the ProofMode is ``NotifyMe'', then
PPR will arrest the job if all of the requirements which it places on the
printer can not be met. See "PostScript Language Reference
Manual Second Edition," pages 664 and 665.
If the -m switch is not used to choose a responder then the responder name will be read from the environment variable PPR_RESPONDER. If PPR_RESPONDER is not defined, then ``write'' will be used.
If the -r switch is not used to specify a responder address then the responder address will be read from the variable PPR_RESPONDER_ADDRESS. If PPR_RESPONDER_ADDRESS is undefined then the name of the user who invoked ppr will be used.
If the --responder-options switch is not used then the responder options will be read from PPR_RESPONDER_OPTIONS. If PPR_RESPONDER_OPTIONS is not defined then the option list will be empty.
Currently, automatic bin selection can only select one media type per document.