68e8fcc5a2
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/tags/release-1.2.1@4306 a1ca3aef-8c08-0410-bb20-df032aa958be
1553 linhas
57 KiB
HTML
1553 linhas
57 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
|
<html>
|
|
<!-- SECTION: Programming -->
|
|
<head>
|
|
<title>PPD API</title>
|
|
<meta name='keywords' content='Programming'>
|
|
<meta name='creator' content='Mini-XML v2.3'>
|
|
<style type='text/css'><!--
|
|
h1, h2, h3, p { font-family: sans-serif; text-align: justify; }
|
|
tt, pre a:link, pre a:visited, tt a:link, tt a:visited { font-weight: bold; color: #7f0000; }
|
|
pre { font-weight: bold; color: #7f0000; margin-left: 2em; }
|
|
span.info { background: #000000; border: solid thin #000000; color: #ffffff; font-size: 80%; font-style: italic; font-weight: bold; white-space: nowrap; }
|
|
h3 span.info { float: right; font-size: 100%; }
|
|
h1.title, h2.title, h3.title { border-bottom: solid 2px #000000; }
|
|
--></style>
|
|
</head>
|
|
<body>
|
|
<!--
|
|
"$Id: api-ppd.shtml 5138 2006-02-21 10:49:06Z mike $"
|
|
|
|
PPD API introduction for the Common UNIX Printing System (CUPS).
|
|
|
|
Copyright 1997-2006 by Easy Software Products.
|
|
|
|
These coded instructions, statements, and computer programs are the
|
|
property of Easy Software Products and are protected by Federal
|
|
copyright law. Distribution and use rights are outlined in the file
|
|
"LICENSE.txt" which should have been included with this file. If this
|
|
file is missing or damaged please contact Easy Software Products
|
|
at:
|
|
|
|
Attn: CUPS Licensing Information
|
|
Easy Software Products
|
|
44141 Airport View Drive, Suite 204
|
|
Hollywood, Maryland 20636 USA
|
|
|
|
Voice: (301) 373-9600
|
|
EMail: cups-info@cups.org
|
|
WWW: http://www.cups.org
|
|
-->
|
|
|
|
<h2 class='title'>Introduction</h2>
|
|
|
|
<p>The CUPS PPD API provides read-only access the data in
|
|
PostScript Printer Description ("PPD") files. With it you can
|
|
display printer options to users, mark option choices and check
|
|
for conflicting choices, and output marked choices in PostScript
|
|
output.</p>
|
|
|
|
<h2 class='title'>General Usage</h2>
|
|
|
|
<p>The <var><cups/ppd.h></var> header file must be included
|
|
to use the <tt>ppd</tt> functions.</p>
|
|
|
|
<p>Programs using these functions must be linked to the CUPS
|
|
library: <var>libcups.a</var>, <var>libcups.so.2</var>,
|
|
<var>libcups.2.dylib</var>, <var>libcups_s.a</var>, or
|
|
<var>libcups2.lib</var> depending on the platform. The following
|
|
command compiles <var>myprogram.c</var> using GCC and the CUPS
|
|
library:</p>
|
|
|
|
<pre class='command'>
|
|
<kbd>gcc -o myprogram myprogram.c -lcups</kbd>
|
|
</pre>
|
|
|
|
<h2 class='title'>Compatibility</h2>
|
|
|
|
<p>Unless otherwise specified, the PPD API functions require CUPS
|
|
1.1 or higher.</p>
|
|
<h2 class='title'>Contents</h2>
|
|
<ul>
|
|
<li><a href='#ENUMERATIONS'>Enumerations</a></li>
|
|
<li><a href='#FUNCTIONS'>Functions</a></li>
|
|
<li><a href='#STRUCTURES'>Structures</a></li>
|
|
<li><a href='#TYPES'>Types</a></li>
|
|
<li><a href='#UNIONS'>Unions</a></li>
|
|
</ul>
|
|
<!-- NEW PAGE -->
|
|
<h2 class='title'><a name='ENUMERATIONS'>Enumerations</a></h2>
|
|
<ul>
|
|
<li><a href='#ppd_cptype_e'><tt>ppd_cptype_e</tt></a> <span class='info'> CUPS 1.2 </span></li>
|
|
<li><a href='#ppd_cs_e'><tt>ppd_cs_e</tt></a> </li>
|
|
<li><a href='#ppd_section_e'><tt>ppd_section_e</tt></a> </li>
|
|
<li><a href='#ppd_status_e'><tt>ppd_status_e</tt></a> </li>
|
|
<li><a href='#ppd_ui_e'><tt>ppd_ui_e</tt></a> </li>
|
|
</ul>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ppd_cptype_e'>ppd_cptype_e</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Custom Parameter Type </p>
|
|
<h4>Values</h4>
|
|
<div class='table'><table align='center' border='1' width='80%'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>PPD_CUSTOM_CURVE</tt> </td><td>Curve value for f(x) = x^value</td></tr>
|
|
<tr><td><tt>PPD_CUSTOM_INT</tt> </td><td>Integer number value</td></tr>
|
|
<tr><td><tt>PPD_CUSTOM_INVCURVE</tt> </td><td>Curve value for f(x) = x^(1/value)</td></tr>
|
|
<tr><td><tt>PPD_CUSTOM_PASSCODE</tt> </td><td>String of (hidden) numbers</td></tr>
|
|
<tr><td><tt>PPD_CUSTOM_PASSWORD</tt> </td><td>String of (hidden) characters</td></tr>
|
|
<tr><td><tt>PPD_CUSTOM_POINTS</tt> </td><td>Measurement value in points</td></tr>
|
|
<tr><td><tt>PPD_CUSTOM_REAL</tt> </td><td>Real number value</td></tr>
|
|
<tr><td><tt>PPD_CUSTOM_STRING</tt> </td><td>String of characters</td></tr>
|
|
</tbody></table></div>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppd_cs_e'>ppd_cs_e</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Colorspaces</p>
|
|
<h4>Values</h4>
|
|
<div class='table'><table align='center' border='1' width='80%'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>PPD_CS_CMY</tt> </td><td>CMY colorspace</td></tr>
|
|
<tr><td><tt>PPD_CS_CMYK</tt> </td><td>CMYK colorspace</td></tr>
|
|
<tr><td><tt>PPD_CS_GRAY</tt> </td><td>Grayscale colorspace</td></tr>
|
|
<tr><td><tt>PPD_CS_N</tt> </td><td>DeviceN colorspace</td></tr>
|
|
<tr><td><tt>PPD_CS_RGB</tt> </td><td>RGB colorspace</td></tr>
|
|
<tr><td><tt>PPD_CS_RGBK</tt> </td><td>RGBK (K = gray) colorspace</td></tr>
|
|
</tbody></table></div>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppd_section_e'>ppd_section_e</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Order dependency sections</p>
|
|
<h4>Values</h4>
|
|
<div class='table'><table align='center' border='1' width='80%'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>PPD_ORDER_ANY</tt> </td><td>Option code can be anywhere in the file</td></tr>
|
|
<tr><td><tt>PPD_ORDER_DOCUMENT</tt> </td><td>... must be in the DocumentSetup section</td></tr>
|
|
<tr><td><tt>PPD_ORDER_EXIT</tt> </td><td>... must be sent prior to the document</td></tr>
|
|
<tr><td><tt>PPD_ORDER_JCL</tt> </td><td>... must be sent as a JCL command</td></tr>
|
|
<tr><td><tt>PPD_ORDER_PAGE</tt> </td><td>... must be in the PageSetup section</td></tr>
|
|
<tr><td><tt>PPD_ORDER_PROLOG</tt> </td><td>... must be in the Prolog section</td></tr>
|
|
</tbody></table></div>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppd_status_e'>ppd_status_e</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Types and structures...</p>
|
|
<h4>Values</h4>
|
|
<div class='table'><table align='center' border='1' width='80%'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>PPD_ALLOC_ERROR</tt> </td><td>Memory allocation error</td></tr>
|
|
<tr><td><tt>PPD_BAD_CUSTOM_PARAM</tt> </td><td>Bad custom parameter</td></tr>
|
|
<tr><td><tt>PPD_BAD_OPEN_GROUP</tt> </td><td>Bad OpenGroup</td></tr>
|
|
<tr><td><tt>PPD_BAD_OPEN_UI</tt> </td><td>Bad OpenUI/JCLOpenUI</td></tr>
|
|
<tr><td><tt>PPD_BAD_ORDER_DEPENDENCY</tt> </td><td>Bad OrderDependency</td></tr>
|
|
<tr><td><tt>PPD_BAD_UI_CONSTRAINTS</tt> </td><td>Bad UIConstraints</td></tr>
|
|
<tr><td><tt>PPD_FILE_OPEN_ERROR</tt> </td><td>Unable to open PPD file</td></tr>
|
|
<tr><td><tt>PPD_ILLEGAL_CHARACTER</tt> </td><td>Illegal control character</td></tr>
|
|
<tr><td><tt>PPD_ILLEGAL_MAIN_KEYWORD</tt> </td><td>Illegal main keyword string</td></tr>
|
|
<tr><td><tt>PPD_ILLEGAL_OPTION_KEYWORD</tt> </td><td>Illegal option keyword string</td></tr>
|
|
<tr><td><tt>PPD_ILLEGAL_TRANSLATION</tt> </td><td>Illegal translation string</td></tr>
|
|
<tr><td><tt>PPD_ILLEGAL_WHITESPACE</tt> </td><td>Illegal whitespace character</td></tr>
|
|
<tr><td><tt>PPD_INTERNAL_ERROR</tt> </td><td>Internal error</td></tr>
|
|
<tr><td><tt>PPD_LINE_TOO_LONG</tt> </td><td>Line longer than 255 chars</td></tr>
|
|
<tr><td><tt>PPD_MISSING_ASTERISK</tt> </td><td>Missing asterisk in column 0</td></tr>
|
|
<tr><td><tt>PPD_MISSING_PPDADOBE4</tt> </td><td>Missing PPD-Adobe-4.x header</td></tr>
|
|
<tr><td><tt>PPD_MISSING_VALUE</tt> </td><td>Missing value string</td></tr>
|
|
<tr><td><tt>PPD_NESTED_OPEN_GROUP</tt> </td><td>OpenGroup without a CloseGroup first</td></tr>
|
|
<tr><td><tt>PPD_NESTED_OPEN_UI</tt> </td><td>OpenUI/JCLOpenUI without a CloseUI/JCLCloseUI first</td></tr>
|
|
<tr><td><tt>PPD_NULL_FILE</tt> </td><td>NULL PPD file pointer</td></tr>
|
|
<tr><td><tt>PPD_OK</tt> </td><td>OK</td></tr>
|
|
</tbody></table></div>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppd_ui_e'>ppd_ui_e</a></h3>
|
|
<h4>Description</h4>
|
|
<p>UI Types</p>
|
|
<h4>Values</h4>
|
|
<div class='table'><table align='center' border='1' width='80%'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>PPD_UI_BOOLEAN</tt> </td><td>True or False option</td></tr>
|
|
<tr><td><tt>PPD_UI_PICKMANY</tt> </td><td>Pick zero or more from a list</td></tr>
|
|
<tr><td><tt>PPD_UI_PICKONE</tt> </td><td>Pick one from a list</td></tr>
|
|
</tbody></table></div>
|
|
<!-- NEW PAGE -->
|
|
<h2 class='title'><a name='FUNCTIONS'>Functions</a></h2>
|
|
<ul>
|
|
<li><a href='#ppdClose'><tt>ppdClose()</tt></a> </li>
|
|
<li><a href='#ppdCollect'><tt>ppdCollect()</tt></a> </li>
|
|
<li><a href='#ppdCollect2'><tt>ppdCollect2()</tt></a> <span class='info'> CUPS 1.2 </span></li>
|
|
<li><a href='#ppdConflicts'><tt>ppdConflicts()</tt></a> </li>
|
|
<li><a href='#ppdEmit'><tt>ppdEmit()</tt></a> </li>
|
|
<li><a href='#ppdEmitAfterOrder'><tt>ppdEmitAfterOrder()</tt></a> <span class='info'> CUPS 1.2 </span></li>
|
|
<li><a href='#ppdEmitFd'><tt>ppdEmitFd()</tt></a> </li>
|
|
<li><a href='#ppdEmitJCL'><tt>ppdEmitJCL()</tt></a> </li>
|
|
<li><a href='#ppdEmitJCLEnd'><tt>ppdEmitJCLEnd()</tt></a> <span class='info'> CUPS 1.2 </span></li>
|
|
<li><a href='#ppdEmitString'><tt>ppdEmitString()</tt></a> <span class='info'> CUPS 1.2 </span></li>
|
|
<li><a href='#ppdErrorString'><tt>ppdErrorString()</tt></a> <span class='info'> CUPS 1.1.19 </span></li>
|
|
<li><a href='#ppdFindAttr'><tt>ppdFindAttr()</tt></a> <span class='info'> CUPS 1.1.19 </span></li>
|
|
<li><a href='#ppdFindChoice'><tt>ppdFindChoice()</tt></a> </li>
|
|
<li><a href='#ppdFindCustomOption'><tt>ppdFindCustomOption()</tt></a> <span class='info'> CUPS 1.2 </span></li>
|
|
<li><a href='#ppdFindCustomParam'><tt>ppdFindCustomParam()</tt></a> <span class='info'> CUPS 1.2 </span></li>
|
|
<li><a href='#ppdFindMarkedChoice'><tt>ppdFindMarkedChoice()</tt></a> </li>
|
|
<li><a href='#ppdFindNextAttr'><tt>ppdFindNextAttr()</tt></a> <span class='info'> CUPS 1.1.19 </span></li>
|
|
<li><a href='#ppdFindOption'><tt>ppdFindOption()</tt></a> </li>
|
|
<li><a href='#ppdFirstCustomParam'><tt>ppdFirstCustomParam()</tt></a> <span class='info'> CUPS 1.2 </span></li>
|
|
<li><a href='#ppdFirstOption'><tt>ppdFirstOption()</tt></a> <span class='info'> CUPS 1.2 </span></li>
|
|
<li><a href='#ppdIsMarked'><tt>ppdIsMarked()</tt></a> </li>
|
|
<li><a href='#ppdLastError'><tt>ppdLastError()</tt></a> <span class='info'> CUPS 1.1.19 </span></li>
|
|
<li><a href='#ppdLocalize'><tt>ppdLocalize()</tt></a> <span class='info'> CUPS 1.2 </span></li>
|
|
<li><a href='#ppdMarkDefaults'><tt>ppdMarkDefaults()</tt></a> </li>
|
|
<li><a href='#ppdMarkOption'><tt>ppdMarkOption()</tt></a> </li>
|
|
<li><a href='#ppdNextCustomParam'><tt>ppdNextCustomParam()</tt></a> <span class='info'> CUPS 1.2 </span></li>
|
|
<li><a href='#ppdNextOption'><tt>ppdNextOption()</tt></a> <span class='info'> CUPS 1.2 </span></li>
|
|
<li><a href='#ppdOpen'><tt>ppdOpen()</tt></a> </li>
|
|
<li><a href='#ppdOpen2'><tt>ppdOpen2()</tt></a> <span class='info'> CUPS 1.2 </span></li>
|
|
<li><a href='#ppdOpenFd'><tt>ppdOpenFd()</tt></a> </li>
|
|
<li><a href='#ppdOpenFile'><tt>ppdOpenFile()</tt></a> </li>
|
|
<li><a href='#ppdPageLength'><tt>ppdPageLength()</tt></a> </li>
|
|
<li><a href='#ppdPageSize'><tt>ppdPageSize()</tt></a> </li>
|
|
<li><a href='#ppdPageWidth'><tt>ppdPageWidth()</tt></a> </li>
|
|
<li><a href='#ppdSetConformance'><tt>ppdSetConformance()</tt></a> <span class='info'> CUPS 1.1.20 </span></li>
|
|
</ul>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppdClose'>ppdClose()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Free all memory used by the PPD file.</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
void
|
|
ppdClose(
|
|
<a href='#ppd_file_t'>ppd_file_t</a> * ppd);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>ppd</tt></td><td>PPD file record</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>Nothing.</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppdCollect'>ppdCollect()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Collect all marked options that reside in the specified
|
|
section.</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
int
|
|
ppdCollect(
|
|
<a href='#ppd_file_t'>ppd_file_t</a> * ppd,
|
|
<a href='#ppd_section_t'>ppd_section_t</a> section,
|
|
<a href='#ppd_choice_t'>ppd_choice_t</a> *** choices);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>ppd</tt></td><td>PPD file data</td></tr>
|
|
<tr><td><tt>section</tt></td><td>Section to collect</td></tr>
|
|
<tr><td><tt>choices</tt></td><td>Pointers to choices</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>Number of options marked</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ppdCollect2'>ppdCollect2()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Collect all marked options that reside in the
|
|
specified section and minimum order.
|
|
|
|
</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
int
|
|
ppdCollect2(
|
|
<a href='#ppd_file_t'>ppd_file_t</a> * ppd,
|
|
<a href='#ppd_section_t'>ppd_section_t</a> section,
|
|
float min_order,
|
|
<a href='#ppd_choice_t'>ppd_choice_t</a> *** choices);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>ppd</tt></td><td>PPD file data</td></tr>
|
|
<tr><td><tt>section</tt></td><td>Section to collect</td></tr>
|
|
<tr><td><tt>min_order</tt></td><td>Minimum OrderDependency value</td></tr>
|
|
<tr><td><tt>choices</tt></td><td>Pointers to choices</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>Number of options marked</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppdConflicts'>ppdConflicts()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Check to see if there are any conflicts.</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
int
|
|
ppdConflicts(
|
|
<a href='#ppd_file_t'>ppd_file_t</a> * ppd);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>ppd</tt></td><td>PPD to check</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>Number of conflicts found</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppdEmit'>ppdEmit()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Emit code for marked options to a file.</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
int
|
|
ppdEmit(
|
|
<a href='#ppd_file_t'>ppd_file_t</a> * ppd,
|
|
FILE * fp,
|
|
<a href='#ppd_section_t'>ppd_section_t</a> section);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>ppd</tt></td><td>PPD file record</td></tr>
|
|
<tr><td><tt>fp</tt></td><td>File to write to</td></tr>
|
|
<tr><td><tt>section</tt></td><td>Section to write</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>0 on success, -1 on failure</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ppdEmitAfterOrder'>ppdEmitAfterOrder()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Emit a subset of the code for marked options to a file.
|
|
|
|
When "limit" is non-zero, this function only emits options whose
|
|
OrderDependency value is greater than or equal to "min_order".
|
|
|
|
When "limit" is zero, this function is identical to ppdEmit().
|
|
|
|
</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
int
|
|
ppdEmitAfterOrder(
|
|
<a href='#ppd_file_t'>ppd_file_t</a> * ppd,
|
|
FILE * fp,
|
|
<a href='#ppd_section_t'>ppd_section_t</a> section,
|
|
int limit,
|
|
float min_order);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>ppd</tt></td><td>PPD file record</td></tr>
|
|
<tr><td><tt>fp</tt></td><td>File to write to</td></tr>
|
|
<tr><td><tt>section</tt></td><td>Section to write</td></tr>
|
|
<tr><td><tt>limit</tt></td><td>Non-zero to use min_order</td></tr>
|
|
<tr><td><tt>min_order</tt></td><td>Lowest OrderDependency</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>0 on success, -1 on failure</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppdEmitFd'>ppdEmitFd()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Emit code for marked options to a file.</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
int
|
|
ppdEmitFd(
|
|
<a href='#ppd_file_t'>ppd_file_t</a> * ppd,
|
|
int fd,
|
|
<a href='#ppd_section_t'>ppd_section_t</a> section);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>ppd</tt></td><td>PPD file record</td></tr>
|
|
<tr><td><tt>fd</tt></td><td>File to write to</td></tr>
|
|
<tr><td><tt>section</tt></td><td>Section to write</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>0 on success, -1 on failure</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppdEmitJCL'>ppdEmitJCL()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Emit code for JCL options to a file.</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
int
|
|
ppdEmitJCL(
|
|
<a href='#ppd_file_t'>ppd_file_t</a> * ppd,
|
|
FILE * fp,
|
|
int job_id,
|
|
const char * user,
|
|
const char * title);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>ppd</tt></td><td>PPD file record</td></tr>
|
|
<tr><td><tt>fp</tt></td><td>File to write to</td></tr>
|
|
<tr><td><tt>job_id</tt></td><td>Job ID</td></tr>
|
|
<tr><td><tt>user</tt></td><td>Username</td></tr>
|
|
<tr><td><tt>title</tt></td><td>Title</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>0 on success, -1 on failure</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ppdEmitJCLEnd'>ppdEmitJCLEnd()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Emit JCLEnd code to a file.
|
|
|
|
</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
int
|
|
ppdEmitJCLEnd(
|
|
<a href='#ppd_file_t'>ppd_file_t</a> * ppd,
|
|
FILE * fp);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>ppd</tt></td><td>PPD file record</td></tr>
|
|
<tr><td><tt>fp</tt></td><td>File to write to</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>0 on success, -1 on failure</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ppdEmitString'>ppdEmitString()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Get a string containing the code for marked options.
|
|
|
|
When "min_order" is greater than zero, this function only includes options
|
|
whose OrderDependency value is greater than or equal to "min_order".
|
|
Otherwise, all options in the specified section are included in the
|
|
returned string.
|
|
|
|
The return string is allocated on the heap and should be freed using
|
|
free() when you are done with it.
|
|
|
|
</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
char *
|
|
ppdEmitString(
|
|
<a href='#ppd_file_t'>ppd_file_t</a> * ppd,
|
|
<a href='#ppd_section_t'>ppd_section_t</a> section,
|
|
float min_order);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>ppd</tt></td><td>PPD file record</td></tr>
|
|
<tr><td><tt>section</tt></td><td>Section to write</td></tr>
|
|
<tr><td><tt>min_order</tt></td><td>Lowest OrderDependency</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>String containing option code</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.1.19 </span><a name='ppdErrorString'>ppdErrorString()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Returns the text assocated with a status.
|
|
|
|
</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
const char *
|
|
ppdErrorString(
|
|
ppd_status_t status);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>status</tt></td><td>PPD status</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>Status string</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.1.19 </span><a name='ppdFindAttr'>ppdFindAttr()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Find the first matching attribute...
|
|
|
|
</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
<a href='#ppd_attr_t'>ppd_attr_t</a> *
|
|
ppdFindAttr(
|
|
<a href='#ppd_file_t'>ppd_file_t</a> * ppd,
|
|
const char * name,
|
|
const char * spec);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>ppd</tt></td><td>PPD file data</td></tr>
|
|
<tr><td><tt>name</tt></td><td>Attribute name</td></tr>
|
|
<tr><td><tt>spec</tt></td><td>Specifier string or NULL</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>Attribute or NULL if not found</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppdFindChoice'>ppdFindChoice()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Return a pointer to an option choice.</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
<a href='#ppd_choice_t'>ppd_choice_t</a> *
|
|
ppdFindChoice(
|
|
<a href='#ppd_option_t'>ppd_option_t</a> * o,
|
|
const char * choice);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>o</tt></td><td>Pointer to option</td></tr>
|
|
<tr><td><tt>choice</tt></td><td>Name of choice</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>Choice pointer or NULL</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ppdFindCustomOption'>ppdFindCustomOption()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Find a custom option.
|
|
|
|
</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
<a href='#ppd_coption_t'>ppd_coption_t</a> *
|
|
ppdFindCustomOption(
|
|
<a href='#ppd_file_t'>ppd_file_t</a> * ppd,
|
|
const char * keyword);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>ppd</tt></td><td>PPD file</td></tr>
|
|
<tr><td><tt>keyword</tt></td><td>Custom option name</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>Custom option or NULL</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ppdFindCustomParam'>ppdFindCustomParam()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Find a parameter for a custom option.
|
|
|
|
</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
<a href='#ppd_cparam_t'>ppd_cparam_t</a> *
|
|
ppdFindCustomParam(
|
|
<a href='#ppd_coption_t'>ppd_coption_t</a> * opt,
|
|
const char * name);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>opt</tt></td><td>Custom option</td></tr>
|
|
<tr><td><tt>name</tt></td><td>Parameter name</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>Custom parameter or NULL</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppdFindMarkedChoice'>ppdFindMarkedChoice()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Return the marked choice for the specified option.</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
<a href='#ppd_choice_t'>ppd_choice_t</a> *
|
|
ppdFindMarkedChoice(
|
|
<a href='#ppd_file_t'>ppd_file_t</a> * ppd,
|
|
const char * option);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>ppd</tt></td><td>PPD file</td></tr>
|
|
<tr><td><tt>option</tt></td><td>Keyword/option name</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>Pointer to choice or NULL</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.1.19 </span><a name='ppdFindNextAttr'>ppdFindNextAttr()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Find the next matching attribute...
|
|
|
|
</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
<a href='#ppd_attr_t'>ppd_attr_t</a> *
|
|
ppdFindNextAttr(
|
|
<a href='#ppd_file_t'>ppd_file_t</a> * ppd,
|
|
const char * name,
|
|
const char * spec);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>ppd</tt></td><td>PPD file data</td></tr>
|
|
<tr><td><tt>name</tt></td><td>Attribute name</td></tr>
|
|
<tr><td><tt>spec</tt></td><td>Specifier string or NULL</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>Attribute or NULL if not found</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppdFindOption'>ppdFindOption()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Return a pointer to the specified option.</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
<a href='#ppd_option_t'>ppd_option_t</a> *
|
|
ppdFindOption(
|
|
<a href='#ppd_file_t'>ppd_file_t</a> * ppd,
|
|
const char * option);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>ppd</tt></td><td>PPD file data</td></tr>
|
|
<tr><td><tt>option</tt></td><td>Option/Keyword name</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>Pointer to option or NULL</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ppdFirstCustomParam'>ppdFirstCustomParam()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Return the first parameter for a custom option.
|
|
|
|
</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
<a href='#ppd_cparam_t'>ppd_cparam_t</a> *
|
|
ppdFirstCustomParam(
|
|
<a href='#ppd_coption_t'>ppd_coption_t</a> * opt);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>opt</tt></td><td>Custom option</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>Custom parameter or NULL</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ppdFirstOption'>ppdFirstOption()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Return the first option in the PPD file.
|
|
|
|
Options are returned from all groups in sorted order.
|
|
|
|
</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
<a href='#ppd_option_t'>ppd_option_t</a> *
|
|
ppdFirstOption(
|
|
<a href='#ppd_file_t'>ppd_file_t</a> * ppd);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>ppd</tt></td><td>PPD file</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>First option or NULL</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppdIsMarked'>ppdIsMarked()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Check to see if an option is marked...</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
int
|
|
ppdIsMarked(
|
|
<a href='#ppd_file_t'>ppd_file_t</a> * ppd,
|
|
const char * option,
|
|
const char * choice);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>ppd</tt></td><td>PPD file data</td></tr>
|
|
<tr><td><tt>option</tt></td><td>Option/Keyword name</td></tr>
|
|
<tr><td><tt>choice</tt></td><td>Choice name</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>Non-zero if option is marked</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.1.19 </span><a name='ppdLastError'>ppdLastError()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Return the status from the last ppdOpen*().
|
|
|
|
</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
ppd_status_t
|
|
ppdLastError(
|
|
int * line);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>line</tt></td><td>Line number</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>Status code</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ppdLocalize'>ppdLocalize()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Localize the PPD file to the current locale.
|
|
|
|
</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
int
|
|
ppdLocalize(
|
|
<a href='#ppd_file_t'>ppd_file_t</a> * ppd);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>ppd</tt></td><td>PPD file</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>0 on success, -1 on error</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppdMarkDefaults'>ppdMarkDefaults()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Mark all default options in the PPD file.</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
void
|
|
ppdMarkDefaults(
|
|
<a href='#ppd_file_t'>ppd_file_t</a> * ppd);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>ppd</tt></td><td>PPD file record</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>Nothing.</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppdMarkOption'>ppdMarkOption()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Mark an option in a PPD file.
|
|
|
|
Notes:
|
|
|
|
-1 is returned if the given option would conflict with any currently
|
|
selected option.</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
int
|
|
ppdMarkOption(
|
|
<a href='#ppd_file_t'>ppd_file_t</a> * ppd,
|
|
const char * option,
|
|
const char * choice);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>ppd</tt></td><td>PPD file record</td></tr>
|
|
<tr><td><tt>option</tt></td><td>Keyword</td></tr>
|
|
<tr><td><tt>choice</tt></td><td>Option name</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>Number of conflicts</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ppdNextCustomParam'>ppdNextCustomParam()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Return the next parameter for a custom option.
|
|
|
|
</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
<a href='#ppd_cparam_t'>ppd_cparam_t</a> *
|
|
ppdNextCustomParam(
|
|
<a href='#ppd_coption_t'>ppd_coption_t</a> * opt);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>opt</tt></td><td>Custom option</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>Custom parameter or NULL</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ppdNextOption'>ppdNextOption()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Return the next option in the PPD file.
|
|
|
|
Options are returned from all groups in sorted order.
|
|
|
|
</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
<a href='#ppd_option_t'>ppd_option_t</a> *
|
|
ppdNextOption(
|
|
<a href='#ppd_file_t'>ppd_file_t</a> * ppd);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>ppd</tt></td><td>PPD file</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>Next option or NULL</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppdOpen'>ppdOpen()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Read a PPD file into memory.</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
<a href='#ppd_file_t'>ppd_file_t</a> *
|
|
ppdOpen(
|
|
FILE * fp);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>fp</tt></td><td>File to read from</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>PPD file record</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ppdOpen2'>ppdOpen2()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Read a PPD file into memory.
|
|
|
|
</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
<a href='#ppd_file_t'>ppd_file_t</a> *
|
|
ppdOpen2(
|
|
cups_file_t * fp);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>fp</tt></td><td>File to read from</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>PPD file record</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppdOpenFd'>ppdOpenFd()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Read a PPD file into memory.</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
<a href='#ppd_file_t'>ppd_file_t</a> *
|
|
ppdOpenFd(
|
|
int fd);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>fd</tt></td><td>File to read from</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>PPD file record</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppdOpenFile'>ppdOpenFile()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Read a PPD file into memory.</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
<a href='#ppd_file_t'>ppd_file_t</a> *
|
|
ppdOpenFile(
|
|
const char * filename);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>filename</tt></td><td>File to read from</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>PPD file record</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppdPageLength'>ppdPageLength()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Get the page length for the given size.</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
float
|
|
ppdPageLength(
|
|
<a href='#ppd_file_t'>ppd_file_t</a> * ppd,
|
|
const char * name);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>ppd</tt></td><td>PPD file</td></tr>
|
|
<tr><td><tt>name</tt></td><td>Size name</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>Length of page in points or 0.0</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppdPageSize'>ppdPageSize()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Get the page size record for the given size.</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
<a href='#ppd_size_t'>ppd_size_t</a> *
|
|
ppdPageSize(
|
|
<a href='#ppd_file_t'>ppd_file_t</a> * ppd,
|
|
const char * name);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>ppd</tt></td><td>PPD file record</td></tr>
|
|
<tr><td><tt>name</tt></td><td>Size name</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>Size record for page or NULL</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppdPageWidth'>ppdPageWidth()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Get the page width for the given size.</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
float
|
|
ppdPageWidth(
|
|
<a href='#ppd_file_t'>ppd_file_t</a> * ppd,
|
|
const char * name);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>ppd</tt></td><td>PPD file record</td></tr>
|
|
<tr><td><tt>name</tt></td><td>Size name</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>Width of page in points or 0.0</p>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.1.20 </span><a name='ppdSetConformance'>ppdSetConformance()</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Set the conformance level for PPD files.
|
|
|
|
</p>
|
|
<h4>Syntax</h4>
|
|
<pre>
|
|
void
|
|
ppdSetConformance(
|
|
<a href='#ppd_conform_t'>ppd_conform_t</a> c);
|
|
</pre>
|
|
<h4>Arguments</h4>
|
|
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>c</tt></td><td>Conformance level</td></tr>
|
|
</tbody></table></div>
|
|
<h4>Returns</h4>
|
|
<p>Nothing.</p>
|
|
<!-- NEW PAGE -->
|
|
<h2 class='title'><a name='STRUCTURES'>Structures</a></h2>
|
|
<ul>
|
|
<li><a href='#ppd_attr_s'><tt>ppd_attr_s</tt></a> <span class='info'> CUPS 1.1.19 </span></li>
|
|
<li><a href='#ppd_choice_s'><tt>ppd_choice_s</tt></a> </li>
|
|
<li><a href='#ppd_coption_s'><tt>ppd_coption_s</tt></a> <span class='info'> CUPS 1.2 </span></li>
|
|
<li><a href='#ppd_cparam_s'><tt>ppd_cparam_s</tt></a> <span class='info'> CUPS 1.2 </span></li>
|
|
<li><a href='#ppd_emul_s'><tt>ppd_emul_s</tt></a> </li>
|
|
<li><a href='#ppd_file_s'><tt>ppd_file_s</tt></a> </li>
|
|
<li><a href='#ppd_group_s'><tt>ppd_group_s</tt></a> </li>
|
|
<li><a href='#ppd_option_s'><tt>ppd_option_s</tt></a> </li>
|
|
<li><a href='#ppd_profile_s'><tt>ppd_profile_s</tt></a> </li>
|
|
<li><a href='#ppd_size_s'><tt>ppd_size_s</tt></a> </li>
|
|
</ul>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.1.19 </span><a name='ppd_attr_s'>ppd_attr_s</a></h3>
|
|
<h4>Description</h4>
|
|
<p>PPD Attribute Structure </p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
struct ppd_attr_s
|
|
{
|
|
char name[PPD_MAX_NAME];
|
|
char spec[PPD_MAX_NAME];
|
|
char text[PPD_MAX_TEXT];
|
|
char * value;
|
|
};
|
|
</pre>
|
|
<h4>Members</h4>
|
|
<div class='table'><table align='center' border='1' width='80%'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>name[PPD_MAX_NAME]</tt> </td><td>Name of attribute (cupsXYZ)</td></tr>
|
|
<tr><td><tt>spec[PPD_MAX_NAME]</tt> </td><td>Specifier string, if any</td></tr>
|
|
<tr><td><tt>text[PPD_MAX_TEXT]</tt> </td><td>Human-readable text, if any</td></tr>
|
|
<tr><td><tt>value</tt> </td><td>Value string</td></tr>
|
|
</tbody></table></div>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppd_choice_s'>ppd_choice_s</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Option choices</p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
struct ppd_choice_s
|
|
{
|
|
char choice[PPD_MAX_NAME];
|
|
char * code;
|
|
char marked;
|
|
<a href='#ppd_option_t'>ppd_option_t</a> * option;
|
|
char text[PPD_MAX_TEXT];
|
|
};
|
|
</pre>
|
|
<h4>Members</h4>
|
|
<div class='table'><table align='center' border='1' width='80%'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>choice[PPD_MAX_NAME]</tt> </td><td>Computer-readable option name</td></tr>
|
|
<tr><td><tt>code</tt> </td><td>Code to send for this option</td></tr>
|
|
<tr><td><tt>marked</tt> </td><td>0 if not selected, 1 otherwise</td></tr>
|
|
<tr><td><tt>option</tt> </td><td>Pointer to parent option structure</td></tr>
|
|
<tr><td><tt>text[PPD_MAX_TEXT]</tt> </td><td>Human-readable option name</td></tr>
|
|
</tbody></table></div>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ppd_coption_s'>ppd_coption_s</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Custom Option </p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
struct ppd_coption_s
|
|
{
|
|
char keyword[PPD_MAX_NAME];
|
|
int marked;
|
|
<a href='#ppd_option_t'>ppd_option_t</a> * option;
|
|
cups_array_t * params;
|
|
};
|
|
</pre>
|
|
<h4>Members</h4>
|
|
<div class='table'><table align='center' border='1' width='80%'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>keyword[PPD_MAX_NAME]</tt> </td><td>Name of option that is being extended...</td></tr>
|
|
<tr><td><tt>marked</tt> </td><td>Extended option is marked</td></tr>
|
|
<tr><td><tt>option</tt> </td><td>Option that is being extended...</td></tr>
|
|
<tr><td><tt>params</tt> </td><td>Parameters</td></tr>
|
|
</tbody></table></div>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ppd_cparam_s'>ppd_cparam_s</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Custom Parameter </p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
struct ppd_cparam_s
|
|
{
|
|
<a href='#ppd_cpvalue_t'>ppd_cpvalue_t</a> current;
|
|
<a href='#ppd_cplimit_t'>ppd_cplimit_t</a> minimum, maximum;
|
|
char name[PPD_MAX_NAME];
|
|
int order;
|
|
char text[PPD_MAX_TEXT];
|
|
<a href='#ppd_cptype_t'>ppd_cptype_t</a> type;
|
|
};
|
|
</pre>
|
|
<h4>Members</h4>
|
|
<div class='table'><table align='center' border='1' width='80%'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>current</tt> </td><td>Current value</td></tr>
|
|
<tr><td><tt>maximum</tt> </td><td>Maximum value</td></tr>
|
|
<tr><td><tt>name[PPD_MAX_NAME]</tt> </td><td>Parameter name</td></tr>
|
|
<tr><td><tt>order</tt> </td><td>Order (0 to N)</td></tr>
|
|
<tr><td><tt>text[PPD_MAX_TEXT]</tt> </td><td>Human-readable text</td></tr>
|
|
<tr><td><tt>type</tt> </td><td>Parameter type</td></tr>
|
|
</tbody></table></div>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppd_emul_s'>ppd_emul_s</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Emulators</p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
struct ppd_emul_s
|
|
{
|
|
char name[PPD_MAX_NAME];
|
|
char * start;
|
|
char * stop;
|
|
};
|
|
</pre>
|
|
<h4>Members</h4>
|
|
<div class='table'><table align='center' border='1' width='80%'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>name[PPD_MAX_NAME]</tt> </td><td>Emulator name</td></tr>
|
|
<tr><td><tt>start</tt> </td><td>Code to switch to this emulation</td></tr>
|
|
<tr><td><tt>stop</tt> </td><td>Code to stop this emulation</td></tr>
|
|
</tbody></table></div>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppd_file_s'>ppd_file_s</a></h3>
|
|
<h4>Description</h4>
|
|
<p>PPD File</p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
struct ppd_file_s
|
|
{
|
|
int accurate_screens;
|
|
<a href='#ppd_attr_t'>ppd_attr_t</a> ** attrs;
|
|
int color_device;
|
|
ppd_cs_t colorspace;
|
|
<a href='#ppd_const_t'>ppd_const_t</a> * consts;
|
|
int contone_only;
|
|
cups_array_t * coptions;
|
|
int cur_attr;
|
|
float custom_margins[4];
|
|
float custom_max[2];
|
|
float custom_min[2];
|
|
<a href='#ppd_emul_t'>ppd_emul_t</a> * emulations;
|
|
char ** filters;
|
|
int flip_duplex;
|
|
char ** fonts;
|
|
<a href='#ppd_group_t'>ppd_group_t</a> * groups;
|
|
char * jcl_begin;
|
|
char * jcl_end;
|
|
char * jcl_ps;
|
|
int landscape;
|
|
char * lang_encoding;
|
|
char * lang_version;
|
|
int language_level;
|
|
int manual_copies;
|
|
char * manufacturer;
|
|
int model_number;
|
|
char * modelname;
|
|
char * nickname;
|
|
int num_attrs;
|
|
int num_consts;
|
|
int num_emulations;
|
|
int num_filters;
|
|
int num_fonts;
|
|
int num_groups;
|
|
int num_profiles;
|
|
int num_sizes;
|
|
cups_array_t * options;
|
|
char * patches;
|
|
char * pcfilename;
|
|
char * product;
|
|
<a href='#ppd_profile_t'>ppd_profile_t</a> * profiles;
|
|
char * protocols;
|
|
char * shortnickname;
|
|
<a href='#ppd_size_t'>ppd_size_t</a> * sizes;
|
|
cups_array_t * sorted_attrs;
|
|
int throughput;
|
|
char * ttrasterizer;
|
|
int variable_sizes;
|
|
};
|
|
</pre>
|
|
<h4>Members</h4>
|
|
<div class='table'><table align='center' border='1' width='80%'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>accurate_screens</tt> </td><td>1 = supports accurate screens, 0 = not</td></tr>
|
|
<tr><td><tt>attrs</tt> <span class='info'> CUPS 1.1.19 </span></td><td>Attributes @private@</td></tr>
|
|
<tr><td><tt>color_device</tt> </td><td>1 = color device, 0 = grayscale</td></tr>
|
|
<tr><td><tt>colorspace</tt> </td><td>Default colorspace</td></tr>
|
|
<tr><td><tt>consts</tt> </td><td>UI/Non-UI constraints</td></tr>
|
|
<tr><td><tt>contone_only</tt> </td><td>1 = continuous tone only, 0 = not</td></tr>
|
|
<tr><td><tt>coptions</tt> <span class='info'> CUPS 1.2 </span></td><td>Custom options array @private@</td></tr>
|
|
<tr><td><tt>cur_attr</tt> <span class='info'> CUPS 1.1.19 </span></td><td>Current attribute @private@</td></tr>
|
|
<tr><td><tt>custom_margins[4]</tt> </td><td>Margins around page</td></tr>
|
|
<tr><td><tt>custom_max[2]</tt> </td><td>Maximum variable page size</td></tr>
|
|
<tr><td><tt>custom_min[2]</tt> </td><td>Minimum variable page size</td></tr>
|
|
<tr><td><tt>emulations</tt> </td><td>Emulations and the code to invoke them</td></tr>
|
|
<tr><td><tt>filters</tt> </td><td>Filter strings...</td></tr>
|
|
<tr><td><tt>flip_duplex</tt> <span class='info'> CUPS 1.1 </span></td><td>1 = Flip page for back sides </td></tr>
|
|
<tr><td><tt>fonts</tt> </td><td>Pre-loaded fonts</td></tr>
|
|
<tr><td><tt>groups</tt> </td><td>UI groups</td></tr>
|
|
<tr><td><tt>jcl_begin</tt> </td><td>Start JCL commands</td></tr>
|
|
<tr><td><tt>jcl_end</tt> </td><td>End JCL commands</td></tr>
|
|
<tr><td><tt>jcl_ps</tt> </td><td>Enter PostScript interpreter</td></tr>
|
|
<tr><td><tt>landscape</tt> </td><td>-90 or 90</td></tr>
|
|
<tr><td><tt>lang_encoding</tt> </td><td>Language encoding</td></tr>
|
|
<tr><td><tt>lang_version</tt> </td><td>Language version (English, Spanish, etc.)</td></tr>
|
|
<tr><td><tt>language_level</tt> </td><td>Language level of device</td></tr>
|
|
<tr><td><tt>manual_copies</tt> </td><td>1 = Copies done manually, 0 = hardware</td></tr>
|
|
<tr><td><tt>manufacturer</tt> </td><td>Manufacturer name</td></tr>
|
|
<tr><td><tt>model_number</tt> </td><td>Device-specific model number</td></tr>
|
|
<tr><td><tt>modelname</tt> </td><td>Model name (general)</td></tr>
|
|
<tr><td><tt>nickname</tt> </td><td>Nickname (specific)</td></tr>
|
|
<tr><td><tt>num_attrs</tt> <span class='info'> CUPS 1.1.19 </span></td><td>Number of attributes @private@</td></tr>
|
|
<tr><td><tt>num_consts</tt> </td><td>Number of UI/Non-UI constraints</td></tr>
|
|
<tr><td><tt>num_emulations</tt> </td><td>Number of emulations supported</td></tr>
|
|
<tr><td><tt>num_filters</tt> </td><td>Number of filters</td></tr>
|
|
<tr><td><tt>num_fonts</tt> </td><td>Number of pre-loaded fonts</td></tr>
|
|
<tr><td><tt>num_groups</tt> </td><td>Number of UI groups</td></tr>
|
|
<tr><td><tt>num_profiles</tt> </td><td>Number of sRGB color profiles</td></tr>
|
|
<tr><td><tt>num_sizes</tt> </td><td>Number of page sizes</td></tr>
|
|
<tr><td><tt>options</tt> <span class='info'> CUPS 1.2 </span></td><td>Option lookup array @private@</td></tr>
|
|
<tr><td><tt>patches</tt> </td><td>Patch commands to be sent to printer</td></tr>
|
|
<tr><td><tt>pcfilename</tt> <span class='info'> CUPS 1.1.19 </span></td><td>PCFileName string </td></tr>
|
|
<tr><td><tt>product</tt> </td><td>Product name (from PS RIP/interpreter)</td></tr>
|
|
<tr><td><tt>profiles</tt> </td><td>sRGB color profiles</td></tr>
|
|
<tr><td><tt>protocols</tt> <span class='info'> CUPS 1.1.19 </span></td><td>Protocols (BCP, TBCP) string </td></tr>
|
|
<tr><td><tt>shortnickname</tt> </td><td>Short version of nickname</td></tr>
|
|
<tr><td><tt>sizes</tt> </td><td>Page sizes</td></tr>
|
|
<tr><td><tt>sorted_attrs</tt> <span class='info'> CUPS 1.2 </span></td><td>Attribute lookup array @private@</td></tr>
|
|
<tr><td><tt>throughput</tt> </td><td>Pages per minute</td></tr>
|
|
<tr><td><tt>ttrasterizer</tt> </td><td>Truetype rasterizer</td></tr>
|
|
<tr><td><tt>variable_sizes</tt> </td><td>1 = supports variable sizes, 0 = doesn't</td></tr>
|
|
</tbody></table></div>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppd_group_s'>ppd_group_s</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Groups</p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
struct ppd_group_s
|
|
{
|
|
char text[PPD_MAX_TEXT - PPD_MAX_NAME];
|
|
char name[PPD_MAX_NAME];
|
|
int num_options;
|
|
int num_subgroups;
|
|
<a href='#ppd_option_t'>ppd_option_t</a> * options;
|
|
struct <a href='#ppd_group_s'>ppd_group_s</a> * subgroups;
|
|
};
|
|
</pre>
|
|
<h4>Members</h4>
|
|
<div class='table'><table align='center' border='1' width='80%'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>PPD_MAX_NAME]</tt> </td><td>Human-readable group name</td></tr>
|
|
<tr><td><tt>name[PPD_MAX_NAME]</tt> <span class='info'> CUPS 1.1.18 </span></td><td>Group name </td></tr>
|
|
<tr><td><tt>num_options</tt> </td><td>Number of options</td></tr>
|
|
<tr><td><tt>num_subgroups</tt> </td><td>Number of sub-groups</td></tr>
|
|
<tr><td><tt>options</tt> </td><td>Options</td></tr>
|
|
<tr><td><tt>subgroups</tt> </td><td>Sub-groups (max depth = 1)</td></tr>
|
|
</tbody></table></div>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppd_option_s'>ppd_option_s</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Options</p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
struct ppd_option_s
|
|
{
|
|
<a href='#ppd_choice_t'>ppd_choice_t</a> * choices;
|
|
char conflicted;
|
|
char defchoice[PPD_MAX_NAME];
|
|
char keyword[PPD_MAX_NAME];
|
|
int num_choices;
|
|
float order;
|
|
<a href='#ppd_section_t'>ppd_section_t</a> section;
|
|
char text[PPD_MAX_TEXT];
|
|
<a href='#ppd_ui_t'>ppd_ui_t</a> ui;
|
|
};
|
|
</pre>
|
|
<h4>Members</h4>
|
|
<div class='table'><table align='center' border='1' width='80%'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>choices</tt> </td><td>Option choices</td></tr>
|
|
<tr><td><tt>conflicted</tt> </td><td>0 if no conflicts exist, 1 otherwise</td></tr>
|
|
<tr><td><tt>defchoice[PPD_MAX_NAME]</tt> </td><td>Default option choice</td></tr>
|
|
<tr><td><tt>keyword[PPD_MAX_NAME]</tt> </td><td>Option keyword name ("PageSize", etc.)</td></tr>
|
|
<tr><td><tt>num_choices</tt> </td><td>Number of option choices</td></tr>
|
|
<tr><td><tt>order</tt> </td><td>Order number</td></tr>
|
|
<tr><td><tt>section</tt> </td><td>Section for command</td></tr>
|
|
<tr><td><tt>text[PPD_MAX_TEXT]</tt> </td><td>Human-readable text</td></tr>
|
|
<tr><td><tt>ui</tt> </td><td>Type of UI option</td></tr>
|
|
</tbody></table></div>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppd_profile_s'>ppd_profile_s</a></h3>
|
|
<h4>Description</h4>
|
|
<p>sRGB Color Profiles</p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
struct ppd_profile_s
|
|
{
|
|
float density;
|
|
float gamma;
|
|
float matrix[3][3];
|
|
char media_type[PPD_MAX_NAME];
|
|
char resolution[PPD_MAX_NAME];
|
|
};
|
|
</pre>
|
|
<h4>Members</h4>
|
|
<div class='table'><table align='center' border='1' width='80%'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>density</tt> </td><td>Ink density to use</td></tr>
|
|
<tr><td><tt>gamma</tt> </td><td>Gamma correction to use</td></tr>
|
|
<tr><td><tt>matrix[3][3]</tt> </td><td>Transform matrix</td></tr>
|
|
<tr><td><tt>media_type[PPD_MAX_NAME]</tt> </td><td>Media type or "-"</td></tr>
|
|
<tr><td><tt>resolution[PPD_MAX_NAME]</tt> </td><td>Resolution or "-"</td></tr>
|
|
</tbody></table></div>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppd_size_s'>ppd_size_s</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Page Sizes</p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
struct ppd_size_s
|
|
{
|
|
float bottom;
|
|
float left;
|
|
float length;
|
|
int marked;
|
|
char name[PPD_MAX_NAME];
|
|
float right;
|
|
float top;
|
|
float width;
|
|
};
|
|
</pre>
|
|
<h4>Members</h4>
|
|
<div class='table'><table align='center' border='1' width='80%'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>bottom</tt> </td><td>Bottom printable margin in points</td></tr>
|
|
<tr><td><tt>left</tt> </td><td>Left printable margin in points</td></tr>
|
|
<tr><td><tt>length</tt> </td><td>Length of media in points</td></tr>
|
|
<tr><td><tt>marked</tt> </td><td>Page size selected?</td></tr>
|
|
<tr><td><tt>name[PPD_MAX_NAME]</tt> </td><td>Media size option</td></tr>
|
|
<tr><td><tt>right</tt> </td><td>Right printable margin in points</td></tr>
|
|
<tr><td><tt>top</tt> </td><td>Top printable margin in points</td></tr>
|
|
<tr><td><tt>width</tt> </td><td>Width of media in points</td></tr>
|
|
</tbody></table></div>
|
|
<!-- NEW PAGE -->
|
|
<h2 class='title'><a name='TYPES'>Types</a></h2>
|
|
<ul>
|
|
<li><a href='#ppd_attr_t'><tt>ppd_attr_t</tt></a> <span class='info'> CUPS 1.1.19 </span></li>
|
|
<li><a href='#ppd_choice_t'><tt>ppd_choice_t</tt></a> </li>
|
|
<li><a href='#ppd_const_t'><tt>ppd_const_t</tt></a> </li>
|
|
<li><a href='#ppd_coption_t'><tt>ppd_coption_t</tt></a> <span class='info'> CUPS 1.2 </span></li>
|
|
<li><a href='#ppd_cparam_t'><tt>ppd_cparam_t</tt></a> <span class='info'> CUPS 1.2 </span></li>
|
|
<li><a href='#ppd_cplimit_t'><tt>ppd_cplimit_t</tt></a> <span class='info'> CUPS 1.2 </span></li>
|
|
<li><a href='#ppd_cptype_t'><tt>ppd_cptype_t</tt></a> <span class='info'> CUPS 1.2 </span></li>
|
|
<li><a href='#ppd_cpvalue_t'><tt>ppd_cpvalue_t</tt></a> <span class='info'> CUPS 1.2 </span></li>
|
|
<li><a href='#ppd_emul_t'><tt>ppd_emul_t</tt></a> </li>
|
|
<li><a href='#ppd_file_t'><tt>ppd_file_t</tt></a> </li>
|
|
<li><a href='#ppd_group_t'><tt>ppd_group_t</tt></a> </li>
|
|
<li><a href='#ppd_option_t'><tt>ppd_option_t</tt></a> </li>
|
|
<li><a href='#ppd_profile_t'><tt>ppd_profile_t</tt></a> </li>
|
|
<li><a href='#ppd_section_t'><tt>ppd_section_t</tt></a> </li>
|
|
<li><a href='#ppd_size_t'><tt>ppd_size_t</tt></a> </li>
|
|
<li><a href='#ppd_ui_t'><tt>ppd_ui_t</tt></a> </li>
|
|
</ul>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.1.19 </span><a name='ppd_attr_t'>ppd_attr_t</a></h3>
|
|
<h4>Description</h4>
|
|
<p>PPD Attribute Structure </p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
typedef struct <a href='#ppd_attr_s'>ppd_attr_s</a> ppd_attr_t;
|
|
</pre>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppd_choice_t'>ppd_choice_t</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Option choices</p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
typedef struct <a href='#ppd_choice_s'>ppd_choice_s</a> ppd_choice_t;
|
|
</pre>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppd_const_t'>ppd_const_t</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Constraints</p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
typedef struct ppd_const_t;
|
|
</pre>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ppd_coption_t'>ppd_coption_t</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Custom Option </p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
typedef struct <a href='#ppd_coption_s'>ppd_coption_s</a> ppd_coption_t;
|
|
</pre>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ppd_cparam_t'>ppd_cparam_t</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Custom Parameter </p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
typedef struct <a href='#ppd_cparam_s'>ppd_cparam_s</a> ppd_cparam_t;
|
|
</pre>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ppd_cplimit_t'>ppd_cplimit_t</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Custom Parameter Limit </p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
typedef union <a href='#ppd_cplimit_u'>ppd_cplimit_u</a> ppd_cplimit_t;
|
|
</pre>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ppd_cptype_t'>ppd_cptype_t</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Custom Parameter Type </p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
typedef enum <a href='#ppd_cptype_e'>ppd_cptype_e</a> ppd_cptype_t;
|
|
</pre>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ppd_cpvalue_t'>ppd_cpvalue_t</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Custom Parameter Value </p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
typedef union <a href='#ppd_cpvalue_u'>ppd_cpvalue_u</a> ppd_cpvalue_t;
|
|
</pre>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppd_emul_t'>ppd_emul_t</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Emulators</p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
typedef struct <a href='#ppd_emul_s'>ppd_emul_s</a> ppd_emul_t;
|
|
</pre>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppd_file_t'>ppd_file_t</a></h3>
|
|
<h4>Description</h4>
|
|
<p>PPD File</p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
typedef struct <a href='#ppd_file_s'>ppd_file_s</a> ppd_file_t;
|
|
</pre>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppd_group_t'>ppd_group_t</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Groups</p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
typedef struct <a href='#ppd_group_s'>ppd_group_s</a> ppd_group_t;
|
|
</pre>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppd_option_t'>ppd_option_t</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Options</p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
typedef struct <a href='#ppd_option_s'>ppd_option_s</a> ppd_option_t;
|
|
</pre>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppd_profile_t'>ppd_profile_t</a></h3>
|
|
<h4>Description</h4>
|
|
<p>sRGB Color Profiles</p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
typedef struct <a href='#ppd_profile_s'>ppd_profile_s</a> ppd_profile_t;
|
|
</pre>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppd_section_t'>ppd_section_t</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Order dependency sections</p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
typedef enum <a href='#ppd_section_e'>ppd_section_e</a> ppd_section_t;
|
|
</pre>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppd_size_t'>ppd_size_t</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Page Sizes</p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
typedef struct <a href='#ppd_size_s'>ppd_size_s</a> ppd_size_t;
|
|
</pre>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><a name='ppd_ui_t'>ppd_ui_t</a></h3>
|
|
<h4>Description</h4>
|
|
<p>UI Types</p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
typedef enum <a href='#ppd_ui_e'>ppd_ui_e</a> ppd_ui_t;
|
|
</pre>
|
|
<!-- NEW PAGE -->
|
|
<h2 class='title'><a name='UNIONS'>Unions</a></h2>
|
|
<ul>
|
|
<li><a href='#ppd_cplimit_u'><tt>ppd_cplimit_u</tt></a> <span class='info'> CUPS 1.2 </span></li>
|
|
<li><a href='#ppd_cpvalue_u'><tt>ppd_cpvalue_u</tt></a> <span class='info'> CUPS 1.2 </span></li>
|
|
</ul>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ppd_cplimit_u'>ppd_cplimit_u</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Custom Parameter Limit </p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
union ppd_cplimit_u
|
|
{
|
|
float custom_curve;
|
|
int custom_int;
|
|
float custom_invcurve;
|
|
int custom_passcode;
|
|
int custom_password;
|
|
float custom_points;
|
|
float custom_real;
|
|
int custom_string;
|
|
};
|
|
</pre>
|
|
<h4>Members</h4>
|
|
<div class='table'><table align='center' border='1' width='80%'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>custom_curve</tt> </td><td>Gamma value</td></tr>
|
|
<tr><td><tt>custom_int</tt> </td><td>Integer value</td></tr>
|
|
<tr><td><tt>custom_invcurve</tt> </td><td>Gamma value</td></tr>
|
|
<tr><td><tt>custom_passcode</tt> </td><td>Passcode length</td></tr>
|
|
<tr><td><tt>custom_password</tt> </td><td>Password length</td></tr>
|
|
<tr><td><tt>custom_points</tt> </td><td>Measurement value</td></tr>
|
|
<tr><td><tt>custom_real</tt> </td><td>Real value</td></tr>
|
|
<tr><td><tt>custom_string</tt> </td><td>String length</td></tr>
|
|
</tbody></table></div>
|
|
<!-- NEW PAGE -->
|
|
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ppd_cpvalue_u'>ppd_cpvalue_u</a></h3>
|
|
<h4>Description</h4>
|
|
<p>Custom Parameter Value </p>
|
|
<h4>Definition</h4>
|
|
<pre>
|
|
union ppd_cpvalue_u
|
|
{
|
|
float custom_curve;
|
|
int custom_int;
|
|
float custom_invcurve;
|
|
char * custom_passcode;
|
|
char * custom_password;
|
|
float custom_points;
|
|
float custom_real;
|
|
char * custom_string;
|
|
};
|
|
</pre>
|
|
<h4>Members</h4>
|
|
<div class='table'><table align='center' border='1' width='80%'>
|
|
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><tt>custom_curve</tt> </td><td>Gamma value</td></tr>
|
|
<tr><td><tt>custom_int</tt> </td><td>Integer value</td></tr>
|
|
<tr><td><tt>custom_invcurve</tt> </td><td>Gamma value</td></tr>
|
|
<tr><td><tt>custom_passcode</tt> </td><td>Passcode value</td></tr>
|
|
<tr><td><tt>custom_password</tt> </td><td>Password value</td></tr>
|
|
<tr><td><tt>custom_points</tt> </td><td>Measurement value</td></tr>
|
|
<tr><td><tt>custom_real</tt> </td><td>Real value</td></tr>
|
|
<tr><td><tt>custom_string</tt> </td><td>String value</td></tr>
|
|
</tbody></table></div>
|
|
</body>
|
|
</html>
|