| <!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.4'> |
| <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 6649 2007-07-11 21:46:42Z mike $" |
| |
| PPD API introduction for the Common UNIX Printing System (CUPS). |
| |
| Copyright 2007 by Apple Inc. |
| Copyright 1997-2006 by Easy Software Products, all rights reserved. |
| |
| These coded instructions, statements, and computer programs are the |
| property of Apple Inc. 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 |
| file is missing or damaged, see the license at "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_conform_e'><tt>ppd_conform_e</tt></a> </li> |
| <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'><a name='ppd_conform_e'>ppd_conform_e</a></h3> |
| <h4>Description</h4> |
| <p> |
| <h4>Values</h4> |
| <div class='table'><table align='center' border='1' width='80%' summary='Values'> |
| <thead><tr><th>Name</th><th>Description</th></tr></thead> |
| <tbody> |
| <tr><td><tt>PPD_CONFORM_RELAXED</tt> </td><td>Relax whitespace and control char |
| </td></tr> |
| <tr><td><tt>PPD_CONFORM_STRICT</tt> </td><td>Require strict conformance |
| </td></tr> |
| </tbody></table></div> |
| <!-- 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 |
| <h4>Values</h4> |
| <div class='table'><table align='center' border='1' width='80%' summary='Values'> |
| <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 |
| <h4>Values</h4> |
| <div class='table'><table align='center' border='1' width='80%' summary='Values'> |
| <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 |
| <h4>Values</h4> |
| <div class='table'><table align='center' border='1' width='80%' summary='Values'> |
| <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... |
| <h4>Values</h4> |
| <div class='table'><table align='center' border='1' width='80%' summary='Values'> |
| <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 |
| <h4>Values</h4> |
| <div class='table'><table align='center' border='1' width='80%' summary='Values'> |
| <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='#ppdLocalizeIPPReason'><tt>ppdLocalizeIPPReason()</tt></a> <span class='info'> CUPS 1.3 </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. |
| <h4>Syntax</h4> |
| <p><tt> |
| void<br> |
| ppdClose( |
| <a href='#ppd_file_t'>ppd_file_t</a> * ppd); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| <h4>Syntax</h4> |
| <p><tt> |
| int<br> |
| 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); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| |
| |
| <h4>Syntax</h4> |
| <p><tt> |
| int<br> |
| 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); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| <h4>Syntax</h4> |
| <p><tt> |
| int<br> |
| ppdConflicts( |
| <a href='#ppd_file_t'>ppd_file_t</a> * ppd); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| <h4>Syntax</h4> |
| <p><tt> |
| int<br> |
| ppdEmit( |
| <a href='#ppd_file_t'>ppd_file_t</a> * ppd, |
| FILE * fp, |
| <a href='#ppd_section_t'>ppd_section_t</a> section); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| <p>When "limit" is non-zero, this function only emits options whose |
| OrderDependency value is greater than or equal to "min_order". |
| <p>When "limit" is zero, this function is identical to ppdEmit(). |
| |
| |
| <h4>Syntax</h4> |
| <p><tt> |
| int<br> |
| 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); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| <h4>Syntax</h4> |
| <p><tt> |
| int<br> |
| ppdEmitFd( |
| <a href='#ppd_file_t'>ppd_file_t</a> * ppd, |
| int fd, |
| <a href='#ppd_section_t'>ppd_section_t</a> section); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| <h4>Syntax</h4> |
| <p><tt> |
| int<br> |
| ppdEmitJCL( |
| <a href='#ppd_file_t'>ppd_file_t</a> * ppd, |
| FILE * fp, |
| int job_id, |
| const char * user, |
| const char * title); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| |
| |
| <h4>Syntax</h4> |
| <p><tt> |
| int<br> |
| ppdEmitJCLEnd( |
| <a href='#ppd_file_t'>ppd_file_t</a> * ppd, |
| FILE * fp); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| <p>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. |
| <p>The return string is allocated on the heap and should be freed using |
| free() when you are done with it. |
| |
| |
| <h4>Syntax</h4> |
| <p><tt> |
| char *<br> |
| ppdEmitString( |
| <a href='#ppd_file_t'>ppd_file_t</a> * ppd, |
| <a href='#ppd_section_t'>ppd_section_t</a> section, |
| float min_order); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| |
| |
| <h4>Syntax</h4> |
| <p><tt> |
| const char *<br> |
| ppdErrorString( |
| ppd_status_t status); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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... |
| |
| |
| <h4>Syntax</h4> |
| <p><tt> |
| <a href='#ppd_attr_t'>ppd_attr_t</a> *<br> |
| ppdFindAttr( |
| <a href='#ppd_file_t'>ppd_file_t</a> * ppd, |
| const char * name, |
| const char * spec); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| <h4>Syntax</h4> |
| <p><tt> |
| <a href='#ppd_choice_t'>ppd_choice_t</a> *<br> |
| ppdFindChoice( |
| <a href='#ppd_option_t'>ppd_option_t</a> * o, |
| const char * choice); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| |
| |
| <h4>Syntax</h4> |
| <p><tt> |
| <a href='#ppd_coption_t'>ppd_coption_t</a> *<br> |
| ppdFindCustomOption( |
| <a href='#ppd_file_t'>ppd_file_t</a> * ppd, |
| const char * keyword); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| |
| |
| <h4>Syntax</h4> |
| <p><tt> |
| <a href='#ppd_cparam_t'>ppd_cparam_t</a> *<br> |
| ppdFindCustomParam( |
| <a href='#ppd_coption_t'>ppd_coption_t</a> * opt, |
| const char * name); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| <h4>Syntax</h4> |
| <p><tt> |
| <a href='#ppd_choice_t'>ppd_choice_t</a> *<br> |
| ppdFindMarkedChoice( |
| <a href='#ppd_file_t'>ppd_file_t</a> * ppd, |
| const char * option); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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... |
| |
| |
| <h4>Syntax</h4> |
| <p><tt> |
| <a href='#ppd_attr_t'>ppd_attr_t</a> *<br> |
| ppdFindNextAttr( |
| <a href='#ppd_file_t'>ppd_file_t</a> * ppd, |
| const char * name, |
| const char * spec); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| <h4>Syntax</h4> |
| <p><tt> |
| <a href='#ppd_option_t'>ppd_option_t</a> *<br> |
| ppdFindOption( |
| <a href='#ppd_file_t'>ppd_file_t</a> * ppd, |
| const char * option); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| |
| |
| <h4>Syntax</h4> |
| <p><tt> |
| <a href='#ppd_cparam_t'>ppd_cparam_t</a> *<br> |
| ppdFirstCustomParam( |
| <a href='#ppd_coption_t'>ppd_coption_t</a> * opt); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| <p>Options are returned from all groups in sorted order. |
| |
| |
| <h4>Syntax</h4> |
| <p><tt> |
| <a href='#ppd_option_t'>ppd_option_t</a> *<br> |
| ppdFirstOption( |
| <a href='#ppd_file_t'>ppd_file_t</a> * ppd); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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... |
| <h4>Syntax</h4> |
| <p><tt> |
| int<br> |
| ppdIsMarked( |
| <a href='#ppd_file_t'>ppd_file_t</a> * ppd, |
| const char * option, |
| const char * choice); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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*(). |
| |
| |
| <h4>Syntax</h4> |
| <p><tt> |
| ppd_status_t<br> |
| ppdLastError( |
| int * line); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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>All groups, options, and choices are localized, as are ICC profile |
| descriptions, printer presets, and custom option parameters. Each |
| localized string uses the UTF-8 character encoding. |
| |
| |
| <h4>Syntax</h4> |
| <p><tt> |
| int<br> |
| ppdLocalize( |
| <a href='#ppd_file_t'>ppd_file_t</a> * ppd); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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'><span class='info'> CUPS 1.3 </span><a name='ppdLocalizeIPPReason'>ppdLocalizeIPPReason()</a></h3> |
| <h4>Description</h4> |
| <p>Get the localized version of a cupsIPPReason |
| attribute. |
| <p>This function uses the current locale to find the corresponding reason |
| text or URI from the attribute value. If "scheme" is NULL or "text", |
| the returned value contains human-readable (UTF-8) text from the translation |
| string or attribute value. Otherwise the corresponding URI is returned. |
| <p>If no value of the requested scheme can be found, NULL is returned. |
| |
| |
| <h4>Syntax</h4> |
| <p><tt> |
| const char *<br> |
| ppdLocalizeIPPReason( |
| <a href='#ppd_file_t'>ppd_file_t</a> * ppd, |
| const char * reason, |
| const char * scheme, |
| char * buffer, |
| size_t bufsize); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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>reason</tt></td><td>IPP reason keyword to look up</td></tr> |
| <tr><td><tt>scheme</tt></td><td>URI scheme or NULL for text</td></tr> |
| <tr><td><tt>buffer</tt></td><td>Value buffer</td></tr> |
| <tr><td><tt>bufsize</tt></td><td>Size of value buffer</td></tr> |
| </tbody></table></div> |
| <h4>Returns</h4> |
| <p>Value or NULL if not found</p> |
| <!-- NEW PAGE --> |
| <h3 class='title'><a name='ppdMarkDefaults'>ppdMarkDefaults()</a></h3> |
| <h4>Description</h4> |
| <p>Mark all default options in the PPD file. |
| <h4>Syntax</h4> |
| <p><tt> |
| void<br> |
| ppdMarkDefaults( |
| <a href='#ppd_file_t'>ppd_file_t</a> * ppd); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| <p>Notes: |
| <p>-1 is returned if the given option would conflict with any currently |
| selected option. |
| <h4>Syntax</h4> |
| <p><tt> |
| int<br> |
| ppdMarkOption( |
| <a href='#ppd_file_t'>ppd_file_t</a> * ppd, |
| const char * option, |
| const char * choice); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| |
| |
| <h4>Syntax</h4> |
| <p><tt> |
| <a href='#ppd_cparam_t'>ppd_cparam_t</a> *<br> |
| ppdNextCustomParam( |
| <a href='#ppd_coption_t'>ppd_coption_t</a> * opt); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| <p>Options are returned from all groups in sorted order. |
| |
| |
| <h4>Syntax</h4> |
| <p><tt> |
| <a href='#ppd_option_t'>ppd_option_t</a> *<br> |
| ppdNextOption( |
| <a href='#ppd_file_t'>ppd_file_t</a> * ppd); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| <h4>Syntax</h4> |
| <p><tt> |
| <a href='#ppd_file_t'>ppd_file_t</a> *<br> |
| ppdOpen( |
| FILE * fp); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| |
| |
| <h4>Syntax</h4> |
| <p><tt> |
| <a href='#ppd_file_t'>ppd_file_t</a> *<br> |
| ppdOpen2( |
| cups_file_t * fp); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| <h4>Syntax</h4> |
| <p><tt> |
| <a href='#ppd_file_t'>ppd_file_t</a> *<br> |
| ppdOpenFd( |
| int fd); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| <h4>Syntax</h4> |
| <p><tt> |
| <a href='#ppd_file_t'>ppd_file_t</a> *<br> |
| ppdOpenFile( |
| const char * filename); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| <h4>Syntax</h4> |
| <p><tt> |
| float<br> |
| ppdPageLength( |
| <a href='#ppd_file_t'>ppd_file_t</a> * ppd, |
| const char * name); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| <h4>Syntax</h4> |
| <p><tt> |
| <a href='#ppd_size_t'>ppd_size_t</a> *<br> |
| ppdPageSize( |
| <a href='#ppd_file_t'>ppd_file_t</a> * ppd, |
| const char * name); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| <h4>Syntax</h4> |
| <p><tt> |
| float<br> |
| ppdPageWidth( |
| <a href='#ppd_file_t'>ppd_file_t</a> * ppd, |
| const char * name); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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. |
| |
| |
| <h4>Syntax</h4> |
| <p><tt> |
| void<br> |
| ppdSetConformance( |
| <a href='#ppd_conform_t'>ppd_conform_t</a> c); |
| </tt></p> |
| <h4>Arguments</h4> |
| <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'> |
| <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 |
| <h4>Definition</h4> |
| <p><tt> |
| struct ppd_attr_s<br> |
| {<br> |
| char name[PPD_MAX_NAME];<br> |
| char spec[PPD_MAX_NAME];<br> |
| char text[PPD_MAX_TEXT];<br> |
| char * value;<br> |
| };</tt></p> |
| <h4>Members</h4> |
| <div class='table'><table align='center' border='1' width='80%' summary='Members'> |
| <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 |
| <h4>Definition</h4> |
| <p><tt> |
| struct ppd_choice_s<br> |
| {<br> |
| char choice[PPD_MAX_NAME];<br> |
| char * code;<br> |
| char marked;<br> |
| <a href='#ppd_option_t'>ppd_option_t</a> * option;<br> |
| char text[PPD_MAX_TEXT];<br> |
| };</tt></p> |
| <h4>Members</h4> |
| <div class='table'><table align='center' border='1' width='80%' summary='Members'> |
| <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 |
| <h4>Definition</h4> |
| <p><tt> |
| struct ppd_coption_s<br> |
| {<br> |
| char keyword[PPD_MAX_NAME];<br> |
| int marked;<br> |
| <a href='#ppd_option_t'>ppd_option_t</a> * option;<br> |
| cups_array_t * params;<br> |
| };</tt></p> |
| <h4>Members</h4> |
| <div class='table'><table align='center' border='1' width='80%' summary='Members'> |
| <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 |
| <h4>Definition</h4> |
| <p><tt> |
| struct ppd_cparam_s<br> |
| {<br> |
| <a href='#ppd_cpvalue_t'>ppd_cpvalue_t</a> current;<br> |
| <a href='#ppd_cplimit_t'>ppd_cplimit_t</a> minimum, maximum;<br> |
| char name[PPD_MAX_NAME];<br> |
| int order;<br> |
| char text[PPD_MAX_TEXT];<br> |
| <a href='#ppd_cptype_t'>ppd_cptype_t</a> type;<br> |
| };</tt></p> |
| <h4>Members</h4> |
| <div class='table'><table align='center' border='1' width='80%' summary='Members'> |
| <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 |
| <h4>Definition</h4> |
| <p><tt> |
| struct ppd_emul_s<br> |
| {<br> |
| char name[PPD_MAX_NAME];<br> |
| char * start;<br> |
| char * stop;<br> |
| };</tt></p> |
| <h4>Members</h4> |
| <div class='table'><table align='center' border='1' width='80%' summary='Members'> |
| <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 |
| <h4>Definition</h4> |
| <p><tt> |
| struct ppd_file_s<br> |
| {<br> |
| int accurate_screens;<br> |
| <a href='#ppd_attr_t'>ppd_attr_t</a> ** attrs;<br> |
| int color_device;<br> |
| ppd_cs_t colorspace;<br> |
| <a href='#ppd_const_t'>ppd_const_t</a> * consts;<br> |
| int contone_only;<br> |
| cups_array_t * coptions;<br> |
| int cur_attr;<br> |
| float custom_margins[4];<br> |
| float custom_max[2];<br> |
| float custom_min[2];<br> |
| <a href='#ppd_emul_t'>ppd_emul_t</a> * emulations;<br> |
| char ** filters;<br> |
| int flip_duplex;<br> |
| char ** fonts;<br> |
| <a href='#ppd_group_t'>ppd_group_t</a> * groups;<br> |
| char * jcl_begin;<br> |
| char * jcl_end;<br> |
| char * jcl_ps;<br> |
| int landscape;<br> |
| char * lang_encoding;<br> |
| char * lang_version;<br> |
| int language_level;<br> |
| int manual_copies;<br> |
| char * manufacturer;<br> |
| cups_array_t * marked;<br> |
| int model_number;<br> |
| char * modelname;<br> |
| char * nickname;<br> |
| int num_attrs;<br> |
| int num_consts;<br> |
| int num_emulations;<br> |
| int num_filters;<br> |
| int num_fonts;<br> |
| int num_groups;<br> |
| int num_profiles;<br> |
| int num_sizes;<br> |
| cups_array_t * options;<br> |
| char * patches;<br> |
| char * pcfilename;<br> |
| char * product;<br> |
| <a href='#ppd_profile_t'>ppd_profile_t</a> * profiles;<br> |
| char * protocols;<br> |
| char * shortnickname;<br> |
| <a href='#ppd_size_t'>ppd_size_t</a> * sizes;<br> |
| cups_array_t * sorted_attrs;<br> |
| int throughput;<br> |
| char * ttrasterizer;<br> |
| int variable_sizes;<br> |
| };</tt></p> |
| <h4>Members</h4> |
| <div class='table'><table align='center' border='1' width='80%' summary='Members'> |
| <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'> DEPRECATED </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>marked</tt> <span class='info'> CUPS 1.3 </span></td><td>Marked choices @private@ |
| </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 |
| <h4>Definition</h4> |
| <p><tt> |
| struct ppd_group_s<br> |
| {<br> |
| char text[PPD_MAX_TEXT - PPD_MAX_NAME];<br> |
| char name[PPD_MAX_NAME];<br> |
| int num_options;<br> |
| int num_subgroups;<br> |
| <a href='#ppd_option_t'>ppd_option_t</a> * options;<br> |
| struct <a href='#ppd_group_s'>ppd_group_s</a> * subgroups;<br> |
| };</tt></p> |
| <h4>Members</h4> |
| <div class='table'><table align='center' border='1' width='80%' summary='Members'> |
| <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 |
| <h4>Definition</h4> |
| <p><tt> |
| struct ppd_option_s<br> |
| {<br> |
| <a href='#ppd_choice_t'>ppd_choice_t</a> * choices;<br> |
| char conflicted;<br> |
| char defchoice[PPD_MAX_NAME];<br> |
| char keyword[PPD_MAX_NAME];<br> |
| int num_choices;<br> |
| float order;<br> |
| <a href='#ppd_section_t'>ppd_section_t</a> section;<br> |
| char text[PPD_MAX_TEXT];<br> |
| <a href='#ppd_ui_t'>ppd_ui_t</a> ui;<br> |
| };</tt></p> |
| <h4>Members</h4> |
| <div class='table'><table align='center' border='1' width='80%' summary='Members'> |
| <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 |
| <h4>Definition</h4> |
| <p><tt> |
| struct ppd_profile_s<br> |
| {<br> |
| float density;<br> |
| float gamma;<br> |
| float matrix[3][3];<br> |
| char media_type[PPD_MAX_NAME];<br> |
| char resolution[PPD_MAX_NAME];<br> |
| };</tt></p> |
| <h4>Members</h4> |
| <div class='table'><table align='center' border='1' width='80%' summary='Members'> |
| <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 |
| <h4>Definition</h4> |
| <p><tt> |
| struct ppd_size_s<br> |
| {<br> |
| float bottom;<br> |
| float left;<br> |
| float length;<br> |
| int marked;<br> |
| char name[PPD_MAX_NAME];<br> |
| float right;<br> |
| float top;<br> |
| float width;<br> |
| };</tt></p> |
| <h4>Members</h4> |
| <div class='table'><table align='center' border='1' width='80%' summary='Members'> |
| <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 |
| <h4>Definition</h4> |
| <p><tt> |
| typedef struct <a href='#ppd_attr_s'>ppd_attr_s</a> ppd_attr_t; |
| </tt></p> |
| <!-- NEW PAGE --> |
| <h3 class='title'><a name='ppd_choice_t'>ppd_choice_t</a></h3> |
| <h4>Description</h4> |
| <p>Option choices |
| <h4>Definition</h4> |
| <p><tt> |
| typedef struct <a href='#ppd_choice_s'>ppd_choice_s</a> ppd_choice_t; |
| </tt></p> |
| <!-- NEW PAGE --> |
| <h3 class='title'><a name='ppd_const_t'>ppd_const_t</a></h3> |
| <h4>Description</h4> |
| <p>Constraints |
| <h4>Definition</h4> |
| <p><tt> |
| typedef struct ppd_const_t; |
| </tt></p> |
| <!-- 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 |
| <h4>Definition</h4> |
| <p><tt> |
| typedef struct <a href='#ppd_coption_s'>ppd_coption_s</a> ppd_coption_t; |
| </tt></p> |
| <!-- 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 |
| <h4>Definition</h4> |
| <p><tt> |
| typedef struct <a href='#ppd_cparam_s'>ppd_cparam_s</a> ppd_cparam_t; |
| </tt></p> |
| <!-- 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 |
| <h4>Definition</h4> |
| <p><tt> |
| typedef union <a href='#ppd_cplimit_u'>ppd_cplimit_u</a> ppd_cplimit_t; |
| </tt></p> |
| <!-- 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 |
| <h4>Definition</h4> |
| <p><tt> |
| typedef enum <a href='#ppd_cptype_e'>ppd_cptype_e</a> ppd_cptype_t; |
| </tt></p> |
| <!-- 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 |
| <h4>Definition</h4> |
| <p><tt> |
| typedef union <a href='#ppd_cpvalue_u'>ppd_cpvalue_u</a> ppd_cpvalue_t; |
| </tt></p> |
| <!-- NEW PAGE --> |
| <h3 class='title'><a name='ppd_emul_t'>ppd_emul_t</a></h3> |
| <h4>Description</h4> |
| <p>Emulators |
| <h4>Definition</h4> |
| <p><tt> |
| typedef struct <a href='#ppd_emul_s'>ppd_emul_s</a> ppd_emul_t; |
| </tt></p> |
| <!-- NEW PAGE --> |
| <h3 class='title'><a name='ppd_file_t'>ppd_file_t</a></h3> |
| <h4>Description</h4> |
| <p>PPD File |
| <h4>Definition</h4> |
| <p><tt> |
| typedef struct <a href='#ppd_file_s'>ppd_file_s</a> ppd_file_t; |
| </tt></p> |
| <!-- NEW PAGE --> |
| <h3 class='title'><a name='ppd_group_t'>ppd_group_t</a></h3> |
| <h4>Description</h4> |
| <p>Groups |
| <h4>Definition</h4> |
| <p><tt> |
| typedef struct <a href='#ppd_group_s'>ppd_group_s</a> ppd_group_t; |
| </tt></p> |
| <!-- NEW PAGE --> |
| <h3 class='title'><a name='ppd_option_t'>ppd_option_t</a></h3> |
| <h4>Description</h4> |
| <p>Options |
| <h4>Definition</h4> |
| <p><tt> |
| typedef struct <a href='#ppd_option_s'>ppd_option_s</a> ppd_option_t; |
| </tt></p> |
| <!-- NEW PAGE --> |
| <h3 class='title'><a name='ppd_profile_t'>ppd_profile_t</a></h3> |
| <h4>Description</h4> |
| <p>sRGB Color Profiles |
| <h4>Definition</h4> |
| <p><tt> |
| typedef struct <a href='#ppd_profile_s'>ppd_profile_s</a> ppd_profile_t; |
| </tt></p> |
| <!-- NEW PAGE --> |
| <h3 class='title'><a name='ppd_section_t'>ppd_section_t</a></h3> |
| <h4>Description</h4> |
| <p>Order dependency sections |
| <h4>Definition</h4> |
| <p><tt> |
| typedef enum <a href='#ppd_section_e'>ppd_section_e</a> ppd_section_t; |
| </tt></p> |
| <!-- NEW PAGE --> |
| <h3 class='title'><a name='ppd_size_t'>ppd_size_t</a></h3> |
| <h4>Description</h4> |
| <p>Page Sizes |
| <h4>Definition</h4> |
| <p><tt> |
| typedef struct <a href='#ppd_size_s'>ppd_size_s</a> ppd_size_t; |
| </tt></p> |
| <!-- NEW PAGE --> |
| <h3 class='title'><a name='ppd_ui_t'>ppd_ui_t</a></h3> |
| <h4>Description</h4> |
| <p>UI Types |
| <h4>Definition</h4> |
| <p><tt> |
| typedef enum <a href='#ppd_ui_e'>ppd_ui_e</a> ppd_ui_t; |
| </tt></p> |
| <!-- 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 |
| <h4>Definition</h4> |
| <p><tt> |
| union ppd_cplimit_u<br> |
| {<br> |
| float custom_curve;<br> |
| int custom_int;<br> |
| float custom_invcurve;<br> |
| int custom_passcode;<br> |
| int custom_password;<br> |
| float custom_points;<br> |
| float custom_real;<br> |
| int custom_string;<br> |
| };</tt></p> |
| <h4>Members</h4> |
| <div class='table'><table align='center' border='1' width='80%' summary='Members'> |
| <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 |
| <h4>Definition</h4> |
| <p><tt> |
| union ppd_cpvalue_u<br> |
| {<br> |
| float custom_curve;<br> |
| int custom_int;<br> |
| float custom_invcurve;<br> |
| char * custom_passcode;<br> |
| char * custom_password;<br> |
| float custom_points;<br> |
| float custom_real;<br> |
| char * custom_string;<br> |
| };</tt></p> |
| <h4>Members</h4> |
| <div class='table'><table align='center' border='1' width='80%' summary='Members'> |
| <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> |