NAME

ppad - PPR administrator's utility


SYNOPSIS

ppad [--help] [--version] [-M] [--user username] [-d debuglevel] [subcommand] [parameters ...]


DESCRIPTION

Ppad is the utility used to manage PPR, that is, to create and delete printers and groups, to set their parameters, and to define known types of media.

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 debugging 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 /usr/share/ppr/lib/mfmodes.conf. At level 3 and above it will display every mode line in 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 users ``ppr'' and ``pprwww'', a user with a UID of 0 (root), or a user listed in the file /etc/ppr/acl/ppad.allow.

Ppad has a number of subcommands. Each subcommand has zero or more parameters. The subcommands are described below.

If the ppad 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 the --user switch is used, ppad will behave as if invoked by the indicated user.

Printer Management Subcommands

ppad show printer

Displays the configuration of the indicated printer. The option selections described by the output of this command may be changed using the commands described below.

ppad copy printer new_printer

Copy printer to new_printer. It is sometimes difficult to determine the correct settings for a particular model of printer. This command allows you to create a new printer queue by copying a working one and changing a few of the settings.

ppad comment [printer comment]

Sets the comment field of the indicated printer. Highly recommended! This comment field is often displayed in user interfaces which allow the user to choose a printer. You should set this field to something that will help the user to identify the printer. If you really want to clear the comment field, omit the value.

ppad location [printer location]

This command can be used to attach a location description to the printer queue. This information could be useful to field service personel who want to visit the printer. If the value is omited, the location description field will be cleared.

ppad department [printer department]

This command can be used to indicate the department of your organization which uses the printer. This information is for the edification of human operators and field service personel. If the value is omited, the department field will be cleared.

ppad contact [printer contact]

This command provides a way to specify the name and telephone number of a person that a human operator may want to contact when he notices a problem with the printer. This should be a person who works near the printer. If the value is omited, the printer contact field will be cleared.

ppad interface printer interface address

specifies the means by which PPR will send the jobs to the printer and the physical address of the printer. If the print queue printer does not already exist, it is created. The interface is the name of a program in /usr/lib/ppr/interfaces which can open a connection to the printer, perhaps over the network or over a serial cable. The address is a parameter which is passed to the interface program. The precise meaning and format of the address parameter depend on the interface program selected. It might be the device name of a serial port, or the AppleTalk name of the printer.

The interfaces supplied with the current distribution are simple, serial, parallel, dummy, atalk, tcpip, lpr, clispool, smb, gssimple, gsserial, gsparallel, gsatalk. gstcpip, gslpr, and gssmb.

These interfaces are described in the ppad-interfaces(8) manpage.

ppad options printer options

sets the options string which will be passed to the interface program. Most interface programs ignore this parameter. The options string is a sequence of space separated name=value pairs. The name=value pair recognized by each interface supplied with PPR are described in the ppad interface section of this man page.

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 available options depend on which interface was selected. See the appropriate section in the ppad-interfaces.8 manpage to learn what options are available for any given interface.

The options can be removed either by specifying an empty string or omitting the options string entirely.

ppad jobbreak printer {none, signal, signal/pjl, control-d, pjl, save/restore, newinterface, default}>

Specifies the method used to indicate the end of one job and the start of another to the interface program. A printer considers a banner page and the print job proper to be two separate print jobs. PPR knows reasonable default job break methods for the standard set of interfaces, but if you supply your own interface you may have to set this parameter.

The possible settings are as follows:

default

If you set this mode, then the actual jobbreak method is determined each time a job is printed by consulting PPR's internal table and the printer's PPD file. You can use the ppad show command to determine the actual jobbreak method decided on.

control-d

In this mode a control-D character is sent at the start and end of the job in order to separate it from other jobs. This is the default for many of the interfaces supplied with PPR.

pjl

Send control-d's and HP PJL commands to indicate job breaks and to set the display message. For many of the interfaces supplied with PPR this will be the default if the PPD file indicates that the printer supports PJL.

signal

The default for the interface atalk, this method uses a call and response protocol involving SIGUSR1. This is the default for the atalk interface if the PPD file does not indicate that the printer supports PJL.

