]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - doc/help/man-filter.html
Interface scripts are no longer supported for security reasons
[thirdparty/cups.git] / doc / help / man-filter.html
index a930d9267c86ac22f90f6c348c0bbba1eb6f1ac1..33a35563e8e38a2d951ac46689462326e4c02ed4 100644 (file)
@@ -19,7 +19,7 @@ filter - cups file conversion filter interface
 [
 <i>filename</i>
 ]
-<pre>
+<pre class="man">
 
 <b>#include &lt;cups/cups.h></b>
 
@@ -60,7 +60,7 @@ Options are passed in <i>argv[5]</i> and are encoded from the corresponding IPP
 function to load the options into a <b>cups_option_t</b> array and the
 <b>cupsGetOption</b>()
 function to get the value of a specific attribute.
-Be careful to look for common aliases of IPP attributes such as "lansdscape" for the IPP "orientation-requested" attribute.
+Be careful to look for common aliases of IPP attributes such as "landscape" for the IPP "orientation-requested" attribute.
 <p>Options passed on the command-line typically do not include the default choices the printer's PPD file. Use the
 <b>ppdMarkDefaults</b>()
 and
@@ -69,7 +69,7 @@ functions in the CUPS library to apply the options to the PPD defaults and map a
 Use
 <b>ppdFindMarkedChoice</b>()
 to get the user-selected choice for a PPD option. For example, a filter might use the following code to determine the current value of the <b>Duplex</b> PPD option:
-<pre>
+<pre class="man">
 
     ppd_file_t *ppd = ppdOpenFile(getenv("PPD"));
     cups_option_t *options = NULL;
