4.15.1.1. Protocol elements

The protocol has six main and several sub-commands.

  • PRINT (queue): Start the printing process if it is not already running.

  • RECEIVE (queue): Receive a job. This command switches the daemon into receiving mode. Receive mode has three different subcommands:

    • ABORT JOB: Remove any file which has been created during this "Receive job" command.

    • RECEIVE CONTROL FILE: After issuing this subcommand the client can send a file containing the commands to perform on the printer queue.

    • RECEIVE DATA FILE: After issuing this subcommand the client can send the file to be printed.

  • REMOVE (queue, agent, list): Remove a job from the queue. The jobs to be removed are sent in a whitespace-separated list.

  • SHORTSTATE (queue, list): Short status report command. List is a whitespace-separated list of jobs to report about.

  • LONGSTATE (queue, list): Long status report command. List is a whitespace-separated list of jobs to report about.

  • DATAFILE (length: int, name): Receive a data file.

The request attribute hash is also consulted for every control file line sent by the RECEIVE CONTROL FILE command. If a function is called, it gets one argument, the whole control line but the first character.

The control file commands are the following:

  • C CLASS -- Set the class name to be printed on the banner page.

  • H HOST -- Specifies the name of the host sending the print job.

  • I INDENT -- This command specifies that, for files which are printed with the 'f', of columns given.

  • J JOBNAME -- Set the name of the job to be printed on the banner page.

  • L BANNER -- Print a banner page at the end of the job.

  • M MAIL -- Send a mail to the user when the job is finished. The user is specified in the operand, the host name is set via the 'H' command.

  • N SOURCE -- The name of the file from which the job was formed.

  • P USER -- The entity who generated the job.

  • S SYMLINK -- Record symbolic link data on a Unix system so that a file will not be re-printed if its directory entry is changed after it has been printed.

  • T TITLE -- The title of the document to be printed.

  • U UNLINK -- Indicates that the specified file is no longer needed.

  • W WIDTH -- Limit the output to the specified number of columns for the 'f', 'l', and 'p' commands.

  • 1 TROFF1 -- Specify the file name for the troff R font.

  • 2 TROFF2 -- Specify the file name for the troff I font.

  • 3 TROFF3 -- Specify the file name for the troff B font.

  • 4 TROFF4 -- Specify the file name for the troff S font.

  • c CIF -- Plot a CalTech Intermediate Form (CIF) data file.

  • d DVI -- Print a Device Independent Interface (DVI - TeX output) data file.

  • f FORMAT -- Print a plaintext (including page breaks) data file.

  • g PLOT -- Plot a data file of the output of the Berkeley Unix plot library.

  • k KERB -- Reserved for use by Kerberized LPR clients and servers.

  • l NOFILTER -- Print file omitting control characters.

  • n DITROFF -- Print a DITROFF data file.

  • o PS -- Print a standard PostScript data file.

  • p PR -- Print the data file with heading, page numbers, and pagination.

  • r FORTRAN -- Print the data file with FORTRAN carriage control.

  • t TROFF -- Print the data file as Graphic Systems C/A/T phototypesetter input.

  • v RASTER -- Prints a Sun raster format file.