signal/pjl

This selects 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. This will be the default for the atalk interface if the PPD file indicates that the printer supports PJL.

newinterface

Launches a new copy of the interface program for each segment of the job. This is the default for the interfaces whose names start with ``gs''. For them, it is also the only setting that makes sense.

none

Do not indicate job breaks. Doing this will make flag pages and multiple copies produced by certain methods very unreliable. Do not use this except for testing.

save/restore

Enclose each section of the job in save/restore. This is only a little better than none. Do not use this except for testing.

To return to the default job break method, set it to ``default''.

ppad feedback printer {true, False, default}

Indicates whether the interface program is capable of returning messages from the printer. Sometimes this is not possible, as in the case of a unidirectional interface. PPR has default feedback settings for the standard set of interfaces. To return to the default setting, set it to default.

ppad codes printer {Clean7Bit, Clean8Bit, Binary, TBCP, UNKNOWN, default}

This setting indicates which subset of the 256 possible byte values the communications chanel will pass through to the printer's PostScript interpreter.

For any given printer interface program and PPD file there is a default setting for ppad codes. To revert to the default setting for the interface and PPD file, set use the command ppad codes printer default.

The ppad codes setting is new in PPR version 1.40. Setting it to UNKNOWN causes PPR to behave as it did in previous versions. If the setting is anything other than UNKNOWN then PPR will not attempt to print PostScript files which claim to require a more extensive byte value set. For example, if a printer's codes setting is Clean8Bit and the print job contains a DSC comment which says ``%%DocumentData: Binary'' then PPR will not attempt to print the job on that printer. Hopefully the job was submitted to a group and some other member will have a less restrictive codes setting.

Here are the possible settings:

Clean7Bit

The PostScript code may contain only the characters 0x1B through 0x7E as well as the three charters 0x0A, 0x0D, and 0x09. Whenever the last three appear they must represent line-feed, carriage-return, and tab respectively.

Clean8Bit

