LPD input devices

If your application submits jobs using the lpr client or another command that uses the LPD protocol, the jobs must be sent to an LPD input device. You use the name of the input device as the name of the target printer in the command.
Note: Because some lpr commands truncate printer names, we recommend limiting the names of your LPD input devices to 8 characters.

In general, the LPD protocol provides more limited function than other job submission methods. However, some lpr clients have more options than others; be sure that you know the capabilities of the lpr client that your application uses before you start to configure your input devices.

LPD input device processing shows how the LP daemon and an LPD input device process print jobs. Input files are submitted using the LPD protocol. The LP daemon receives the files and creates an overrides file, a list file, and a trigger file. The daemon sends all the files to the LPD input device, which passes the files to the submit step.

LPD input device processing

This image shows how the LP daemon and an LPD input device process print jobs. Input files are submitted using the LPD protocol. The LP daemon receives the files and creates an overrides file, a list file, and a trigger file. It sends all the files to the LPD input device, which passes the files to the submit step and then on to the first step of the workflow.
Note: On Linux primary and secondary servers, RICOH ProcessDirector installs and uses its own LPD.

As a result, you must shut down any other LPDs that are installed; the RICOH ProcessDirector LPD must be the only one running. The RICOH ProcessDirector LPD uses port 515 to receive jobs; no other processes can use that port.

Permissions

You can restrict the systems that have permission to submit jobs to LPD input devices by host name or IP address. If your RICOH ProcessDirector system includes Linux primary or secondary servers, you set that list by logging in to RICOH ProcessDirector as an authorized user and updating the Hosts allowed to submit LPD jobs system property.

LPD options

Generally, lpr clients have a limited number of parameters that you can specify. However, if the client you use accepts the -o option, you can submit values that can be mapped to RICOH ProcessDirector properties.

LPD input devices on Linux read the statements that are submitted on the -o option and copy them directly into an overrides file. Later in the workflow, a step interprets the overrides file based on the mappings in a control file. RICOH ProcessDirector provides a sample control file, receive_lpd_overrides.cfg, in /aiw/aiw1/samples/rules/ (Linux) or C:\aiw\aiw1\samples\rules\ (Windows). You can copy the file and update it to assign values differently if necessary. To modify the file, copy the file to /aiw/aiw1/control_files/rules/ (Linux) or C:\aiw\aiw1\control_files\rules\ (Windows) and make your changes in that directory.

    Note:
  • Updates might overwrite files in the /aiw/aiw1/samples/ (Linux) or C:\aiw\aiw1\samples\ (Windows) directory, but they do not overwrite files in the /aiw/aiw1/control_files (Linux) or C:\aiw\aiw1\control_files (Windows) directory. We recommend copying sample files into the /aiw/aiw1/control_files (Linux) or C:\aiw\aiw1\control_files (Windows) directory and making all your changes in the copied file.

For example, if you need to submit a job to an LPD input device on a Linux server, you can use this command:

lpr -S morris -P LPDPDF -O outbin=3 /aiw/aiw1/testfiles/Demo.pdf
The LPD input device creates an overrides file that looks like this, with some of the required values filled in from the command and others filled in with default values:
orighost=prtroom2.ricoh.com 
origuser=root 
bannername=/aiw/aiw1/testfiles/Demo.pdf 
bannerclass=9.17.160.63 
printbanner=Yes 
origname=/aiw/aiw1/testfiles/Demo.pdf 
outbin=3
If the job is submitted to an input device that uses the default control file (receive_lpd_pdf_jobtype.cfg), the values are mapped to these properties:
  • Job.Info.NodeID=prtroom2.ricoh.com
  • Job.Host.UserID=root
  • Job.Name=/aiw/aiw1/testfiles/Demo.pdf
  • Job.OutputBin=3
The values for bannerclass and printbanner are left unmapped because they do not appear in the default control file.

Processing flow

LPD input devices always have these settings; you cannot change them:

  • Batching method: List
  • Completion method: Trigger
  • Data patterns: .*\.prt$

    The lp daemon adds the suffix .prt to all the print files it receives, so this pattern always matches. The names of your print files do not have to include those characters.

  • List patterns: .*list\.lst$
  • Overrides patterns: .*other\.oth$
  • Trigger patterns: .*\.trg$

When a job is submitted to an LPD input device, the LPD receives the print file and any options (flags) that were set on the command. The LPD creates an overrides file for the job and writes the options into it, in a format that can be interpreted by a later step. If the lpr command supports the -o option for including additional job properties, those properties are also written into the overrides file. The file is saved with the extension .oth.

The LPD also creates a list file for the job. The list file includes the names of the print file (or print files, if multiple files are submitted) and the overrides file, and has the extension .lst. The names of print files are added to the list file in the order they are received. Although some lpr clients send files in the order they are listed in the command, not all of them do. Files might arrive in random order.

When the LPD finishes creating the overrides and list files, it creates a trigger file. A trigger file does not contain any data; its presence indicates to the input device that the input file is ready to be processed. When the Completion method of an input device is set to Trigger, the input device waits until it detects a file that matches one of the Trigger patterns set on the device.

After the input device finds the trigger file, it submits the job to the first step of the workflow for processing. That step should be based on the SetJobPropsFromTextFile step template. The step uses the control file that the input device specifies specified in the Child workflow parsing rules property to interpret the overrides file and assign values to job properties. The default control file is receive_lpd_jobtype.cfg or receive_lpd_pdf_jobtype.cfg.