The --version switch prints the PPR version number.
The --help switch prints abreviated instructions for use and direction for obtaining additional help.
The -d option can be used to turn on messages which describe what ppad is doing. The default level is 0. Using -d 1 will cause ppad to tell what printer and group configuration files it is examining and editing. Higher levels display more information. A level 2 and above ppad will display information about what it learns from PPD files and /etc/ppr/mfmodes.conf. At level 3 and above it will display every mode line in /etc/ppr/mfmodes.conf and every line read from or written to the printer or group configuration file. Level 6 and above shows most of the lines in every PPD file that is read.
Most operations performed by this command require PPR administrator privileges. Only those operations which make no changes to the spooler configuration may be performed by non-privileged users. This command defines a privileged user as the user ``ppr'', a user with a UID of 0 (root), or a user who is a member of the group ``ppad''.
Ppad has a number of subcommands. Each subcommand has zero or more parameters. The subcommands are described below.
If the ppop command is invoked without sub-command arguments it will enter interactive mode. In interactive mode it reads commands from stdin and executes them.
If the -M switch is used, ppad will adopt a terser style of output, more suitable to parsing by other programs.
If you fail to supply enough parameters to any media subcommand, you will be prompted for the missing parameters. These are the media subcommands:
Interfaces supplied with the current distribution include atalk , client , simple , serial , tcpip , lpr , dummy , gssimple , gstcpip , and gsatalk .
This interface has some options which may be set with the ppad options command. (None of these options are implemented yet in the CAP version of the interface.)
Two of the options, ``lookup_retries='' and ``lookup_interval='' control how many times the interface will atempt to look up the printer's AppleTalk name and how many seconds it will pause between attempts. The default values are 8 and 1 respectively.
The option ``open_retries='' controls how many times the interface will attempt to open a connexion to the printer when the printer is busy. These attempts are made a two second intervals. The default is 10. If open_retries is set to -1, then the interface will keep trying until it is connected. Setting open_retries for infinite retries will prevent the spooler from correctly reporting that the printer is "otherwise engaged or off-line".
The option ``status_update_interval='' is 0 by default. If it is set to a possitive value in seconds then the interface will attempt the retrieve the most current printer status approximately that often. (The timing is actually rather erratic.)
The option ``address_cache='' controls whether the interface caches the AppleTalk address of the printer. This feature is on by default. The address is cached at the end of each sucessful printing run. At the start of a new run, if the address was cached less than 20 seconds ago it is used without doing another name lookup. If the cached address is older than that then a message is sent to the address to confirm that it is still good and it is used if the response is positive. The address cache is considered invalid if the interface or the address has changed.
The options are ``speed=xxxxx'', ``xonxoff=[yes,no]'', "bits=[7,8], ``parity=[even,odd,none]'', ``wait=[yes,no]'', and online=[dsr,cts,cd,none]. The ``speed='' option sets the baud rate. The ``xonxoff'' option enables or disables XON/XOFF flow control. You should only disable XON/XOFF flow control if your serial port driver supports some other sort of flow control such as DSR or CTS flow control. The ``bits'' option sets the number of data bits. Given a choice, you should choose eight bits. The ``parity='' option sets the parity checking mode. Many serial interfaces do not support parity checking with eight data bits so you will have to choose ``none'' in those cases. The ``wait='' option controls whether the interface will wait to receive a control-D from the printer after it sends one. The ``online='' option can be used to name a modem control line. If this option is used, immediately after opening the serial port the interface will check that the indicated modem control line is is a state indicating readiness. If it is not, the interface will exit and PPR will place the printer in the state ``otherwise engaged or off-line'' for 60 seconds before trying again. For this feature to work, your printer must make one of its modem control lines go false when it is taken off-line and your null modem cable must feed this signal to one of the receiving modem control lines on your print server and you must indicate the correct receiving line as the option to the ``online'' option. Setting this up correctly will generally require the use of an RS-232 breakout box. The default options are expressed by the string ``speed=9600 xonxoff=yes bits=8 parity=none wait=yes online=none''.
By default, this interface uses the jobbreak method control-d, however, the method pjl is also suitable if the printer understands the HP PJL. See the ppad jobbreak section of this document.
This interface has not been extensively tested.
This interface currently supports all jobbreak methods except signal and signal/pjl. (See the ppad jobbreak section of this man page.)
By default the ``feedback='' parameter is set to ``True'' for this interface. This is appropriate for HP printers with JetDirect cards. If however the interface is a separate device connected to the parallel port of the printer, it will probably be unable to return printer messages and control-D's. In this case, it is essential that you use the ppad feedback command to set this parameter to ``False''.
Whether PostScript errors will be detected when using the tcpip interface depends on whether or not the print server supports two way communication.
The interface tcpip has many options.
The option ``sleep='' is the number of seconds the interface should wait after closing the connection and before exiting. Some TCP/IP printers may need a few seconds to recover before printing the next job. Without the ``sleep'' option, if another job is printed immediately, it may incur a fault with a retry 10 seconds later. This is not disastrous, however, the ``sleep='' option is intended to prevent this. The default is ``sleep=0''.
The option ``eof_timeout='' specifies the maximum number of seconds the interface should wait for acknowledgment of the last control-D that was sent to the printer. The default is ``eof_timeout=0'' which means to wait indefinitely.
The option ``connect_timeout='' controls how long the tcpip interface will wait for the printer to respond to a connexion request. The default is 20 seconds.
The option ``sndbuf_size='' can be used to set the value of the socket option SO_SNDBUF. If this option is ommited, the system default is accepted.
The option ``write_size='' controls the size in bytes of the block size for the write() system call. The default is 4096.
There have been some reports that with ``feedback=true'', this interface will sometimes fail to detect that the job is done.
If the remote system is a full Unix system and not job a mini print server box, jobs could disappear from PPR's queue long before they are printed.
This interface supports all jobbreak methods except signal and signal/pjl. The suitability of any given jobbreak method depends much on the remote system. The default is control-d which is suitable for simple devices such as Ethernet devices which attached directly to the printer. When sending to a real spooler it is sometimes necessary to choose a jobbreak method of newinterface because the remote spooler objects to the control-d's in the data stream. In such a case, the remote spooler will itself insert whatever control codes are necessary.
PostScript errors will not be detected when using this interface.
This interface has an option called ``banner=''. This tells the remote printer whether or not to attach its own banner page to the job. The default is ``banner=no''. Remote systems have been known to refuse to print the job unless ``banner=yes'' is used.
Another option is ``lpr_typecode=''. This is the file type code which should be used when submitting the file. The preferable code is ``o'' which means that the file is PostScript, however many lpd implementations do not understand this code so ``f'' is the default.
This interface has an option ``sleep=''. This tells the interface how many seconds to wait after printing the jobs before exiting. This can be used to simulate the time requirements of printing on an actual printer.
The option parameter (described below under ppad options ) is used to set certain Ghostscript options. The gssimple interface has the following option values which can be set:
The option ``gs='' sets the path of the Ghostscript executable, the default is /usr/bin/gs.
The option ``device='' sets the Ghostscript device name. Common values are ``device=ljet3'' and ``device=djet500''.
The option ``resolution='' is passed as the argument to Ghostscript's -r switch.
Every instance of the option ``gsopt='' specifies an argument to be appended to the Ghostscript command line. For example, ``gsopt=-sDepletion=1''.
This interface takes all the options accepted by the gssimple interface as well as all those accepted by the tcpip interface.
If you use the ppad interface command to change a printer's interface program, then ppad will delete any options set with ppad options ; it will also set the jobbreak and feedback parameters to the default for the new interface selected. If you use the ppad interface command to change the printer address, but not the interface program, then the aforementioned parameters are not modified.
This interface takes all the options accepted by the gssimple interface as well as all those accepted by the atalk interface.
Here is a sample ``ppad options'' command. This one sets the options for a printer with a serial interface:
$ ppad options myprn 'speed=19200 bits=7 parity=even'
The possible settings are as follows:
``none'', do not indicate job breaks (which makes flag pages and, in certain instances, multiple copies, unreliable).
``signal'', the default for the interface atalk , uses a call and response protocol involving SIGUSR1.
``signal/pjl'', the SIGUSR1 protocol with the addition of certain HP PJL commands which do such things as set the printer display panel message to the name of the user.
``control-d'', send a control-D character at the start and end of the job and to indicate a job break.
``pjl'', send control-d's and HP PJL commands to indicate job breaks and to set the display message.
``save/restore'', enclose each section of the job in save/restore. This is not likely to be very effective.
``newinterface'', launches a new copy of the interface program for each segment of the job. This is the default for the gs and gstcpip interfaces.
Using the ``ppad ppd'' command has the side effect of undoing any previous ``ppad ppdopts'' command. Therefor, you should run "ppad ppdopts`` after using ''ppad ppd" to set the PPD file.
If the alert frequency is negative, it has special meaning. The absolute value is used. When that many alerts have been posted, a message is despatched by the method described above. The posting of additional alerts do not result in more messages. When and if the printer successfully prints a job, a message is sent indicating that the error has cleared up.
In general, a job which requires a specific type of media will not be printed until that media is mounted on one or more bins.
The first exception to this rule occurs when a printer has no bins in its bin list. In this case, it will print any job immediately without regard to the job's media requirments.
The second exception is the bin name ``AutoSelect'' which has a special status. Regardless of what media is mounted on it, all jobs will be printed immediately even if the proper media is not explicitly mounted. Pages which require a media which is not among those explicitly mounted will be directed to the AutoSelect bin.
The ``DefFiltOpts:'' line contains a list of default options which will be passed to filters which are invoked to convert other file formats to PostScript. These default options are amoung the information displayed by the ``ppad show'' command.
If you wish to charge a different amount for a duplex sheet as opposed to a simplex sheet you may specify two amounts. The first is the amount to charge for each sheet printed on both sides, the second is the amount to charge for each sheet printed on one side. For instance, if you want to provide a small incentive to use duplex mode you can do this:
$ ppad charge myprn 0.07 0.05
On the other hand, if you want to charge per side you can do this:
$ ppad charge myprn 0.10 0.05
If a printer has a per-page charge, even if it is zero, it is considered a protected printer. If a printer is protected, then only users who appear in the PPR accounts database may print on it.
The per page charge may be removed from a printer by setting it to ``none''.