The same as Clean7Bit except that the characters 0x80 through 0xFF are also allowed. This the the default for interfaces including serial, parallel and tcpip. These interfaces do not meet the requirements of Binary because certain code values (such as control-D are used for control functions.

Binary

Any byte value is passed through to the PostScript interpreter. This seems to be true of all PostScript printers connected over AppleTalk. It is also true of interfaces which run Ghostscript.

TBCP

This setting informs PPR that any byte value may be passed through to the PostScript interpreter as long as control characters are encoded using the Tagged Binary Communications Protocol. TBCP is useful when the communications chanel reserves certain byte values for control purpose. Often these include control-s, control-q, control-d, and control-t. With TBCP it is possible to encode these control codes as two-byte escape sequences. In the printer, the encoding is undone just before the data is passed to the PostScript interpreter.

UNKNOWN

Assume that nothing is known about the character code transmission capabilities of the communications channel. If a printer's codes setting is set to this value than PPR will not turn a job away from that printer on the basis of the job's character codes usage. This was the behavior of PPR prior to version 1.40.

default

The setting is determined each time a job is printed by consulting PPR's internal table and the printer's PPD file. You can use the ppad show command to see the resulting setting. Different interface programs will have different defaults. The default may also change according to whether the printer's PPD file indicates that the printer supports TBCP.

ppad rip printer [rip output_language [options]]

PPR has the ability to execute external Raster Image Processors such as Ghostscript to convert PostScript to a form usable by non-PostScript printers. It does so when it finds a ``*pprRIP:'' line in the PPD file or if ppad rip has been used to set a RIP in the printer's configuration file. RIP settings set with the ppad rip command override those in the PPD file.

The parameter rip indicates the Raster Image Processor to use. Normally you will want to use a value of ppr-gs. The ppr-gs RIP is a small wrapper program for Ghostscript.

The parameter output_language is the name of the printer language which the selected Ghostscript driver will produce output in. It is used as the parameter to the PJL @PJL ENTER LANGUAGE command. If you will not be using the pjl or signal/pjl jobbreak method, then the actual value doesn't matter, you can set it to ``x''.

The option options contains options for the RIP. When using the ppr-gs RIP these should include the Ghostscript option to select the proper output device driver.

Here is an example command which will choose ppr-gs as the RIP and select Ghostscript's driver for a HP DeskJet 500:

    $ ppad rip myprn ppr-gs pcl -sDEVICE=djet500

You should include such other Ghostscript options as well help to configure Ghostscript for your particular printer. You should not include options such as -sOutputFile=, -q, or -dSAFER since these are supplied automatically by ppr-gs.

The RIP ppr-gs also supports CUPS drivers. Simply select the special CUPS PPD file. PPR understands the special lines in a CUPS PPD file that identify the CUPS driver program that converts the output of Ghostscript to the printer's language. CUPS drivers will not work unless their PPD files are selected using the ppad ppd command, so there generally isn't much need to using the ppad rip command with them as PPR reads the RIP information right out of the PPD file. Use ppad show to see what it comes up with. You will notice that CUPS drivers use an option called cups= which specifies the name of the CUPS driver program.

The RIP ppr-gs also supports IJS drivers. To select an IJS driver, use a command like this one:

    $ ppad rip myprn ppr-gs escp ijs=ijsgimpprint,EPSON,escp2-c60

The ijs= option takes three arguments. They are IJS program name, printer make, and printer model. The set of allowable values for the last two depends on the IJS program. The example above is for an Epson C60 inkjet printer. Of course, additional options may be specified:

    $ ppad rip myprn ppr-gs escp ijs=ijsgimpprint,EPSON,escp2-c60 \
        -sIjsParams=ImageType=2,MediaType=Photo,Quality=720hq2

You will have to consult the documentation for the IJS driver to find out about available options.

If you are writing a PPD file and want to include default PPR RIP information, you should include a line like this one.

    *pprRIP: ppr-gs pcl -sDEVICE=djet500

If you assign a PPD file with this line to a new printer but don't use the ppad rip command, it will behave as if you had entered a ppad rip command like this:

    $ ppad rip myprn ppr-gs pcl -sDEVICE=djet500

Remember though that this is a default which the system administrator will be able to override using the ppad rip command. If he does override the default and later wants to revert to the default, he can use this command.

    $ ppad rip myprn

Of course, if he were using a different PPD file, one with no RIP settings, then this command would disable the external RIP and the printer will be expected to handle PostScript itself. To see if an external RIP is being used, run ppad show and look for a line begining with ``RIP:''. If a default from the PPD file is being used, there will be a note that so indicates.

If you want make a RIP that you can use instead of ppr-gs, you should create a program and put it in /usr/lib/ppr/lib/. It should connect stdin, stdout, and stderr to the cooresponding file descriptors of the PostScript interpreter and should send the print date to file descriptor 3. See the PPR Hackers Guide for details.

Note that while this command currently allows you to specify the path to a copy of Ghostscript as the RIP name, you should not rely on this as it may be removed in a future version of PPR.

ppad ppd printer filename

specifies the PPD file name for the printer. If filename does not begin with a slash, then it is looked up in the index created by ppr-index ppds. As a last resort it is assumed to be relative to /usr/share/ppr/ppd/. If you create a printer queue with the ppad interface command but do not set the PPD file, PPR will will use a default PPD file, however, it probably will not deal with bins properly, may print the pages in the wrong order, and may attempt to use fonts the printer does not possess and fail to recognized the presence of fonts it has.

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.

ppad ppdq printer

This command uses the interface program and address previously set with the ppad interface command to contact the printer. The printer is probed in an attempt to determine its make, model, and other characteristis. A search is then made of the PPD files known to PPR. If any of them match the make and model of the printer, then the proper ppad ppd commands to select them are printed.

Note that this command will likely fail if necessary interface options have not yet been set with the ppad options command. It is intended to help you select the best PPD file for a print queue that is already configured sufficiently correctly that documents can be printed (using the default PPD file).

If you wish to probe a printer without first creating a queue for it, you should use the ppad ppdlib query command.

ppad alerts printer frequency method address

This command specifies how PPR is to get printer error alert messages to an operator. This parameter is set on a per-printer basis. For the specified printer, alerts are dispatched after every frequency faults. They are dispatched by method method for which the only currently defined value is ``mail''. The message is mailed the the address address. When a new printer queue is created with the ``ppad interface'' command, a default alert setting is copied into its definition. This default setting is set with the ``ppad new alerts'' command.

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.

ppad frequency printer frequency

Sets the alert frequency for the specified printer without changing any of the other alert parameters.

ppad flags printer {never, no, yes, always} {never, no, yes, always}

Indicates whether flag pages should be printed. The first parameter after printer is for banner pages, the second is for trailer pages.

A setting of ``never'' means to not print the flag page even if the user requests it. A setting of ``no'' means to not print the flag page unless the user specifically requests it. A setting of ``yes'' means to print the flag page unless the user specifically requests that be suppressed. A setting of ``always'' means to print the flag page even if the user tries to suppress it.

ppad outputorder printer {Normal, Reverse, PPD}

Sets the order in which pages will be printed so as to achieve correct collation. If your printer stacks printed pages face up, you might want to set outputorder to ``Reverse''. If you set outputorder to ``PPD'', then the setting of the output order will be determined by information in the printer's PPD file.

ppad bins ppd printer

Sets the printer's list of bins to all the bins listed in its PPD file. You might create a new print queue and set its bin list with these steps: 1) use ppad interface to create the queue, 2) use ppad ppd to set the PPD file, 3) use ``ppad bins ppd'' 4) use ppad show to see what bin names were copied from the PPD file, 5) use ppad bins delete to remove the names of bins that are not actually installed on the printer.

In general, a job which requires a specific type of medium will not be printed until that medium is mounted on one or more bins. (A medium is mounted using the ppop mount command.)

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 medium is mounted on it, all jobs will be printed immediately even if the proper medium is not explicitly mounted. Pages which require a medium which is not among those explicitly mounted will be directed to the AutoSelect bin.

ppad bins add printer bin1 [bin2 ...]

Adds the indicated bin names to the indicated printer.

ppad bins delete printer bin [bin2 ...]

Deletes the indicated names from the indicated printer.

ppad delete printer

Deletes the indicated printer.

ppad touch printer

Sends a notification to pprd which causes it to re-read the configuration file for the indicated printer. If you edit or create a PPR printer configuration file by hand, you should use ppad touch to tell pprd that you have done so.

For example, if you keep duplicate print servers and have set up a printers on one of them, you can then copy the configuration file to the second server and run ppad touch to tell pprd about the new printer.

You can also use ppad touch to duplicate a queue. For example, if you have a printer called ``lab_1'', you might use these commands to create ``lab_2'':

    $ cp /etc/ppr/printers/lab_1 /etc/ppr/printers/lab_2
    $ ppad touch lab_2
    $ ppad interface lab_2 tcpip lab_2.prn.myorg.org:9100

Of course, there really should be a command to do this, but there isn't.

ppad switchset printer switches

Stores the indicated ppr switches in the printer's configuration file. Whenever a job is sent to the printer, the switches will be parsed by ppr before it parses the options on its command line.

If the switches are omited, then the switchset is deleted.

Switchsets can be used to set defaults for a printer which the user can generally override with contradictory options on the ppr command line. They are also handy when the user can't select the desired options directly, such as when the job is being submitted through Samba, the lprsrv.8 manpage, or the papd.8 manpage.

Notice that groups do not inherit the (possibly conflicting) switchsets of their member printers but that aliases inherit the switchset of the printer or group to which they point. Any switchset attached to the alias itself is appended to the one supplied by the printer or group to which it points. (Note: prior to PPR version 1.53, alias did not inherit switchsets at all.) Switchsets for groups are aliases are set with the ppad group switchset and ppad alias switchset commands respectively.

Here are some examples. If we have a printer ``myprn'' and want to make duplex the default we can do this:

        $ ppad switchset myprn --feature Duplex=DuplexNoTumble

Now, if we use the command:

        $ ppr -d myprn /etc/profile

the file will be printed in duplex mode even though we did not explicitly request it. We will get the results we could get formerly by typing:

        $ ppr --feature Duplex=DuplexNoTumble -d myprn /etc/profile

But suppose we want an easy way to print in simplex mode? We can an alias for ``myprn'' which overrides the duplex setting:

        $ ppad alias what myprn_simplex myprn
        $ ppad alias switchset myprn_simplex --feature Duplex=None

Now, if we use the command:

        $ ppr -d myprn_simplex /etc/profile

then the switchset from the printer ``myprn'' will be applied followed by the switchset from the alias ``myprn_simplex''. The final setting will be --feature Duplex=None.

It is possible to put abusive options in switchsets. The most obvious evil would be to include a -d option (presumably in attempt to redirect the print jobs to a different queue). Fortunately, ppr will ignore it.

Another option one should never include in a switchset is -m (which sets the responder method). Why? Because the method by which PPR should send messages to the person who submitted the job depends very much on how the job arrived. For example, if the job was submitted by a Unix shell user on the server, then the write command can be used to send a message to his terminal. But if the user is Microsoft Windows user connecting through Samba, then the smbclient program should be used to send messages. For this reason, network servers such as Samba, lprsrv(8) in the lprsrv.8 manpage, and papd(8) in the papd.8 manpage set the -m and -r options themselves thereby overriding any settings in the switchset.

If you want to disable responder messages, don't put -r none in the switchset. Instead put an appropriate --responder-options in the switchset. These option should work with whatever responder is selected.

ppad passthru printer list

This command sets a list of file types which should be passed through to the printer without conversion to PostScript. For example,

        $ ppad passthru adshp4m pcl hpgl2

will set the printer queue ``adshp4m'' so that it passes files in HP's PCL and HPGL2 printer languages directly through to the printer.

The file type names are the same as those one would use with the ppr -T switch. (Except MIME type names, even though the -T switch now supports some.)

There is no need to use the ppr -T switch in order for a passthru setting to be effective. If PPR's automatic file type detection is working with your files, then using the ppr -T switch is unnecessary and potentially confusing.

Some have tried to create a `transparent' print queue by setting a passthru list which contains some type, say ``pcl'', and then setting a -T option, say -T pcl in the switchset. They hope that through this queue they will be able to print files, of all the types which the printer can interpret, without PPR re-writing the files in any way. They are supprised when PostScript files sent through this queue are interpreted as though they were PCL. They have outsmarted themselves. It does not do to lyingly tell PPR that a file is PCL, because PPR will, if possible, pass this information on to the printer and the printer will believe. If one wants transparent mode, one should use the ppr -H transparent option.

Note that the passthru setting of a printer queue does not apply to jobs submitted to a group of which the printer is a member. In that case, the passthru setting for the group applies.

ppad deffiltopts printer

Instructs ppad to re-read the printer's PPD file and generate a new ``DefFiltOpts:'' line. Normally, this operation is invoked automatically whenever necessary. You might want to use command if you have modified the PPD file, have manually changed the printer's ``PPDFile:'' line, or are upgrading from a version of PPR which did not automatically generate ``DefFiltOpts:'' lines. (That is, from PPR version 1.10 or earlier.)

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.

ppad ppdopts printer

This command examines a printers PPD file and asks for information on the presence or absence of optional printer features. Obviously, a PPD file should be selected with the ``ppad ppd'' command before this command is used. The information which the administrator supplies in answer to these questions is used to answer queries from Macintosh clients. It is likely that this information will be used for other purposes in the future. Running ppad ppd will undo ppad ppdopts, leaving all of the feature information unspecified.

ppad charge printer amount [amount]

This command sets the per-sheet charge for a printer. The parameter amount is the amount of money to be charged per sheet. The amount may be expresed in standard decimal currency notation. For instance, ``0.05'' could represent 5 cents or 5 new pence sterling.

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

ppad limitpages printer lower_number upper_number

This command sets a lower and upper limit on the number of pages that may be printed on a printer. Jobs with fewer or more than the specified number of pages will be turned away to other members of the printer's group. If the job was submitted to an individual printer or all members of the group reject it, the job will be arrested.

Either the upper or lower limit or both may be removed by setting it to zero.

In the current implementation, the number of PostScript page descriptions in the job is compared to the pages limits. Future implementations will likely take multiple copies and n-up into account.

ppad limitkilobytes printer lower_number upper_number

This command sets a lower and an upper limit on the size of the files that this printer may print. The sizes are expressed in kilobytes. Any file the size of which is equal to or greater than the lower limit and less than or equal to the upper limit may be printed. Jobs outside the limits will be turned away, hopefully to other members of the printer's group. If the job was submitted to the printer directly, or if the other group members reject it too, the job will be arrested.

Either the upper or lower limit or both may be removed by setting it to zero.

ppad grayok printer boolean

This commands sets a parameter which determines whether or not this printer is allowed to print jobs which do not claim to require colour.

The purpose of this parameter is to keep grayscale jobs off of an expensive colour printer. If both a colour printer with ``grayok'' set to false and a grayscale printer are in the same group and jobs are submitted to the group, only the colour printer will be eligible for printing the jobs which declare themselves to be colour and only the grayscale printer will be eligible for printing those jobs which do not declare themselves to be colour.

Unfortunately, very few printer drivers label colour jobs as colour jobs, so the value of this feature is presently doubtful. On possible solution is to develop editps filters for each printer driver. These filters would have to detect the commands or procedure sets associated with colour printing and add a ``%%Requirements: color'' line to the job's header comments.

ppad pagetimelimit printer seconds

This option sets a limit on the number of seconds of printer time each page of a job may consume. If a page takes longer than the specified number of seconds, then printing of the job is aborted and the job is placed in the ``arrested'' state.

This limit will only be enforced if PPR can determine when the printer goes on-line or off-line and when it finishes each page. Currently this is only possible with printers which implement HP's PJL, including the status reporting features.

If the printer meets the above requirements, then PPR will run a ``stopwatch'' while it is printing a job. This stopwatch will be reset every time the printer reports that it has completed a page. The stopwatch will be stopped whenever the printer goes off-line and started again when the printer goes back on-line. If the stopwatch reaches the limit, then printing is aborted.

If your printer supports this ``stopwatch'' feature, then you will be able to see the stopwatch in the ppop status output.

To remove this limit, set it to 0.

ppad acls printer acl ...

This option sets a list of PPR access control lists for the indicated printer. A user must be in at least one of these ACLs in order to submit jobs directly to the printer.

PPR ACLs are stored in files in /etc/ppr/acl. To create a new ACL, say professors, create a file called /etc/ppr/acl/professors.allow and enter the usernames of the members, one per line.

ppad userparams printer options

This can be used to set a list of name=value pairs of options. These options are for the PostScript interpreter and are set with the PostScript setuserparams operator (on level 2 and higher interpreters) or by executing operators in statusdict (on level 1 interpreters).

This is a new feature, so the list of allowed options has not yet been established.

ppad addon printer name string

The addon on parameter name is set to the value value in the printer's configuration file. If value is ommited, then the parameter is removed from the printers's configuration file.

Addon parameters are used by programs which are not part of PPR's core services. For example, ppr2samba uses the parameter ``ppr2samba:'' to tell whether it should share a given queue with Samba. This command will set the parameter to exclude the printer ``privateprn'':

        $ ppad addon privateprn ppr2samba 0

Next time ppr2samba is run, it will exclude this queue from the smb-include.conf file that it generates.

Group Management Subcommands

These subcommands are used to create, modify and destroy printer groups.

ppad group show group

Shows the configuration of the indicated group. The configuration is modified by the commands described below.

ppad group copy group new_group

Copy an existing group. This is handy if you want to create a new group which is similiar to an existing one.

ppad group comment group [comment]

Sets a group's comment field. Highly recommended!

ppad group rotate group {true, false}

Sets the rotate option of the indicated group. If rotate is true, then PPR will attempt to evenly distribute the printing load; if rotate is false, it will use the printers at the start of the group list more heavily since printers at the end of the list will only be used when those at the head of the list are busy. By default, rotate is true.

ppad group members group printer ...

Sets the membership list of the group group to the printer list specified. Any existing members are removed. If the group does not exist, it is created.

ppad group add group printer ...

Adds the specified printer list to members list of the indicated group. If group does not exist, it is created.

ppad group remove group printer ...

Removes the printers indicated by the printer list from membership in the indicated group.

Even though all members may be deleted from a group, it will continue to exist and jobs may still be queued for it, they just won't print until it has some idle members again.

ppad group delete group

Deletes the indicated group. Any pending jobs will be deleted.

ppad group touch groupname

Sends pprd a notification which causes it to re-read the configuration file for the indicated group. See ppad touch for an explanation of why this might be necessary.

ppad group switchset group switches

Stores the indicated ppr switches in the group's configuration file.

To remove a switchset, set it but ommit the switches.

Please see ppad switchset for an explaination of printer and group switchsets.

ppad group passthru group list

This command sets a list of files types which should be passed directly through to the printer when jobs are submitted to this group. See the ppad passthru command for examples.

Notice that a printer might have a language such as PCL passed through to it when the job is submitted to one group of which it is a member but not when the job is submitted to another group of which it is also a member. In fact, groups with only one member may be used as printer aliases, aliases with different passthru rules.

ppad group acls acl ...

This option sets a list of PPR access control lists for the indicated group. A user must be in at least one of these ACLs in order to submit jobs to the group. When submitting jobs to a group, the ACLs of the group are what matter, the ACLs of the individual printers do not.

See ppad acls for more information about ACLs.

ppad group deffiltopts group

Instructs ppad to re-read all PPD files for all the member printers and generate a new ``DefFiltOpts:'' line. You might want to use this if you have modified the PPD file; have manually edited the group configuration file, changing the group membership; or have manually changed the ``PPDFile:'' line in one of the member printer configuration file; or are upgrading from a version of PPR which did not automatically generate ``DefFiltOpts:'' lines (version 1.10 or earlier).

ppad group addon name value

The addon on parameter name is set to the value value in the groups's configuration file. If value is ommited, then the parameter is removed from the groups's configuration file.

See ppad addon for an explanation of this this command's purpose.

Alias Management Subcommands

The ppad alias commands are used to create, edit, and delete aliases for queues.

ppad alias show alias

The settings of the alias are displayed.

ppad alias copy alias new_alias

Copy an existing alias. This is handy if you want to create a new alias which is similiar to an existing one.

ppad alias forwhat alias queue

If the alias does not exist, it is created as an alias for queue. If it does exist, it is changed to be an alias for queue.

ppad alias delete alias

The alias is deleted.

ppad alias comment alias [comment]

The descriptive comment for alias alias is set to string.

ppad alias switchset alias list

The switchset of alias alias is set to list. If list is ommited, then the switchset is deleted.

For an explanation of the purposes of switchsets, see ppad switchset.

ppad alias passthru alias list

The list of file types to be passed through to the printer unfiltered is set to list. If list is ommited, then the passthru list is deleted.

ppad alias addon name value

The addon on parameter name is set to the value value in the alias's configuration file. If value is ommited, then the parameter is removed from the alias's configuration file.

See ppad addon for an explanation of this this command's purpose.

Media Database Commands

The ppad media commands are used to manipulate the media database. The media database is a list of media types such as ``US letter size 20 lb. white paper''. Each of these types is assigned a name. These names are used as arguments to the ppop mount command and the ppr -D switch.

ppad media show [name]

Display the characteristics of the medium whose name is specified. If name is omitted, you will be prompted for it. If the special name all is used then the entire database will be shown.

ppad media put [name [width [height [weight [colour [type [banner]]]]]]]

This command adds and entry to the media database or replaces an entry. If not all of the parameters are supplied, you will be printed for those that are missing. These are the parameters:

name

The name of the medium description to add or replace. Typical values are ``letter'', ``a4'', and ``comm10''. When adding new media types, you may choose the names.

width
height

The parameters give the dimensions of the medium. These are floating point values. You may append a unit separator such as ``in'', ``cm'', ``mm'', or ``psu'' PostScript Units).

weight

This is the weight of the medium in grams per square meter. If you don't know it, enter ``0''.

colour

This indicates the colour of the medium. It is ok to leave this blank. These colour names are generally in lower case.

type

This is a medium type code. You may leave this blank. If ppad has to prompt you for a value, it will show a list of recomended values from the Adobe Document Structuring Convention version 3.0. For plain paper this should be left blank

banner

This parameter is a value between 1 and 10. It indicate how suitable this medium is for printing banner pages. When it comes time to print a banner page, the currently mounted medium with the highest banner value will be used. Good quality plain paper is generally given a value of ``7''. If a mounted medium has a banner value of 1 it will never be used to print banner pages, even if this means that the banner page can't be printed.

ppad media delete [name]

The specified medium is removed from the database. If name is omitted, you will be prompted for it.

ppad media export

This command writes a Borne shell script to stdout. This shell script consists of a series of ppad media put commands which will re-create the current media database.

ppad media import [filename]

This command imports a file in the format of those created by ppad media export.

PPD File Commands

ppad ppdlib search pattern

This command searches PPR's library of PPD files and displays the names of those PPD files which match pattern. If pattern contains the wildcard characters '*', '?', or '[', then pattern is understood to be a shell-style wildcard. Any PPD files whose names match the pattern are listed. If no wildcard characters are present in pattern, then PPD files whose names which contain the substring pattern are listed. For example:

        $ ppad ppd search laserwriter
        "Apple LaserWriter v23.0"
        "Apple LaserWriter II NT v47.0"
        "Apple LaserWriter Plus v38.0"
        "Apple LaserWriter Plus v42.2"
        "Apple Personal LaserWriter NTR v2010.129"
        "Apple LaserWriter Select 360 v2013.112"
        "Apple Personal LaserWriter 320 v2013.112"
        $ ppad ppd search "HP*4m*"
        "HP LaserJet 4M DSC"
        "HP LaserJet 4M Plus DSC"
        "HP LaserJet 4/4M PS 600 dpi"
        "HP LaserJet 4ML PostScript"
        "HP LaserJet 4P/4MP PS 600 dpi"
        "HP LaserJet 4V/4MV PostScript"
ppad ppdlib query interface address [option]

This command uses the interface program interface to connect to the printer at address address. The printer is probed in an attempt to determine its make, model, and other characteristis. A search is then made of the PPD files known to PPR. If any of them match the make and model of the printer, then the proper ppad ppd commands to select them are printed. For example:

        ppad ppd query jetdirect david-hp4.prn.notanorg.org

If the interface program's default options will not enable it to communicate with the printer, you should supply the necessary options as a quoted list. For example, if you have a serial printer connected to the first serial port of your Linux system, you could do this:

        ppad ppd query serial /dev/ttyS0 "online=none"

The option ``online=none'' tells the serial interface program to ignore the fact that DSR and CTS seem indicate that the printer isn't ready.

This command is intended to enable you to determine the type of a printer without first creating a queue for it. If you have already created a queue, it will likely be easier to use the ppad ppdq command which reads the interface name and address from the print queue's configuration.

ppad ppdlib get name

This command retrieves the text of the indicated PPD file and prints it on stdout. If the PPD file includes other PPD files, these other PPD files are included inline.

Error Notice Commands

ppad new alerts interval method address

This command defines a default set of alert settings which will be copied into new printer definitions created with the ``ppad interface'' command. See the ``ppad alerts'' command for an explanation of the meaning of the parameters.

ppad remind

if any printers are in a fault state, this command sends a mail message, to the user ``ppr'', summarizing the problems. You might want to invoke this command periodically from cron and put a list of people to receive the messages in ~ppr/.forward. For instance, this command could be invoked at 10 AM so that the system administrator could be reminded of any printers that are not working at the beginning of the work day and again at 4 PM so that before he goes home he can fix any printer problems so that people who are working late will have working printers.


DIAGNOSTICS

Exit codes for ppad are defined in the source code file include/util_exits.h.


SEE ALSO

the ppr.1 manpage, the ppop.1 manpage, papd(8) in the papd.8 manpage, the lprsrv.8 manpage, ``PPR, a PostScript Print Spooler'', ``Installing and Using PPR''.


HISTORY

PPR was written at Trinity College during 1993--2004. It was first released to the public on 26 April 1995.


AUTHOR

David Chappell, Trinity College Computing Center, Hartford Connecticut.