man-pages/man1/foomatic-rip.1.html
2021-03-31 01:06:50 +01:00

309 lines
9.6 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of FOOMATIC-RIP</TITLE>
</HEAD><BODY>
<H1>FOOMATIC-RIP</H1>
Section: User Commands (1)<BR>Updated: 2013-11-06<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
foomatic-rip - Universal print filter/RIP wrapper
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<P>
<A NAME="lbAD">&nbsp;</A>
<H3>General Options:</H3>
<B>foomatic-rip</B>&nbsp;<B>[-v]&nbsp;[-q]</B><I>&nbsp;&lt;mode-specific&nbsp;options&gt;</I>
<P>
<A NAME="lbAE">&nbsp;</A>
<H3>Spooler-less printing filter:</H3>
<B>foomatic-rip</B>&nbsp;<B>[-P</B><I>&nbsp;&lt;printer&gt;</I><B>&nbsp;</B>
| &nbsp;<B>--ppd</B> &nbsp;<I>&lt;ppdfile&gt;</I> <B>]</B> &nbsp;[<B>-J</B>&nbsp;<I>&lt;jobtitle&gt;</I> ]
[<B>-o</B> &nbsp;<I>&lt;option&gt;</I><B>=</B><I>&lt;value&gt;</I> &nbsp;[...]] &nbsp;<B>[</B><I>&lt;files&gt;</I><B>]</B>
<P>
<A NAME="lbAF">&nbsp;</A>
<H3>CUPS filter:</H3>
<B>foomatic-rip</B>&nbsp;<I>&lt;jobid&gt;</I><I>&nbsp;&lt;user&gt;</I><B>&nbsp;</B><I>&lt;jobtitle&gt;</I><I>&nbsp;&lt;numcopies&gt;</I><B>&nbsp;</B><I>&lt;options&gt;</I><I>&nbsp;</I><B>[</B><I>&lt;file&gt;</I><B>]</B>
<P>
<A NAME="lbAG">&nbsp;</A>
<H2>DESCRIPTION</H2>
foomatic-rip is a universal print filter which can be used as CUPS filter or
stand-alone for spooler-less, direct printing. It has the following features:
<P>
<DL COMPACT>
<DT id="1">&bull;<DD>
It translates PostScript and PDF from standard input or a file to the printer's
native language on standard output.
<P>
<DT id="2">&bull;<DD>
The translation is done with an external renderer, usually Ghostscript
(<B><A HREF="/cgi-bin/man/man2html?1+gs">gs</A>(1)</B>). If no translation is needed (PostScript printer) the
renderer's command line reduces to <B><A HREF="/cgi-bin/man/man2html?1+cat">cat</A>(1)</B>. The way how this
translation is done is described in a <B>PPD file</B>.
<P>
<DT id="3">&bull;<DD>
Printer capabilities, how to handle user options, and how to build the
renderer command line is always described by <B>PPD files</B>, these
PPD files usually come from <B>Foomatic</B> or can be the ones supplied by
the manufacturers of PostScript printers. The PPD files are the same
for both CUPS and direct printing.
<P>
<DT id="4">&bull;<DD>
foomatic-rip works with <B>CUPS</B> and for direct printing (<B>without
spooler</B>), where the latter is mainly for testing and debugging.
The mode is selected by the command line options and environment
variables which are supplied to foomatic-rip.
<P>
<DT id="5">&bull;<DD>
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 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.
<P>
</DL>
<A NAME="lbAH">&nbsp;</A>
<H2>DIRECT, SPOOLER-LESS PRINTING</H2>
<P>
<A NAME="lbAI">&nbsp;</A>
<H3>Options</H3>
<P>
<DL COMPACT>
<DT id="6"><B>-v</B>
<DD>
verbose mode for debugging.
<B>WARNING:</B>
This will create a file in /tmp that contains the debugging information.
This opens a security loophole and should not be used in production.
<P>
<DT id="7"><B>-q</B>
<DD>
quiet mode - minimal information output
<P>
<DT id="8"><B>-P</B><I>&nbsp;&lt;printer&gt;</I>
<DD>
<I>&lt;printer&gt;</I> is the configured printer which should be used for this job.
<P>
<DT id="9"><B>--ppd</B><I>&nbsp;&lt;ppdfile&gt;</I>
<DD>
The PPD file <I>&lt;ppdfile&gt;</I> should be applied for processing this job.
<DT id="10"><B>-o</B><I>&nbsp;&lt;option&gt;</I><B>=</B><I>&lt;value&gt;</I>
<DD>
Option settings for this job.
<DT id="11"><B></B><I>&lt;files&gt;</I>
<DD>
The file(s) to be printed.
<P>
</DL>
<P>
<B>foomatic-rip</B> 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 <I>/etc/direct/&lt;printer&gt;.ppd</I>
or <I>~/.foomatic/direct/&lt;printer&gt;.ppd</I> you can use it by simply specifying &quot;-P <I>&lt;printer&gt;</I>&quot;.
<P>
Put a line
<P>
<B>*FoomaticRIPPostPipe: &quot;| </B><I>&lt;command&gt;</I><B>&quot;</B>
<P>
into the PPD file, right after <B>*PPD-Adobe: &quot;4.3&quot;</B>, where
<I>&lt;command&gt;</I> is a command into which you want to re-direct the
output data. Due to the restrictions of PPD files <B>&lt;</B>, <B>&gt;</B>, and
<B>&quot;</B> are not allowed in the <I>&lt;command&gt;</I>, replace them as
follows:
<P>
<P>
<PRE>
<B>Character Replacement</B>
<B>---------------------</B>
</PRE>
<P><BR>
This way you can print directly to your printer, use
<P>
<B>*FoomaticRIPPostPipe: &quot;| cat &amp;gt; /dev/lp0&quot;</B>
<P>
or
<P>
<B>*FoomaticRIPPostPipe: &quot;| cat &amp;gt; /dev/usb/lp0&quot;</B>
<P>
for local parallel or USB printers. To make normal users able to print
this way add them to the group <B>lp</B> and make sure that the
appropriate printer device file <I>/dev/...</I> is group-writable for
the <B>lp</B> group.
<P>
for a TCP/Socket/JetDirect printer with the host name <B>printer</B>
listening on port <B>9100</B> you need this:
<P>
<B>*FoomaticRIPPostPipe: &quot;| /usr/bin/nc -w 1 printer 9100&quot;</B>
<P>
Note the &quot;-w 1&quot; in the &quot;nc&quot; command line, it makes &quot;nc&quot; exiting
immediately after the data is transferred to the printer.
<P>
<B>*FoomaticRIPPostPipe: &quot;| rlpr <A HREF="mailto:-Plp@printserver">-Plp@printserver</A>&quot;</B>
<P>
directs your jobs to the LPD printer queue <B>lp</B> on the machine
named <B>printserver</B>.
<P>
See also <A HREF="http://www.openprinting.org/direct-doc.html">http://www.openprinting.org/direct-doc.html</A>
<P>
<A NAME="lbAJ">&nbsp;</A>
<H2>PRINTING WITH SPOOLER</H2>
<P>
See the documentation on the OpenPrinting Web site:
<A HREF="http://www.openprinting.org/">http://www.openprinting.org/</A>
<P>
<A NAME="lbAK">&nbsp;</A>
<H2>CONFIGURATION FILE</H2>
<P>
The file <B>/etc/cups/foomatic-rip.conf</B> or if it is not
readable the file <B>/etc/foomatic/filter.conf</B> is read
whenever foomatic-rip is executed. It allows one to configure the behavior
of foomatic-rip as follows (lines beginning with <B>#</B> are comments
and therefore get ignored):
<P>
<DL COMPACT>
<DT id="12"><B>debug: 0|1</B>
<DD>
Turns on (<B>1</B>) or off (<B>0</B>) the debug mode. This is equivalent to
supplying the <B>--debug</B> command line option. Default setting is <B>0</B>.
<P>
<DT id="13"><B>echo:</B><I>&nbsp;[&lt;path&gt;/]&lt;executable&gt;</I>
<DD>
Sets the path to an <B><A HREF="/cgi-bin/man/man2html?1+echo">echo</A>(1)</B> executable which supports <B>-n</B>.
<P>
<DT id="14"><B>gspath:</B><I>&nbsp;[&lt;path&gt;/]&lt;executable&gt;</I>
<DD>
Sets the path to the Ghostscript (<B><A HREF="/cgi-bin/man/man2html?1+gs">gs</A>(1)</B>) executable. To be used if
Ghostscript is at a non-standard location or if an alternative Ghostscript
should be used.
<P>
<DT id="15"><B>execpath:</B><I>&nbsp;&lt;path&gt;[:&lt;path&gt;]...</I>
<DD>
Sets the <B>$PATH</B> variable to be used by foomatic-rip.
<P>
<DT id="16"><B>cupsfilterpath:</B><I>&nbsp;&lt;path&gt;[:&lt;path&gt;]...</I>
<DD>
Sets the directories (colon-separated) in which foomatic-rip searches for
CUPS filters.
<P>
<DT id="17"><B>preferred_shell:</B><I>&nbsp;[&lt;path&gt;/]&lt;executable&gt;</I>
<DD>
Sets the preferred shell to use when executing FoomaticRIPCommandLine and
friends. Several PPD files use shell constructs that require a more
modern shell like <B>bash</B>, <B>zsh</B>, or <B>ksh</B>.
<P>
<P>
</DL>
<A NAME="lbAL">&nbsp;</A>
<H2>FILES</H2>
<DL COMPACT>
<DT id="18">/etc/cups/ppd/&lt;printer&gt;.ppd<DD>
<DT id="19">/etc/direct/&lt;printer&gt;.ppd<DD>
<P>
The PPD files of the currently defined printers
<P>
<DT id="20">/etc/cups/foomatic-rip.conf<DD>
<DT id="21">/etc/foomatic/filter.conf<DD>
<P>
Configuration file for foomatic-rip
<P>
<P>
<P>
</DL>
<A NAME="lbAM">&nbsp;</A>
<H2>EXIT STATUS</H2>
<B>foomatic-rip</B>
returns 0 unless something unexpected happens.
<P>
<A NAME="lbAN">&nbsp;</A>
<H2>AUTHOR</H2>
Till Kamppeter &lt;<I><A HREF="mailto:till.kamppeter@gmail.com">till.kamppeter@gmail.com</A></I>&gt; with parts of Manfred
Wassmanns's &lt;<I><A HREF="mailto:manolo@NCC-1701.B.Shuttle.de">manolo@NCC-1701.B.Shuttle.de</A></I>&gt; man pages for the
Foomatic 2.0.x filters.
<P>
<A NAME="lbAO">&nbsp;</A>
<H2>BUGS</H2>
None so far.
<P>
Please send bug reports to the OpenPrinting bug tracker:
<P>
<A HREF="http://bugs.linuxfoundation.org/">http://bugs.linuxfoundation.org/</A>
<P>
Use &quot;OpenPrinting&quot; as the product and &quot;cups-filters&quot; as the component.
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="22"><A HREF="#lbAB">NAME</A><DD>
<DT id="23"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DL>
<DT id="24"><A HREF="#lbAD">General Options:</A><DD>
<DT id="25"><A HREF="#lbAE">Spooler-less printing filter:</A><DD>
<DT id="26"><A HREF="#lbAF">CUPS filter:</A><DD>
</DL>
<DT id="27"><A HREF="#lbAG">DESCRIPTION</A><DD>
<DT id="28"><A HREF="#lbAH">DIRECT, SPOOLER-LESS PRINTING</A><DD>
<DL>
<DT id="29"><A HREF="#lbAI">Options</A><DD>
</DL>
<DT id="30"><A HREF="#lbAJ">PRINTING WITH SPOOLER</A><DD>
<DT id="31"><A HREF="#lbAK">CONFIGURATION FILE</A><DD>
<DT id="32"><A HREF="#lbAL">FILES</A><DD>
<DT id="33"><A HREF="#lbAM">EXIT STATUS</A><DD>
<DT id="34"><A HREF="#lbAN">AUTHOR</A><DD>
<DT id="35"><A HREF="#lbAO">BUGS</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:12 GMT, March 31, 2021
</BODY>
</HTML>