FOOMATIC-RIP(1)
π FOOMATIC-RIP π
okay bestie, sit down, hydrate, because we're about to talk about the universal print filter / RIP wrapper from the General Commands Manual, and honestly? she's iconic. π
β¨ NAME β¨
foomatic-rip β the universal print filter / RIP wrapper. that's it. that's the girl. π
πΈ SYNOPSIS πΈ
like, there are so many ways to call her, because she speaks every spooler's love language. let's go one by one, no skips. π
π General Options:
foomatic-rip [-v] [-q] <spooler-specific options>
π Spooler-less printing/CPS (older versions) filter:
foomatic-rip [-P <printer> | --ppd <ppdfile> ] [-J <jobtitle> ] [-o
<option>=<value> [...]] [<files>]
π CUPS filter:
foomatic-rip <jobid> <user> <jobtitle> <numcopies> <options> [<file>]
π LPRng filter:
foomatic-rip --lprng [-J<jobtitle>] [-Z<option>=<value>
[,<option>=<value> [, ...]] <ppdfile>
foomatic-rip [-J<jobtitle>] [-Z<option>=<value> [,<option>=<value>[,
...]]
(printcap :pdd=<ppdfile>)
foomatic-rip --ppd <ppdfile>[-J<jobtitle>] [-Z<option>=<value>
[,<option>=<value>[, ...]]
π LPD/GNUlpr filter:
foomatic-rip [-w <number>] [-l <number>] [-x <number>] [-y <number>]
[-i <number>] [-c] [-n <string>]
[-h <string>] [-j|-J <jobtitle>|<options>] <ppdfile>
π PPR RIP:
foomatic-rip [<option>=<value> [...]]
π PPR interface:
foomatic-rip <queue> <destaddress> <options> <jobbreak> <feedback>
<codes> <jobname> <routing> <for> <filetype> [<file>]
π PDQ driver file generation:
foomatic-rip [--ppd <ppdfile>] [-o <option>=<value> [...]]
--genpdq|--appendpdq|--genrawpdq|--appendrawpdq
π PDQ filter:
foomatic-rip --pdq --ppd <ppdfile>] [-o <option>=<value> [...]] <file>
π CPS (newer versions) filter:
foomatic-rip --cps -P <printer> [-J <jobtitle> ] [-o <option>=<value>
[...] [<files>]
π¦ DESCRIPTION π¦
foomatic-rip is a universal print filter that works with every known free software printer spooler. no cap. and here's what she brings to the table:
She translates PostScript and PDF (and also other file formats, she's flexible like that π ) from standard input into the printer's native language β which usually gets put to standard output.
The translation itself is done by an external renderer, usually Ghostscript (gs(1)). But if no translation is needed (hi, PostScript printers π), the renderer's command line reduces down to just cat(1). The way this translation happens is described in a PPD file.
Printer capabilities, how to handle user options, and how to build the renderer command line β all of that is always described by PPD files. These PPD files usually come from Foomatic, or they can be the ones supplied by the manufacturers of PostScript printers. And the PPD files are the same for all spoolers. equal opportunity PPDs, we love to see it. β¨
foomatic-rip works with every known spooler β CUPS, LPRng, LPD, GNUlpr, PPR, PDQ, CPS, and also with no spooler at all (she's independent, she doesn't need anyone π). She auto-detects the spooler she was called from by looking at the command line options and environment variables which were supplied by the spooler.
Non-PostScript/PDF files get translated to PostScript before they're passed to the renderer. This is usually done by a2ps(1), enscript(1), mpage(1), or paps(1). foomatic-rip auto-detects which program is installed, but manual configuration is also possible. options, options, options π
Recommended is a2ps because it detects many file types (text, most image formats) and together with ImageMagick(1) (for images) and Ghostscript(1) it converts them to PostScript. The other tools convert only text files. However, at present paps is the only one to support files encoded in utf-8. slay, paps. π
foomatic-rip does not only apply option settings supplied by the user through the command line of the printing command β she also searches the entire job for embedded option settings (only PostScript jobs, bestie, only PostScript). And here's the main character part: not only settings which affect 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. obsessed. π
π SPOOLER-LESS PRINTING π
πΈ Options
-vβ verbose mode for debugging. > WARNING: This will create a file in/tmpthat contains the debugging information. This opens a security loophole and should not be used in production. π bestie please, not in prod.-qβ quiet mode β minimal information output. she's being mysterious. π€«-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.-o <option>=<value>β option settings for this job. do
foomatic-rip -P <printer> -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>. yes, .bashrc, she's just being used as a prop, she will not be printed, she's fine, she consented. π
<files>β 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>. so convenient. π
Put a line
*FoomaticRIPPostPipe: "| <command>"
into the PPD file, right after *PPD-Adobe: "4.3", where <command> is a command into which you want to re-direct the output data. Due to the restrictions of PPD files <, >, and " are not allowed in the <command>, replace them as follows:
Character Replacement
---------------------
< <
> >
" "
' '
& &
This way you can print directly to your printer. use
*FoomaticRIPPostPipe: "| cat > /dev/lp0"
or
*FoomaticRIPPostPipe: "| cat > /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. permissions bestie, we don't skip them. π
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. she doesn't linger. she's got places to be. π
*FoomaticRIPPostPipe: "| rlpr -Plp@printserver"
directs your jobs to the LPD printer queue lp on the machine named printserver.
See also http://www.openprinting.org/direct-doc.html
π PRINTING WITH SPOOLER π
See the documentation on the OpenPrinting Web site: http://www.openprinting.org/
π§ CONFIGURATION FILE π§
The file /etc/foomatic/filter.conf is read whenever foomatic-rip is executed. It allows one to configure the behavior of foomatic-rip as follows (lines beginning with # are comments and therefore get ignored β yes, they just get ignored, they're doing their own thing π):
textfilter: <command>β Selects the filter for input files which are not PostScript or PDF.<command>is one ofa2ps,enscript,mpage, orpaps.foomatic-ripautomatically selects the needed command line options.debug: 0|1β Turns on (1) or off (0) the debug mode. This is equivalent to supplying the--debugcommand line option. Default setting is0.ps_accounting: 0|1β Turns on (1) or off (0) inserting PostScript code for page accounting into PostScript jobs. The inserted PostScript code makes Ghostscript generating accounting output onstderrand CUPS can this way log each page which got printed. The code will only be inserted if CUPS is the spooler. Default setting is1.echo: [<path>/]<executable>β Sets the path to anecho(1)executable which supports-n.gspath: [<path>/]<executable>β Sets 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>]...β Sets the$PATHvariable to be used byfoomatic-rip.cupsfilterpath: <path>[:<path>]...β Sets the directories (colon-separated) in whichfoomatic-ripsearches for CUPS filters.preferred_shell: [<path>/]<executable>β Sets the preferred shell to use when executingFoomaticRIPCommandLineand friends. Several PPD files use shell constructs that require a more modern shell likebash,zsh, orksh. she's modern, she needs modern shells. β¨
π FILES π
/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
β EXIT STATUS β
foomatic-rip returns 0 unless something unexpected happens. no drama, no cap, just 0. π
π AUTHOR π
Till Kamppeter <till.kamppeter@gmail.com> with parts of Manfred Wassmanns's <manolo@NCC-1701.B.Shuttle.de> man pages for the Foomatic 2.0.x filters. legends only. π«Ά
π BUGS π
None so far. (iconic, flawless, no notes. π)
Please send bug reports to the Foomatic mailing list:
http://lists.freestandards.org/mailman/listinfo/printing-foomatic
and that's the whole thing bestie!! π this page is from the Foomatic Project, dated 2002-11-26, and she's been serving cunt ever since. go forth, print responsibly, and don't use -v in production fr fr. πβ¨π¦πΈπ
π¦ where this page comes from
- debian bookworm: foomatic-filters 4.0.17-16 Β· GPL-2.0-or-later
- debian trixie: foomatic-filters 4.0.17-16 Β· GPL-2.0-or-later
- ubuntu jammy: foomatic-filters 4.0.17-13 Β· GPL-2.0-or-later
- ubuntu noble: foomatic-filters 4.0.17-16 Β· GPL-2.0-or-later
- ubuntu questing: foomatic-filters 4.0.17-16
- ubuntu resolute: foomatic-filters 4.0.17-17 Β· GPL-2.0-or-later
- ubuntu stonking: foomatic-filters 4.0.17-17 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms