RPM Filter Action

What it does

Runs a program on the print stream.

History

RPM has supported the filter action since the beginning. The term "filter" comes from the Unix world and an experience configuring the Berkley print server to process a PostScript file into HP printer codes, using ghostscript of course. At that moment, there was no PostScript printer available, but that was literally "no problem".

No matter how capable you make a program, you can always add to it by getting it to run the customer's own software. It's a hard combination to beat.

Setup

  • Credentials Optionally, enter the username, password, and domain for an account with sufficient access to the destination folder.
  • Command Click Browse and locate the program or batch file to be executed when print documents are received. Note Only compiled Windows programs with .com, .exe, or .bat extensions can be executed. Scripting languages such as vbscript can only be run by calling the script interpreter program here.
  • Arguments If your program requires specific arguments enter those here. RPM provides tags which are substituted with information from the print job. See Argument substitution below.
  • Working directory Specifies the working directory when the program is started. The program can change its working directory during the course of operation.
  • Interact with Desktop Select this option if your filter program requires user interaction. Note When this option is selected, the filter program will run only when the user specified in Credentials is logged on. If Credentials are not specified, this option cannot be selected.
  • Terminate idle process after X seconds Select this option only if your filter program does not terminate after it has finished processing.
  • File Format Allows you to customize the name passed in the %s variable of the command arguments (see above).
    Note: Many of the file format options are limited to jobs received using the LPR/LPD protocol. If jobs are received using other methods, most of these tags will be blank.
  • File Creation If a file with the same name already exists; select whether to create a unique filename, overwrite the existing file, or append the contents to the existing file.
  • Transfer file to filter using standard input The data is streamed to the filter program. Many programs with UNIX origins support standard input.
  • Save Output Causes the program’s standard output to be streamed to a file. This option allows you to customize the name of the file receiving the standard output.
    Note: Many of the save output options are limited to jobs received using the LPR/LPD protocol. If jobs are received using other methods, most of these tags will be blank.

Argument substitution 

RPM provides the following tags which are substituted with information from the print job. Note: Use of the tags is limited to jobs received using the LPR/LPD protocol. If jobs are received using other methods (i.e. telnet printing or drag and drop), most of these tags will be blank.

%s name and path of the processed file containing the print stream
%n name of source file
%j job name from control file
%t title from control file
%b banner from control file
%c class from control file
%h hostname specified by the lpr client
%u user sent in the control file
%i indent count from control file
%e email field from control file
%w width of output specified in control file
%S queue sequence number
%F format specified in control file
%C control file name and path
%q RPM queue name