foomatic-rip - Universal print filter/RIP wrapper


2.1. \fRGeneral Options:

DEBUTINLINEfoomatic-rip\fR \fB[-v] [-q] \fI <spooler-specific options>FININLINE

2.2. \fRSpooler-less printing/CPS (older versions) filter:

DEBUTINLINEfoomatic-rip [\fB-P  <printer>  FININLINE |  --ppd  <ppdfile> ]  [-J <jobtitle> ] [-o  <option>\fB=\fI<value>  [...]]  \fB[<files>\fB]

2.3. \fRCUPS filter:

DEBUTINLINEfoomatic-rip <jobid>  <user>  <jobtitle>  <numcopies>  <options>  \fB[<file>\fB] FININLINE

2.4. \fRLPRng filter:

DEBUTINLINEfoomatic-rip --lprng  \fB[\fB-J<jobtitle>\fB] \fB[\fB-Z<option>\fB=\fI<value>\fB[,\fI<option>\fB=\fI<value>\fB[,  \fB...]]  <ppdfile>FININLINE
DEBUTINLINEfoomatic-rip  \fB[\fB-J<jobtitle>\fB] \fB[\fB-Z<option>\fB=\fI<value>\fB[,\fI<option>\fB=\fI<value>\fB[,  \fB...]]FININLINE
(printcap :pdd=<ppdfile>) DEBUTINLINEfoomatic-rip --ppd  <ppdfile> \fB[\fB-J<jobtitle>\fB]  \fB[\fB-Z<option>\fB=\fI<value>\fB[,\fI<option>\fB=\fI<value>\fB[,  \fB...]]FININLINE

2.5. \fRLPD/GNUlpr filter:

DEBUTINLINEfoomatic-rip [\fB-w <number>\fB] [\fB-l <number>\fB] [\fB-x <number>\fB] [\fB-y <number>\fB] [\fB-i <number>\fB] [\fB-c\fB] [\fB-n <string>\fB] [\fB-h <string>\fB] [\fB-j|-J <jobtitle>\fB|\fI<options>\fB] <ppdfile>FININLINE

2.6. \fRPPR RIP:

DEBUTINLINEfoomatic-rip \fB[<option>\fB=\fI<value>  [...]]FININLINE

2.7. \fRPPR interface:

DEBUTINLINEfoomatic-rip <queue>  <destaddress>  <options>  <jobbreak>  <feedback>  <codes>  <jobname>  <routing>  <for>  <filetype>  \fB[<file>\fB] FININLINE

2.8. \fRPDQ driver file generation:

DEBUTINLINEfoomatic-rip [\fB--ppd  <ppdfile>\fB]  [-o  <option>\fB=\fI<value>  [...]]  --genpdq|--appendpdq|--genrawpdq|--appendrawpdqFININLINE

2.9. \fRPDQ filter:

DEBUTINLINEfoomatic-rip --pdq --ppd  <ppdfile> ]  [-o  <option>\fB=\fI<value>  [...]]  <file>FININLINE

2.10. \fRCPS (newer versions) filter:

DEBUTINLINEfoomatic-rip --cps -P  <printer>  [-J <jobtitle> ]  [-o  <option>\fB=\fI<value>  [...]]  \fB[<files>\fB]FININLINE


foomatic-rip is a universal print filter which works with every known free software printer spooler. It has the following features: .Topic It translates PostScript and PDF (and also other file formats) from standard input to the printer's native language (usually put to standard output). .Topic The translation is done with an external renderer, usually Ghostscript (gs(1)). If no translation is needed (PostScript printer) the renderer's command line reduces to cat(1). The way how this translation is done is described in a PPD file. .Topic Printer capabilities, how to handle user options, and how to build the renderer command line is always described by PPD files, these PPD files usually come from Foomatic or can be the ones supplied by the manufacturers of PostScript printers. The PPD files are the same for all spoolers. .Topic foomatic-rip works with every known spooler (CUPS, LPRng, LPD, GNUlpr, PPR, PDQ, CPS, and without spooler). It auto-detects the spooler from which it was called by the command line options and environment variables which were supplied by the spooler. .Topic Non-PostScript/PDF files are translated to PostScript before they are passed to the renderer. This is usually done by a2ps(1), enscript(1), or mpage(1). foomatic-rip auto-detects which program is installed, but manual configuration is also possible. .Topic foomatic-rip does not only apply option settings supplied by the user through the command line of the printing command, but also searches the entire job for embedded option settings (only PostScript jobs). Here not only settings affectimg the whole job are taken into account, but also settings in the page headers, which are only valid for the page where they were found, so applications which produce PostScript code with page-specific printer option settings are fully supported.


4.1. Options


          \fRverbose mode for debugging.

WARNING: This will create a file in /tmp that contains the debugging information. This opens a security loophole and should not be used in production.


          \fRquiet mode - minimal information output

  • -P  <printer>
              <printer> is the configured printer which should be used for this job.
  • --ppd  <ppdfile>
              The PPD file <ppdfile> should be applied for processing this job.
  • -J  <jobtitle>
              The <jobtitle> will be printed in the head line of every page of a plain text job.
  • DEBUTINLINE-o  <option>\fB=\fI<value>FININLINE
              Option settings for this job, do

foomatic-rip -P <printer> \fB-o docs <file> (<file> can be an arbitrary existing file, as .bashrc, will not be printed) to print a list of available options for the specified <printer>.

              The file(s) to be printed.

foomatic-rip will print from standard input unless at least one file to be printed is specified on the command line. If your printer PPD file is stored as /etc/direct/<printer>.ppd or ~/.foomatic/direct/<printer>.ppd you can use it by simply specifying "-P <printer>". Put a line \fB*FoomaticRIPPostPipe: "| <command>\fB" into the PPD file, right after *PPD-Adobe: "4.3", where <command> is a command into which you wnat to re-direct the output data. Due to the restrictions of PPD files <, >, and " are not allowed in the <command>, replace them as follows: .CodeSkip

DEBUTGRASCharacter Replacement FINGRAS


< &lt;

> &gt;


' &apos;

& &amp;

This way you can print directly to your printer, use *FoomaticRIPPostPipe: "| cat &gt; /dev/lp0" or *FoomaticRIPPostPipe: "| cat &gt; /dev/usb/lp0" for local parallel or USB printers. To make normal users able to print this way add them to the group lp and make sure that the appropriate printer device file /dev/... is group-writable for the lp group. for a TCP/Socket/JetDirect printer with the host name printer listening on port 9100 you need this: *FoomaticRIPPostPipe: "| /usr/bin/nc -w 1 printer 9100" Note the "-w 1" in the "nc" command line, it makes "nc" exiting immediately after the data is transferred to the printer. *FoomaticRIPPostPipe: "| rlpr " directs your jobs to the LPD printer queue lp on the machine named printserver. See also http://www.openprinting.org/direct-doc.html


See the documentation on the OpenPrinting Web site: http://www.openprinting.org/ \fR


The file /etc/foomatic/filter.conf is read whenever foomatic-rip is executed. It allows to configure the behavior of foomatic-rip as follows (lines beginning with # are comments and therefore get ignored):

  • textfilter:  <command>
              \fRSelects the filter for input files which are not PostScript or PDF. <command> is one of a2ps, enscript, or mpage. foomatic-rip auitomatically selects the needed command line options.

debug: 0|1

          \fRTurns on (1) or off (0) the debug mode. This is equivalent to supplying the --debug command line option. Default setting is 0.

ps_accounting: 0|1

          \fRTurns on (1) or off (0) inserting PostScript code for page accounting into PostScript jobs. The inserted PostScript code makes Ghostscript generating accounting output on stderr and CUPS can this way log each page which got printed. The code will only be inserted if CUPS is the spooler. Default setting is 1.

  • echo:  [<path>/]<executable>
              \fRSets the path to an echo(1) executable which supports -n.
  • gspath:  [<path>/]<executable>
              \fRSets the path to the Ghostscript (gs(1)) executable. To be used if Ghostscript is at a non-standard location or if an alternative Ghostscript should be used.
  • execpath:  <path>[:<path>]...
              \fRSets the $PATH variable to be used by foomatic-rip.
  • cupsfilterpath:  <path>[:<path>]...
              \fRSets the directories (colon-separated) in which foomatic-rip searches for CUPS filters.
  • preferred_shell:  [<path>/]<executable>
              \fRSets the preferred shell to use when executing FoomaticRIPCommandLine and friends. Several PPD files use shell constructs that require a more modern shell like bash, zsh, or ksh.


  • /etc/cups/ppd/<printer>.ppd
  • /etc/lpd/<printer>.ppd
  • /etc/ppr/<printer>.ppd
  • /etc/pdq/<printer>.ppd
  • /etc/direct/<printer>.ppd
             The PPD files of the currently defined printers
  • /etc/foomatic/filter.conf
             Configuration file for foomatic-rip


foomatic-rip returns 0 unless something unexpected happens.


Till Kamppeter <\\fR> with parts of Manfred Wassmanns's <\\fR> man pages for the Foomatic 2.0.x filters.

10. BUGS

None so far. Please send bug reports to the Foomatic mailing list: http://lists.freestandards.org/mailman/listinfo/printing-foomatic