@@ -85,117 +85,85 @@ Options specified on the command-line determine the default values for the entir
 <h2 class="title"><a name="LOG_MESSAGES">Log Messages</a></h2>
 Messages sent to the standard error are generally stored in the printer's "printer-state-message" attribute and the current <b>ErrorLog</b> file.
 Each line begins with a standard prefix:
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>ALERT: </b><i>message</i>
-<br>
-Sets the "printer-state-message" attribute and adds the specified message to the current <b>ErrorLog</b> using the "alert" log level.
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>ATTR: </b><i>attribute=value </i>[ <i>... attribute=value</i>]
-<br>
-Sets the named job or printer attribute(s). The following job attributes can be set: "job-media-progress". The following printer attributes can be set:
+<dl class="man">
+<dt><b>ALERT: </b><i>message</i>
+<dd style="margin-left: 5.0em">Sets the "printer-state-message" attribute and adds the specified message to the current <b>ErrorLog</b> using the "alert" log level.
+<dt><b>ATTR: </b><i>attribute=value </i>[ <i>... attribute=value</i>]
+<dd style="margin-left: 5.0em">Sets the named job or printer attribute(s). The following job attributes can be set: "job-media-progress". The following printer attributes can be set:
 "auth-info-required", "marker-colors", "marker-high-levels", "marker-levels",
 "marker-low-levels", "marker-message", "marker-names", "marker-types",
 "printer-alert", and "printer-alert-description".
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>CRIT: </b><i>message</i>
-<br>
-Sets the "printer-state-message" attribute and adds the specified message to the current <b>ErrorLog</b> using the "critical" log level.
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>DEBUG: </b><i>message</i>
-<br>
-Adds the specified message to the current <b>ErrorLog</b> using the "debug" log level.
+<dt><b>CRIT: </b><i>message</i>
+<dd style="margin-left: 5.0em">Sets the "printer-state-message" attribute and adds the specified message to the current <b>ErrorLog</b> using the "critical" log level.
+<dt><b>DEBUG: </b><i>message</i>
+<dd style="margin-left: 5.0em">Adds the specified message to the current <b>ErrorLog</b> using the "debug" log level.
 <b>DEBUG</b> messages are never stored in the "printer-state-message" attribute.
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>DEBUG2: </b><i>message</i>
-<br>
-<br>
+<dt><b>DEBUG2: </b><i>message</i>
+<dd style="margin-left: 5.0em"><br>
 Adds the specified message to the current <b>ErrorLog</b> using the "debug2" log level.
 <b>DEBUG2</b> messages are never stored in the "printer-state-message" attribute.
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>EMERG: </b><i>message</i>
-<br>
-Sets the "printer-state-message" attribute and adds the specified message to the current <b>ErrorLog</b> using the "emergency" log level.
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>ERROR:</b><i> message</i>
-<br>
-Sets the "printer-state-message" attribute and adds the specified message to the current <b>ErrorLog</b> using the "error" log level.
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>INFO:</b><i> message</i>
-<br>
-Sets the "printer-state-message" attribute. If the current <b>LogLevel</b> is set to "debug2", also adds the specified message to the current <b>ErrorLog</b> using the "info" log level.
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>NOTICE:</b><i> message</i>
-<br>
-Sets the "printer-state-message" attribute and adds the specified message to the current <b>ErrorLog</b> using the "notice" log level.
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>PAGE:</b><i> page-number #-copies</i>
-<br>
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>PAGE:</b><i> total #-pages</i>
-<br>
-Adds an entry to the current <b>PageLog</b>. The first form adds <i>#-copies</i> to the "job-media-sheets-completed" attribute. The second form sets the "job-media-sheets-completed" attribute to <i>#-pages</i>.
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>PPD:</b><i> Keyword=Value</i> [ <i>... KeywordN=Value</i> ]
-<br>
-Sets the named keywords in the printer's PPD file. This is typically used to update default option keywords such as <b>DefaultPageSize</b> and the various installable options in the PPD file.
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>STATE:</b><i> printer-state-reason </i>[ <i>... printer-state-reason</i> ]
-<br>
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>STATE: +</b><i> printer-state-reason </i>[ <i>... printer-state-reason</i> ]
-<br>
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>STATE: -</b><i> printer-state-reason </i>[ <i>... printer-state-reason</i> ]
-<br>
-Sets, adds, or removes "printer-state-reason" keywords for the current queue. Typically this is used to indicate media, ink, and toner conditions on a printer.
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>WARNING:</b><i> message</i>
-<br>
-Sets the "printer-state-message" attribute and adds the specified message to the current <b>ErrorLog</b> using the "warning" log level.
+<dt><b>EMERG: </b><i>message</i>
+<dd style="margin-left: 5.0em">Sets the "printer-state-message" attribute and adds the specified message to the current <b>ErrorLog</b> using the "emergency" log level.
+<dt><b>ERROR:</b><i> message</i>
+<dd style="margin-left: 5.0em">Sets the "printer-state-message" attribute and adds the specified message to the current <b>ErrorLog</b> using the "error" log level.
+<dt><b>INFO:</b><i> message</i>
+<dd style="margin-left: 5.0em">Sets the "printer-state-message" attribute. If the current <b>LogLevel</b> is set to "debug2", also adds the specified message to the current <b>ErrorLog</b> using the "info" log level.
+<dt><b>NOTICE:</b><i> message</i>
+<dd style="margin-left: 5.0em">Sets the "printer-state-message" attribute and adds the specified message to the current <b>ErrorLog</b> using the "notice" log level.
+<dt><b>PAGE:</b><i> page-number #-copies</i>
+<dd style="margin-left: 5.0em"><dt><b>PAGE:</b><i> total #-pages</i>
+<dd style="margin-left: 5.0em">Adds an entry to the current <b>PageLog</b>. The first form adds <i>#-copies</i> to the "job-media-sheets-completed" attribute. The second form sets the "job-media-sheets-completed" attribute to <i>#-pages</i>.
+<dt><b>PPD:</b><i> Keyword=Value</i> [ <i>... KeywordN=Value</i> ]
+<dd style="margin-left: 5.0em">Sets the named keywords in the printer's PPD file. This is typically used to update default option keywords such as <b>DefaultPageSize</b> and the various installable options in the PPD file.
+<dt><b>STATE:</b><i> printer-state-reason </i>[ <i>... printer-state-reason</i> ]
+<dd style="margin-left: 5.0em"><dt><b>STATE: +</b><i> printer-state-reason </i>[ <i>... printer-state-reason</i> ]
+<dd style="margin-left: 5.0em"><dt><b>STATE: -</b><i> printer-state-reason </i>[ <i>... printer-state-reason</i> ]
+<dd style="margin-left: 5.0em">Sets, adds, or removes "printer-state-reason" keywords for the current queue. Typically this is used to indicate media, ink, and toner conditions on a printer.
+<dt><b>WARNING:</b><i> message</i>
+<dd style="margin-left: 5.0em">Sets the "printer-state-message" attribute and adds the specified message to the current <b>ErrorLog</b> using the "warning" log level.
+</dl>
 <h2 class="title"><a name="ENVIRONMENT_VARIABLES">Environment Variables</a></h2>
 The following environment variables are defined by the CUPS
 server when executing the filter:
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>CHARSET</b>
-The default text character set, typically "utf-8".
-<br>
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>CLASS</b>
-When a job is submitted to a printer class, contains the name of the destination printer class. Otherwise this environment variable will not be set.
-<br>
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>CONTENT_TYPE</b>
-The MIME media type associated with the submitted job file, for example "application/postscript".
-<br>
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>CUPS_CACHEDIR</b>
-The directory where semi-persistent cache files can be found and stored.
-<br>
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>CUPS_DATADIR</b>
-The directory where data files can be found.
-<br>
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>CUPS_FILETYPE</b>
-The type of file being printed: "job-sheet" for a banner page and "document"
-<br>
+<dl class="man">
+<dt><b>CHARSET</b>
+<dd style="margin-left: 5.0em">The default text character set, typically "utf-8".
+<dt><b>CLASS</b>
+<dd style="margin-left: 5.0em">When a job is submitted to a printer class, contains the name of the destination printer class. Otherwise this environment variable will not be set.
+<dt><b>CONTENT_TYPE</b>
+<dd style="margin-left: 5.0em">The MIME media type associated with the submitted job file, for example "application/postscript".
+<dt><b>CUPS_CACHEDIR</b>
+<dd style="margin-left: 5.0em">The directory where semi-persistent cache files can be found and stored.
+<dt><b>CUPS_DATADIR</b>
+<dd style="margin-left: 5.0em">The directory where data files can be found.
+<dt><b>CUPS_FILETYPE</b>
+<dd style="margin-left: 5.0em">The type of file being printed: "job-sheet" for a banner page and "document"
 for a regular print file.
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>CUPS_MAX_MESSAGE</b>
-The maximum size of a message sent to <i>stderr</i>, including any leading prefix and the trailing newline.
-<br>
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>CUPS_SERVERROOT</b>
-The root directory of the server.
-<br>
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>FINAL_CONTENT_TYPE</b>
-The MIME media type associated with the output destined for the printer, for example "application/vnd.cups-postscript".
-<br>
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>LANG</b>
-The default language locale (typically C or en).
-<br>
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>PATH</b>
-The standard execution path for external programs that may be run by the filter.
-<br>
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>PPD</b>
-The full pathname of the PostScript Printer Description (PPD) file for this printer.
-<br>
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>PRINTER</b>
-The name of the printer.
-<br>
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>RIP_CACHE</b>
-The recommended amount of memory to use for Raster Image Processors (RIPs).
-<br>
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>SOFTWARE</b>
-The name and version number of the server (typically CUPS/<i>major.minor</i>).
-<br>
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>TZ</b>
-The timezone of the server.
-<br>
-<p style="margin-left: 5.0em; text-indent: -5.0em"><b>USER</b>
-The user executing the filter, typically "lp" or "root"; consult the <i>cups-files.conf</i> file for the current setting.
-<br>
+<dt><b>CUPS_MAX_MESSAGE</b>
+<dd style="margin-left: 5.0em">The maximum size of a message sent to <i>stderr</i>, including any leading prefix and the trailing newline.
+<dt><b>CUPS_SERVERROOT</b>
+<dd style="margin-left: 5.0em">The root directory of the server.
+<dt><b>FINAL_CONTENT_TYPE</b>
+<dd style="margin-left: 5.0em">The MIME media type associated with the output destined for the printer, for example "application/vnd.cups-postscript".
+<dt><b>LANG</b>
+<dd style="margin-left: 5.0em">The default language locale (typically C or en).
+<dt><b>PATH</b>
+<dd style="margin-left: 5.0em">The standard execution path for external programs that may be run by the filter.
+<dt><b>PPD</b>
+<dd style="margin-left: 5.0em">The full pathname of the PostScript Printer Description (PPD) file for this printer.
+<dt><b>PRINTER</b>
+<dd style="margin-left: 5.0em">The name of the printer.
+<dt><b>RIP_CACHE</b>
+<dd style="margin-left: 5.0em">The recommended amount of memory to use for Raster Image Processors (RIPs).
+<dt><b>SOFTWARE</b>
+<dd style="margin-left: 5.0em">The name and version number of the server (typically CUPS/<i>major.minor</i>).
+<dt><b>TZ</b>
+<dd style="margin-left: 5.0em">The timezone of the server.
+<dt><b>USER</b>
+<dd style="margin-left: 5.0em">The user executing the filter, typically "lp" or "root"; consult the <i>cups-files.conf</i> file for the current setting.
+</dl>
 <h2 class="title"><a name="CONFORMING_TO">Conforming To</a></h2>
-While the filter interface is compatible with System V interface
-scripts, it will only work with the System V interface script as the
-only filter.  Typically the interface script will be provided via the
-<i>lpadmin(8)</i> command using the <i>-i</i> option.
+While the filter interface is compatible with System V interface scripts, CUPS does not support System V interface scripts.
 <h2 class="title"><a name="NOTES">Notes</a></h2>
 CUPS filters are not meant to be run directly by the user.
 Aside from the legacy System V interface issues (<i>argv[0]</i> is the printer name), CUPS filters also expect specific environment variables and file descriptors, and typically run in a user session that (on OS X) has additional restrictions that affect how it runs.
@@ -212,7 +180,7 @@ program to use the appropriate filters to do the conversions you need.
 <br>
 CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
 <h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright &copy; 2007-2014 by Apple Inc.
+Copyright &copy; 2007-2015 by Apple Inc.
 
 </body>
 </html>