]> git.ipfire.org Git - thirdparty/cups.git/blame - doc/help/api-ppd.html
Merge changes from CUPS 1.4svn-r7696.
[thirdparty/cups.git] / doc / help / api-ppd.html
CommitLineData
ef416fc2 1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
2<html>
3<!-- SECTION: Programming -->
4<head>
5a738aea
MS
5<title>PPD API</title>
6<meta name="keywords" content="Programming">
7<meta name="creator" content="Mini-XML v2.5">
8<style type="text/css"><!--
9BODY {
10 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
11}
12
13H1, H2, H3, H4, H5, H6, P, TD, TH {
14 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
15}
16
17KBD {
18 font-family: monaco, courier, monospace;
19 font-weight: bold;
20}
21
22PRE {
23 font-family: monaco, courier, monospace;
24}
25
26PRE.command {
27 margin-left: 36pt;
28}
29
30PRE.example {
31 background: #eeeeee;
32 border: dotted thin #999999;
33 margin-left: 36pt;
34 padding: 10px;
35}
36
37PRE.command EM, PRE.example EM {
38 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
39}
40
41P.command {
42 font-family: monaco, courier, monospace;
43 margin-left: 36pt;
44}
45
46P.formula {
47 font-style: italic;
48 margin-left: 36pt;
49}
50
51BLOCKQUOTE {
52 background: #cccccc;
53 border: solid thin #999999;
54 padding: 10pt;
55}
56
57A:link, A:visited {
568fa3fa 58 font-weight: normal;
5a738aea 59 text-decoration: none;
5a738aea
MS
60}
61
62A:link:hover, A:visited:hover, A:active {
63 text-decoration: underline;
5a738aea
MS
64}
65
66SUB, SUP {
67 font-size: 50%;
68}
69
70DIV.table TABLE {
71 border: solid thin #999999;
72 border-collapse: collapse;
73 border-spacing: 0;
74 margin-left: auto;
75 margin-right: auto;
76}
77
78DIV.table CAPTION {
79 caption-side: top;
80 font-size: 120%;
81 font-style: italic;
82 font-weight: bold;
83 margin-left: auto;
84 margin-right: auto;
85}
86
87DIV.table TABLE TD {
88 border: solid thin #cccccc;
89 padding-top: 5pt;
90}
91
92DIV.table TABLE TH {
93 background: #cccccc;
94 border: none;
95 border-bottom: solid thin #999999;
96}
97
98DIV.figure TABLE {
99 margin-left: auto;
100 margin-right: auto;
101}
102
103DIV.figure CAPTION {
104 caption-side: bottom;
105 font-size: 120%;
106 font-style: italic;
107 font-weight: bold;
108 margin-left: auto;
109 margin-right: auto;
110}
111
112TH.label {
113 padding-top: 5pt;
114 text-align: right;
115 vertical-align: top;
116}
117
118HR {
119 border: solid thin;
120}
121
122SPAN.info {
123 background: #000000;
124 border: thin solid #000000;
125 color: #ffffff;
126 font-size: 80%;
127 font-style: italic;
128 font-weight: bold;
129 white-space: nowrap;
130}
131
132H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
133 float: right;
134 font-size: 100%;
135}
136
137H2.title, H3.title {
138 border-bottom: solid 2pt #000000;
139}
140
141DT {
142 margin-left: 36pt;
143 margin-top: 12pt;
144}
145
146DD {
147 margin-left: 54pt;
148}
149
150DL.category DT {
151 font-weight: bold;
152}
153
154P.summary {
155 margin-left: 36pt;
156 font-family: monaco, courier, monospace;
157}
158
159SPAN.message {
160 font-style: italic;
161 font-size: smaller;
162}
163
164DIV.summary TABLE {
165 border: solid thin #999999;
166 border-collapse: collapse;
167 border-spacing: 0;
168 margin: 10px;
169}
170
171DIV.summary TABLE TD, DIV.summary TABLE TH {
172 border: solid thin #999999;
173 padding: 5px;
174 text-align: left;
175 vertical-align: top;
176}
177
178DIV.summary TABLE THEAD TH {
179 background: #eeeeee;
180}
181
182/* API documentation styles... */
183div.body h1 {
184 margin: 0;
185}
186div.body h2 {
187 margin-top: 1.5em;
188}
189div.body h3, div.body h4, div.body h5 {
190 margin-bottom: 0.5em;
191 margin-top: 1.5em;
192}
193.class, .enumeration, .function, .struct, .typedef, .union {
194 border-bottom: solid thin #999999;
195 margin-bottom: 0;
196 margin-top: 2em;
197}
198.description {
199 margin-top: 0.5em;
200}
201code, p.code, pre, ul.code li {
202 font-family: monaco, courier, monospace;
203 font-size: 90%;
204}
205ul.code, ul.contents, ul.subcontents {
206 list-style-type: none;
207 margin: 0;
208 padding-left: 0;
209}
210ul.code li {
211 margin: 0;
212}
213ul.contents > li {
214 margin-top: 1em;
215}
216ul.contents li ul.code, ul.contents li ul.subcontents {
217 padding-left: 2em;
218}
219div.body dl {
220 margin-left: 0;
221 margin-top: 0;
222}
223div.body dt {
224 font-style: italic;
225 margin-left: 0;
226 margin-top: 0;
227}
228div.body dd {
229 margin-bottom: 0.5em;
230}
231
232/* This is just for the HTML files generated with the framedhelp target */
233div.contents {
234 background: #e8e8e8;
235 border: solid thin black;
236 padding: 10px;
237}
238div.contents h1 {
239 font-size: 110%;
240}
241div.contents h2 {
242 font-size: 100%;
243}
244div.contents ul.contents {
245 font-size: 80%;
246}
ac884b6a
MS
247div.contents ul.subcontents li {
248 margin-left: 1em;
249 text-indent: -1em;
250}
5a738aea 251--></style>
ef416fc2 252</head>
253<body>
5a738aea 254<div class='body'>
ef416fc2 255<!--
75bd9771 256 "$Id: api-ppd.header 7616 2008-05-28 00:34:13Z mike $"
5a738aea
MS
257
258 PPD API header for the Common UNIX Printing System (CUPS).
259
260 Copyright 2008 by Apple Inc.
261
262 These coded instructions, statements, and computer programs are the
263 property of Apple Inc. and are protected by Federal copyright
264 law. Distribution and use rights are outlined in the file "LICENSE.txt"
265 which should have been included with this file. If this file is
266 file is missing or damaged, see the license at "http://www.cups.org/".
267-->
268
269<h1 class="title">PPD API</h1>
270
271<div class='summary'><table summary='General Information'>
272<thead>
273<tr>
274 <th>Header</th>
275 <th>cups/ppd.h</th>
276</tr>
277</thead>
278<tbody>
279<tr>
280 <th>Library</th>
281 <td>-lcups</td>
282</tr>
283<tr>
284 <th>See Also</th>
285 <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a><br>
286 Programming: <a href='api-cups.html' target='_top'>CUPS API</a><br>
79e1d494 287 Specifications: <a href='spec-ppd.html' target='_top'>CUPS PPD Extensions</a></td>
5a738aea
MS
288</tr>
289</tbody>
290</table></div>
291<h2 class="title">Contents</h2>
292<ul class="contents">
293</li>
294<li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
295<li><a href="#LOADING">Loading a PPD File</a></li>
296<li><a href="#OPTIONS_AND_GROUPS">Options and Groups</a></li>
297<li><a href="#CONSTRAINTS">Constraints</a></li>
298<li><a href="#PAGE_SIZES">Page Sizes</a></li>
299<li><a href="#ATTRIBUTES">Attributes</a></li>
300</ul></li>
301<li><a href="#FUNCTIONS">Functions</a><ul class="code">
302<li><a href="#cupsMarkOptions" title="Mark command-line options in a PPD file.">cupsMarkOptions</a></li>
303<li><a href="#ppdClose" title="Free all memory used by the PPD file.">ppdClose</a></li>
304<li><a href="#ppdCollect" title="Collect all marked options that reside in the specified
305section.">ppdCollect</a></li>
306<li><a href="#ppdCollect2" title="Collect all marked options that reside in the
307specified section and minimum order.">ppdCollect2</a></li>
308<li><a href="#ppdConflicts" title="Check to see if there are any conflicts among the
309marked option choices.">ppdConflicts</a></li>
310<li><a href="#ppdEmit" title="Emit code for marked options to a file.">ppdEmit</a></li>
311<li><a href="#ppdEmitAfterOrder" title="Emit a subset of the code for marked options to a file.">ppdEmitAfterOrder</a></li>
312<li><a href="#ppdEmitFd" title="Emit code for marked options to a file.">ppdEmitFd</a></li>
313<li><a href="#ppdEmitJCL" title="Emit code for JCL options to a file.">ppdEmitJCL</a></li>
314<li><a href="#ppdEmitJCLEnd" title="Emit JCLEnd code to a file.">ppdEmitJCLEnd</a></li>
315<li><a href="#ppdEmitString" title="Get a string containing the code for marked options.">ppdEmitString</a></li>
316<li><a href="#ppdErrorString" title="Returns the text assocated with a status.">ppdErrorString</a></li>
317<li><a href="#ppdFindAttr" title="Find the first matching attribute.">ppdFindAttr</a></li>
318<li><a href="#ppdFindChoice" title="Return a pointer to an option choice.">ppdFindChoice</a></li>
319<li><a href="#ppdFindCustomOption" title="Find a custom option.">ppdFindCustomOption</a></li>
320<li><a href="#ppdFindCustomParam" title="Find a parameter for a custom option.">ppdFindCustomParam</a></li>
321<li><a href="#ppdFindMarkedChoice" title="Return the marked choice for the specified option.">ppdFindMarkedChoice</a></li>
322<li><a href="#ppdFindNextAttr" title="Find the next matching attribute.">ppdFindNextAttr</a></li>
323<li><a href="#ppdFindOption" title="Return a pointer to the specified option.">ppdFindOption</a></li>
324<li><a href="#ppdFirstCustomParam" title="Return the first parameter for a custom option.">ppdFirstCustomParam</a></li>
325<li><a href="#ppdFirstOption" title="Return the first option in the PPD file.">ppdFirstOption</a></li>
326<li><a href="#ppdIsMarked" title="Check to see if an option is marked.">ppdIsMarked</a></li>
327<li><a href="#ppdLastError" title="Return the status from the last ppdOpen*().">ppdLastError</a></li>
328<li><a href="#ppdLocalize" title="Localize the PPD file to the current locale.">ppdLocalize</a></li>
75bd9771 329<li><a href="#ppdLocalizeAttr" title="Localize an attribute.">ppdLocalizeAttr</a></li>
5a738aea
MS
330<li><a href="#ppdLocalizeIPPReason" title="Get the localized version of a cupsIPPReason
331attribute.">ppdLocalizeIPPReason</a></li>
332<li><a href="#ppdLocalizeMarkerName" title="Get the localized version of a marker-names
333attribute value.">ppdLocalizeMarkerName</a></li>
334<li><a href="#ppdMarkDefaults" title="Mark all default options in the PPD file.">ppdMarkDefaults</a></li>
335<li><a href="#ppdMarkOption" title="Mark an option in a PPD file.">ppdMarkOption</a></li>
336<li><a href="#ppdNextCustomParam" title="Return the next parameter for a custom option.">ppdNextCustomParam</a></li>
337<li><a href="#ppdNextOption" title="Return the next option in the PPD file.">ppdNextOption</a></li>
338<li><a href="#ppdOpen" title="Read a PPD file into memory.">ppdOpen</a></li>
339<li><a href="#ppdOpen2" title="Read a PPD file into memory.">ppdOpen2</a></li>
340<li><a href="#ppdOpenFd" title="Read a PPD file into memory.">ppdOpenFd</a></li>
341<li><a href="#ppdOpenFile" title="Read a PPD file into memory.">ppdOpenFile</a></li>
342<li><a href="#ppdPageLength" title="Get the page length for the given size.">ppdPageLength</a></li>
343<li><a href="#ppdPageSize" title="Get the page size record for the given size.">ppdPageSize</a></li>
344<li><a href="#ppdPageWidth" title="Get the page width for the given size.">ppdPageWidth</a></li>
345<li><a href="#ppdSetConformance" title="Set the conformance level for PPD files.">ppdSetConformance</a></li>
346</ul>
347<li><a href="#TYPES">Data Types</a><ul class="code">
348 <li><a href="#ppd_attr_t" title="PPD Attribute Structure ">ppd_attr_t</a></li>
349 <li><a href="#ppd_choice_t" title="Option choices">ppd_choice_t</a></li>
350 <li><a href="#ppd_conform_t" title="Conformance Levels ">ppd_conform_t</a></li>
351 <li><a href="#ppd_const_t" title="Constraints">ppd_const_t</a></li>
352 <li><a href="#ppd_coption_t" title="Custom Option ">ppd_coption_t</a></li>
353 <li><a href="#ppd_cparam_t" title="Custom Parameter ">ppd_cparam_t</a></li>
354 <li><a href="#ppd_cplimit_t" title="Custom Parameter Limit ">ppd_cplimit_t</a></li>
355 <li><a href="#ppd_cptype_t" title="Custom Parameter Type ">ppd_cptype_t</a></li>
356 <li><a href="#ppd_cpvalue_t" title="Custom Parameter Value ">ppd_cpvalue_t</a></li>
79e1d494 357 <li><a href="#ppd_cs_t" title="Colorspaces">ppd_cs_t</a></li>
5a738aea
MS
358 <li><a href="#ppd_emul_t" title="Emulators">ppd_emul_t</a></li>
359 <li><a href="#ppd_file_t" title="PPD File">ppd_file_t</a></li>
360 <li><a href="#ppd_group_t" title="Groups">ppd_group_t</a></li>
361 <li><a href="#ppd_option_t" title="Options">ppd_option_t</a></li>
362 <li><a href="#ppd_profile_t" title="sRGB Color Profiles">ppd_profile_t</a></li>
363 <li><a href="#ppd_section_t" title="Order dependency sections">ppd_section_t</a></li>
364 <li><a href="#ppd_size_t" title="Page Sizes">ppd_size_t</a></li>
79e1d494 365 <li><a href="#ppd_status_t" title="Types and structures...">ppd_status_t</a></li>
5a738aea
MS
366 <li><a href="#ppd_ui_t" title="UI Types">ppd_ui_t</a></li>
367</ul></li>
368<li><a href="#STRUCTURES">Structures</a><ul class="code">
369 <li><a href="#ppd_attr_s" title="PPD Attribute Structure ">ppd_attr_s</a></li>
370 <li><a href="#ppd_choice_s" title="Option choices">ppd_choice_s</a></li>
371 <li><a href="#ppd_const_s" title="Constraints">ppd_const_s</a></li>
372 <li><a href="#ppd_coption_s" title="Custom Option ">ppd_coption_s</a></li>
373 <li><a href="#ppd_cparam_s" title="Custom Parameter ">ppd_cparam_s</a></li>
374 <li><a href="#ppd_emul_s" title="Emulators">ppd_emul_s</a></li>
375 <li><a href="#ppd_file_s" title="PPD File">ppd_file_s</a></li>
376 <li><a href="#ppd_group_s" title="Groups">ppd_group_s</a></li>
377 <li><a href="#ppd_option_s" title="Options">ppd_option_s</a></li>
378 <li><a href="#ppd_profile_s" title="sRGB Color Profiles">ppd_profile_s</a></li>
379 <li><a href="#ppd_size_s" title="Page Sizes">ppd_size_s</a></li>
380</ul></li>
381<li><a href="#UNIONS">Unions</a><ul class="code">
382 <li><a href="#ppd_cplimit_u" title="Custom Parameter Limit ">ppd_cplimit_u</a></li>
383 <li><a href="#ppd_cpvalue_u" title="Custom Parameter Value ">ppd_cpvalue_u</a></li>
384</ul></li>
385<li><a href="#ENUMERATIONS">Constants</a><ul class="code">
386 <li><a href="#ppd_conform_e" title="">ppd_conform_e</a></li>
387 <li><a href="#ppd_cptype_e" title="Custom Parameter Type ">ppd_cptype_e</a></li>
388 <li><a href="#ppd_cs_e" title="Colorspaces">ppd_cs_e</a></li>
389 <li><a href="#ppd_section_e" title="Order dependency sections">ppd_section_e</a></li>
390 <li><a href="#ppd_status_e" title="Types and structures...">ppd_status_e</a></li>
391 <li><a href="#ppd_ui_e" title="UI Types">ppd_ui_e</a></li>
392</ul></li>
393</ul>
394<!--
75bd9771 395 "$Id: api-ppd.shtml 7616 2008-05-28 00:34:13Z mike $"
ef416fc2 396
397 PPD API introduction for the Common UNIX Printing System (CUPS).
398
79e1d494 399 Copyright 2007-2008 by Apple Inc.
bc44d920 400 Copyright 1997-2006 by Easy Software Products, all rights reserved.
ef416fc2 401
402 These coded instructions, statements, and computer programs are the
bc44d920 403 property of Apple Inc. and are protected by Federal copyright
404 law. Distribution and use rights are outlined in the file "LICENSE.txt"
405 which should have been included with this file. If this file is
406 file is missing or damaged, see the license at "http://www.cups.org/".
ef416fc2 407-->
408
5a738aea 409<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
ef416fc2 410
5a738aea
MS
411<p>The CUPS PPD API provides read-only access the data in PostScript Printer
412Description ("PPD") files which are used for all printers with a driver. With
79e1d494
MS
413it you can obtain the data necessary to display printer options to users, mark
414option choices and check for conflicting choices, and output marked choices in
415PostScript output. The <a href="#ppd_file_t"><code>ppd_file_t</code></a>
416structure contains all of the information in a PPD file.</p>
417
418<blockquote><b>Note:</b>
419
420<p>The CUPS PPD API uses the terms "option" and "choice" instead of the Adobe
421terms "MainKeyword" and "OptionKeyword" to refer to specific printer options and
422features. CUPS also treats option ("MainKeyword") and choice ("OptionKeyword")
423values as case-insensitive strings, so option "InputSlot" and choice "Upper"
424are equivalent to "inputslot" and "upper", respectively.</p>
425</blockquote>
ef416fc2 426
5a738aea 427<h3><a name="LOADING">Loading a PPD File</a></h3>
ef416fc2 428
5a738aea
MS
429<p>The <a href="#ppdOpenFile"><code>ppdOpenFile</code></a> function "opens" a
430PPD file and loads it into memory. For example, the following code opens the
431current printer's PPD file in a CUPS filter:</p>
ef416fc2 432
5a738aea
MS
433<pre class="example">
434#include &lt;cups/ppd.h&gt;
ef416fc2 435
5a738aea 436<a href="#ppd_file_t">ppd_file_t</a> *ppd = <a href="#ppdOpenFile">ppdOpenFile</a>(getenv("PPD"));
ef416fc2 437</pre>
438
5a738aea
MS
439<p>The return value is a pointer to a new
440<a href="#ppd_file_t"><code>ppd_file_t</code></a> structure or <code>NULL</code>
441if the PPD file does not exist or cannot be loaded. The
442<a href="#ppdClose"><code>ppdClose</code></a> function frees the memory used
443by the structure:</p>
444
445<pre class="example">
446#include &lt;cups/ppd.h&gt;
447
448<a href="#ppd_file_t">ppd_file_t</a> *ppd;
449
450<a href="#ppdClose">ppdClose</a>(ppd);
451</pre>
452
79e1d494
MS
453<p>Once closed, pointers to the <a href="#ppd_file_t"><code>ppd_file_t</code></a>
454structure and any data in it will no longer be valid.</p>
455
5a738aea
MS
456<h3><a name="OPTIONS_AND_GROUPS">Options and Groups</a></h3>
457
458<p>PPD files support multiple options, which are stored in arrays of
459<a href="#ppd_option_t"><code>ppd_option_t</code></a> and
460<a href="#ppd_choice_t"><code>ppd_choice_t</code></a> structures.</p>
461
462<p>Each option in turn is associated with a group stored in a
463<a href="#ppd_group_t"><code>ppd_group_t</code></a> structure. Groups can be
464specified in the PPD file; if an option is not associated with a group
465then it is put in an automatically-generated "General" group. Groups can also
466have sub-groups, however CUPS currently ignores sub-groups because of past
467abuses of this functionality.</p>
468
79e1d494 469<p>Option choices are selected by marking them using one of three functions. The
5a738aea
MS
470first is <a href="#ppdMarkDefaults"><code>ppdMarkDefaults</code></a> which
471selects all of the default options in the PPD file:</p>
472
473<pre class="example">
474#include &lt;cups/ppd.h&gt;
475
476<a href="#ppd_file_t">ppd_file_t</a> *ppd;
477
478<a href="#ppdMarkDefaults">ppdMarkDefaults</a>(ppd);
479</pre>
480
481<p>The second is <a href="#ppdMarkOption"><code>ppdMarkOption</code></a>
482which selects a single option choice in the PPD file. For example, the following
79e1d494 483code selects the upper paper tray:</p>
5a738aea
MS
484
485<pre class="example">
486#include &lt;cups/ppd.h&gt;
487
488<a href="#ppd_file_t">ppd_file_t</a> *ppd;
489
79e1d494 490<a href="#ppdMarkOption">ppdMarkOption</a>(ppd, "InputSlot", "Upper");
5a738aea
MS
491</pre>
492
493<p>The last function is
494<a href="#cupsMarkOptions"><code>cupsMarkOptions</code></a> which selects
495multiple option choices in the PPD file from an array of CUPS options, mapping
496IPP attributes like "media" and "sides" to their corresponding PPD options. You
497typically use this function in a print filter with
498<code>cupsParseOptions</code> and
499<a href="#ppdMarkDefaults"><code>ppdMarkDefaults</code></a> to select all of
500the option choices needed for the job, for example:</p>
501
502<pre class="example">
503#include &lt;cups/ppd.h&gt;
504
505<a href="#ppd_file_t">ppd_file_t</a> *ppd = <a href="#ppdOpenFile">ppdOpenFile</a>(getenv("PPD"));
506cups_option_t *options = NULL;
507int num_options = cupsParseOptions(argv[5], 0, &amp;options);
508
509<a href="#ppdMarkDefaults">ppdMarkDefaults</a>(ppd);
510<a href="#cupsMarkOptions">cupsMarkOptions</a>(ppd, num_options, options);
79e1d494 511cupsFreeOptions(num_options, options);
5a738aea
MS
512</pre>
513
514<h3><a name="CONSTRAINTS">Constraints</a></h3>
515
516<p>PPD files support specification of conflict conditions, called
517constraints, between different options. Constraints are stored in an array of
518<a href="#ppd_const_t"><code>ppd_const_t</code></a> structures which specify
519the options and choices that conflict with each other. The
520<a href="#ppdConflicts"><code>ppdConflicts</code></a> function tells you
79e1d494
MS
521how many of the selected options are incompatible. Since constraints are
522normally specified in pairs, the returned value is typically an even number.</p>
5a738aea
MS
523
524<h3><a name="PAGE_SIZES">Page Sizes</a></h3>
525
526<p>Page sizes are special options which have physical dimensions and margins
527associated with them. The size information is stored in
528<a href="#ppd_size_t"><code>ppd_size_t</code></a> structures and is available
529by looking up the named size with the
530<a href="#ppdPageSize"><code>ppdPageSize</code></a> function. The page size and
531margins are returned in units called points; there are 72 points per inch. If
532you pass <code>NULL</code> for the size, the currently selected size is
533returned:</p>
534
535<pre class="example">
536#include &lt;cups/ppd.h&gt;
537
538<a href="#ppd_file_t">ppd_file_t</a> *ppd;
539<a href="#ppd_size_t">ppd_size_t</a> *size = <a href="#ppdPageSize">ppdPageSize</a>(ppd, NULL);
540</pre>
541
542<p>Besides the standard page sizes listed in a PPD file, some printers
543support variable or custom page sizes. Custom page sizes are supported if the
544<code>variables_sizes</code> member of the
545<a href="#ppd_file_t"><code>ppd_file_t</code></a> structure is non-zero.
546The <code>custom_min</code>, <code>custom_max</code>, and
547<code>custom_margins</code> members of the
548<a href="#ppd_file_t"><code>ppd_file_t</code></a> structure define the limits
549of the printable area. To get the resulting media size, use a page size string
550of the form "Custom.<I>width</I>x<I>length</I>", where "width" and "length" are
551in points. Custom page size names can also be specified in inches
552("Custom.<i>width</i>x<i>height</i>in"), centimeters
553("Custom.<i>width</i>x<i>height</i>cm"), or millimeters
554("Custom.<i>width</i>x<i>height</i>mm"):</p>
555
556<pre class="example">
557#include &lt;cups/ppd.h&gt;
558
559<a href="#ppd_file_t">ppd_file_t</a> *ppd;
560
561/* Get an 576x720 point custom page size */
562<a href="#ppd_size_t">ppd_size_t</a> *size = <a href="#ppdPageSize">ppdPageSize</a>(ppd, "Custom.576x720");
563
564/* Get an 8x10 inch custom page size */
565<a href="#ppd_size_t">ppd_size_t</a> *size = <a href="#ppdPageSize">ppdPageSize</a>(ppd, "Custom.8x10in");
566
567/* Get a 100x200 millimeter custom page size */
568<a href="#ppd_size_t">ppd_size_t</a> *size = <a href="#ppdPageSize">ppdPageSize</a>(ppd, "Custom.100x200mm");
569
570/* Get a 12.7x34.5 centimeter custom page size */
571<a href="#ppd_size_t">ppd_size_t</a> *size = <a href="#ppdPageSize">ppdPageSize</a>(ppd, "Custom.12.7x34.5cm");
572</pre>
573
79e1d494
MS
574<p>If the PPD does not support variable page sizes, the
575<a href="#ppdPageSize"><code>ppdPageSize</code></a> function will return
576<code>NULL</code>.</p>
577
5a738aea
MS
578<h3><a name="ATTRIBUTES">Attributes</a></h3>
579
580<p>Every PPD file is composed of one or more attributes. Most of these
581attributes are used to define groups, options, choices, and page sizes,
79e1d494
MS
582however several informational attributes may be present which you can access
583in your program or filter. Attributes normally look like one of the following
584examples in a PPD file:</p>
5a738aea
MS
585
586<pre class="example">
587*name: "value"
588*name spec: "value"
589*name spec/text: "value"
590</pre>
591
592<p>The <a href="#ppdFindAttr"><code>ppdFindAttr</code></a> and
593<a href="#ppdFindNextAttr"><code>ppdFindNextAttr</code></a> functions find the
594first and next instances, respectively, of the named attribute with the given
595"spec" string and return a <a href="#ppd_attr_t"><code>ppd_attr_t</code></a>
596structure. If you provide a NULL specifier string, all attributes with the
597given name will be returned. For example, the following code lists all of the
598<code>Product</code> attributes in a PPD file:</p>
599
600<pre class="example">
601#include &lt;cups/ppd.h&gt;
602
603<a href="#ppd_file_t">ppd_file_t</a> *ppd;
604<a href="#ppd_attr_t">ppd_attr_t</a> *attr;
605
606for (attr = <a href="#ppdFindAttr">ppdFindAttr</a>(ppd, "Product", NULL);
607 attr != NULL;
608 attr = <a href="#ppdFindNextAttr">ppdFindNextAttr</a>(ppd, "Product", NULL))
609 puts(attr->value);
610</pre>
611<h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
612<h3 class="function"><a name="cupsMarkOptions">cupsMarkOptions</a></h3>
613<p class="description">Mark command-line options in a PPD file.</p>
614<p class="code">
615int cupsMarkOptions (<br>
616&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
617&nbsp;&nbsp;&nbsp;&nbsp;int num_options,<br>
618&nbsp;&nbsp;&nbsp;&nbsp;cups_option_t *options<br>
619);</p>
620<h4 class="parameters">Parameters</h4>
621<dl>
622<dt>ppd</dt>
623<dd class="description">PPD file</dd>
624<dt>num_options</dt>
625<dd class="description">Number of options</dd>
626<dt>options</dt>
627<dd class="description">Options</dd>
628</dl>
629<h4 class="returnvalue">Return Value</h4>
630<p class="description">1 if conflicting</p>
631<h4 class="discussion">Discussion</h4>
632<p class="discussion">This function maps the IPP &quot;finishings&quot;, &quot;media&quot;, &quot;mirror&quot;,
633&quot;multiple-document-handling&quot;, &quot;output-bin&quot;, &quot;printer-resolution&quot;, and
634&quot;sides&quot; attributes to their corresponding PPD options and choices.</p>
635<h3 class="function"><a name="ppdClose">ppdClose</a></h3>
636<p class="description">Free all memory used by the PPD file.</p>
637<p class="code">
638void ppdClose (<br>
639&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd<br>
640);</p>
641<h4 class="parameters">Parameters</h4>
642<dl>
643<dt>ppd</dt>
644<dd class="description">PPD file record</dd>
645</dl>
646<h3 class="function"><a name="ppdCollect">ppdCollect</a></h3>
647<p class="description">Collect all marked options that reside in the specified
648section.</p>
649<p class="code">
650int ppdCollect (<br>
651&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
652&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_section_t">ppd_section_t</a> section,<br>
653&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_choice_t">ppd_choice_t</a> ***choices<br>
654);</p>
655<h4 class="parameters">Parameters</h4>
656<dl>
657<dt>ppd</dt>
658<dd class="description">PPD file data</dd>
659<dt>section</dt>
660<dd class="description">Section to collect</dd>
661<dt>choices</dt>
662<dd class="description">Pointers to choices</dd>
663</dl>
664<h4 class="returnvalue">Return Value</h4>
665<p class="description">Number of options marked</p>
666<h4 class="discussion">Discussion</h4>
667<p class="discussion">The choices array should be freed using <code>free</code> when you are
668finished with it.</p>
669<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppdCollect2">ppdCollect2</a></h3>
670<p class="description">Collect all marked options that reside in the
671specified section and minimum order.</p>
672<p class="code">
673int ppdCollect2 (<br>
674&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
675&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_section_t">ppd_section_t</a> section,<br>
676&nbsp;&nbsp;&nbsp;&nbsp;float min_order,<br>
677&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_choice_t">ppd_choice_t</a> ***choices<br>
678);</p>
679<h4 class="parameters">Parameters</h4>
680<dl>
681<dt>ppd</dt>
682<dd class="description">PPD file data</dd>
683<dt>section</dt>
684<dd class="description">Section to collect</dd>
685<dt>min_order</dt>
686<dd class="description">Minimum OrderDependency value</dd>
687<dt>choices</dt>
688<dd class="description">Pointers to choices</dd>
689</dl>
690<h4 class="returnvalue">Return Value</h4>
691<p class="description">Number of options marked</p>
692<h4 class="discussion">Discussion</h4>
693<p class="discussion">The choices array should be freed using <code>free</code> when you are
694finished with it.
695
696</p>
697<h3 class="function"><a name="ppdConflicts">ppdConflicts</a></h3>
698<p class="description">Check to see if there are any conflicts among the
699marked option choices.</p>
700<p class="code">
701int ppdConflicts (<br>
702&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd<br>
703);</p>
704<h4 class="parameters">Parameters</h4>
705<dl>
706<dt>ppd</dt>
707<dd class="description">PPD to check</dd>
708</dl>
709<h4 class="returnvalue">Return Value</h4>
710<p class="description">Number of conflicts found</p>
711<h4 class="discussion">Discussion</h4>
712<p class="discussion">The returned value is the same as returned by <a href="#ppdMarkOption"><code>ppdMarkOption</code></a>.</p>
713<h3 class="function"><a name="ppdEmit">ppdEmit</a></h3>
714<p class="description">Emit code for marked options to a file.</p>
715<p class="code">
716int ppdEmit (<br>
717&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
718&nbsp;&nbsp;&nbsp;&nbsp;FILE *fp,<br>
719&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_section_t">ppd_section_t</a> section<br>
720);</p>
721<h4 class="parameters">Parameters</h4>
722<dl>
723<dt>ppd</dt>
724<dd class="description">PPD file record</dd>
725<dt>fp</dt>
726<dd class="description">File to write to</dd>
727<dt>section</dt>
728<dd class="description">Section to write</dd>
729</dl>
730<h4 class="returnvalue">Return Value</h4>
731<p class="description">0 on success, -1 on failure</p>
732<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppdEmitAfterOrder">ppdEmitAfterOrder</a></h3>
733<p class="description">Emit a subset of the code for marked options to a file.</p>
734<p class="code">
735int ppdEmitAfterOrder (<br>
736&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
737&nbsp;&nbsp;&nbsp;&nbsp;FILE *fp,<br>
738&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_section_t">ppd_section_t</a> section,<br>
739&nbsp;&nbsp;&nbsp;&nbsp;int limit,<br>
740&nbsp;&nbsp;&nbsp;&nbsp;float min_order<br>
741);</p>
742<h4 class="parameters">Parameters</h4>
743<dl>
744<dt>ppd</dt>
745<dd class="description">PPD file record</dd>
746<dt>fp</dt>
747<dd class="description">File to write to</dd>
748<dt>section</dt>
749<dd class="description">Section to write</dd>
750<dt>limit</dt>
751<dd class="description">Non-zero to use min_order</dd>
752<dt>min_order</dt>
753<dd class="description">Lowest OrderDependency</dd>
754</dl>
755<h4 class="returnvalue">Return Value</h4>
756<p class="description">0 on success, -1 on failure</p>
757<h4 class="discussion">Discussion</h4>
758<p class="discussion">When &quot;limit&quot; is non-zero, this function only emits options whose
759OrderDependency value is greater than or equal to &quot;min_order&quot;.<br>
760<br>
761When &quot;limit&quot; is zero, this function is identical to ppdEmit().
762
763</p>
764<h3 class="function"><a name="ppdEmitFd">ppdEmitFd</a></h3>
765<p class="description">Emit code for marked options to a file.</p>
766<p class="code">
767int ppdEmitFd (<br>
768&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
769&nbsp;&nbsp;&nbsp;&nbsp;int fd,<br>
770&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_section_t">ppd_section_t</a> section<br>
771);</p>
772<h4 class="parameters">Parameters</h4>
773<dl>
774<dt>ppd</dt>
775<dd class="description">PPD file record</dd>
776<dt>fd</dt>
777<dd class="description">File to write to</dd>
778<dt>section</dt>
779<dd class="description">Section to write</dd>
780</dl>
781<h4 class="returnvalue">Return Value</h4>
782<p class="description">0 on success, -1 on failure</p>
783<h3 class="function"><a name="ppdEmitJCL">ppdEmitJCL</a></h3>
784<p class="description">Emit code for JCL options to a file.</p>
785<p class="code">
786int ppdEmitJCL (<br>
787&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
788&nbsp;&nbsp;&nbsp;&nbsp;FILE *fp,<br>
789&nbsp;&nbsp;&nbsp;&nbsp;int job_id,<br>
790&nbsp;&nbsp;&nbsp;&nbsp;const char *user,<br>
791&nbsp;&nbsp;&nbsp;&nbsp;const char *title<br>
792);</p>
793<h4 class="parameters">Parameters</h4>
794<dl>
795<dt>ppd</dt>
796<dd class="description">PPD file record</dd>
797<dt>fp</dt>
798<dd class="description">File to write to</dd>
799<dt>job_id</dt>
800<dd class="description">Job ID</dd>
801<dt>user</dt>
802<dd class="description">Username</dd>
803<dt>title</dt>
804<dd class="description">Title</dd>
805</dl>
806<h4 class="returnvalue">Return Value</h4>
807<p class="description">0 on success, -1 on failure</p>
808<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppdEmitJCLEnd">ppdEmitJCLEnd</a></h3>
809<p class="description">Emit JCLEnd code to a file.</p>
810<p class="code">
811int ppdEmitJCLEnd (<br>
812&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
813&nbsp;&nbsp;&nbsp;&nbsp;FILE *fp<br>
814);</p>
815<h4 class="parameters">Parameters</h4>
816<dl>
817<dt>ppd</dt>
818<dd class="description">PPD file record</dd>
819<dt>fp</dt>
820<dd class="description">File to write to</dd>
821</dl>
822<h4 class="returnvalue">Return Value</h4>
823<p class="description">0 on success, -1 on failure</p>
824<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppdEmitString">ppdEmitString</a></h3>
825<p class="description">Get a string containing the code for marked options.</p>
826<p class="code">
827char *ppdEmitString (<br>
828&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
829&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_section_t">ppd_section_t</a> section,<br>
830&nbsp;&nbsp;&nbsp;&nbsp;float min_order<br>
831);</p>
832<h4 class="parameters">Parameters</h4>
833<dl>
834<dt>ppd</dt>
835<dd class="description">PPD file record</dd>
836<dt>section</dt>
837<dd class="description">Section to write</dd>
838<dt>min_order</dt>
839<dd class="description">Lowest OrderDependency</dd>
840</dl>
841<h4 class="returnvalue">Return Value</h4>
842<p class="description">String containing option code or <code>NULL</code> if there is no option code</p>
843<h4 class="discussion">Discussion</h4>
844<p class="discussion">When &quot;min_order&quot; is greater than zero, this function only includes options
80ca4592 845whose OrderDependency value is greater than or equal to &quot;min_order&quot;.
846Otherwise, all options in the specified section are included in the
5a738aea
MS
847returned string.<br>
848<br>
849The return string is allocated on the heap and should be freed using
850<code>free</code> when you are done with it.
851
852</p>
853<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="ppdErrorString">ppdErrorString</a></h3>
854<p class="description">Returns the text assocated with a status.</p>
855<p class="code">
856const char *ppdErrorString (<br>
79e1d494 857&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_status_t">ppd_status_t</a> status<br>
5a738aea
MS
858);</p>
859<h4 class="parameters">Parameters</h4>
860<dl>
861<dt>status</dt>
862<dd class="description">PPD status</dd>
863</dl>
864<h4 class="returnvalue">Return Value</h4>
865<p class="description">Status string</p>
866<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="ppdFindAttr">ppdFindAttr</a></h3>
867<p class="description">Find the first matching attribute.</p>
868<p class="code">
869<a href="#ppd_attr_t">ppd_attr_t</a> *ppdFindAttr (<br>
870&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
871&nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
872&nbsp;&nbsp;&nbsp;&nbsp;const char *spec<br>
873);</p>
874<h4 class="parameters">Parameters</h4>
875<dl>
876<dt>ppd</dt>
877<dd class="description">PPD file data</dd>
878<dt>name</dt>
879<dd class="description">Attribute name</dd>
880<dt>spec</dt>
881<dd class="description">Specifier string or <code>NULL</code></dd>
882</dl>
883<h4 class="returnvalue">Return Value</h4>
884<p class="description">Attribute or <code>NULL</code> if not found</p>
885<h3 class="function"><a name="ppdFindChoice">ppdFindChoice</a></h3>
886<p class="description">Return a pointer to an option choice.</p>
887<p class="code">
888<a href="#ppd_choice_t">ppd_choice_t</a> *ppdFindChoice (<br>
889&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_option_t">ppd_option_t</a> *o,<br>
890&nbsp;&nbsp;&nbsp;&nbsp;const char *choice<br>
891);</p>
892<h4 class="parameters">Parameters</h4>
893<dl>
894<dt>o</dt>
895<dd class="description">Pointer to option</dd>
896<dt>choice</dt>
897<dd class="description">Name of choice</dd>
898</dl>
899<h4 class="returnvalue">Return Value</h4>
900<p class="description">Choice pointer or <code>NULL</code></p>
901<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppdFindCustomOption">ppdFindCustomOption</a></h3>
902<p class="description">Find a custom option.</p>
903<p class="code">
904<a href="#ppd_coption_t">ppd_coption_t</a> *ppdFindCustomOption (<br>
905&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
906&nbsp;&nbsp;&nbsp;&nbsp;const char *keyword<br>
907);</p>
908<h4 class="parameters">Parameters</h4>
909<dl>
910<dt>ppd</dt>
911<dd class="description">PPD file</dd>
912<dt>keyword</dt>
913<dd class="description">Custom option name</dd>
914</dl>
915<h4 class="returnvalue">Return Value</h4>
916<p class="description">Custom option or NULL</p>
917<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppdFindCustomParam">ppdFindCustomParam</a></h3>
918<p class="description">Find a parameter for a custom option.</p>
919<p class="code">
920<a href="#ppd_cparam_t">ppd_cparam_t</a> *ppdFindCustomParam (<br>
921&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_coption_t">ppd_coption_t</a> *opt,<br>
922&nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
923);</p>
924<h4 class="parameters">Parameters</h4>
925<dl>
926<dt>opt</dt>
927<dd class="description">Custom option</dd>
928<dt>name</dt>
929<dd class="description">Parameter name</dd>
930</dl>
931<h4 class="returnvalue">Return Value</h4>
932<p class="description">Custom parameter or NULL</p>
933<h3 class="function"><a name="ppdFindMarkedChoice">ppdFindMarkedChoice</a></h3>
934<p class="description">Return the marked choice for the specified option.</p>
935<p class="code">
936<a href="#ppd_choice_t">ppd_choice_t</a> *ppdFindMarkedChoice (<br>
937&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
938&nbsp;&nbsp;&nbsp;&nbsp;const char *option<br>
939);</p>
940<h4 class="parameters">Parameters</h4>
941<dl>
942<dt>ppd</dt>
943<dd class="description">PPD file</dd>
944<dt>option</dt>
945<dd class="description">Keyword/option name</dd>
946</dl>
947<h4 class="returnvalue">Return Value</h4>
948<p class="description">Pointer to choice or <code>NULL</code></p>
949<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="ppdFindNextAttr">ppdFindNextAttr</a></h3>
950<p class="description">Find the next matching attribute.</p>
951<p class="code">
952<a href="#ppd_attr_t">ppd_attr_t</a> *ppdFindNextAttr (<br>
953&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
954&nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
955&nbsp;&nbsp;&nbsp;&nbsp;const char *spec<br>
956);</p>
957<h4 class="parameters">Parameters</h4>
958<dl>
959<dt>ppd</dt>
960<dd class="description">PPD file data</dd>
961<dt>name</dt>
962<dd class="description">Attribute name</dd>
963<dt>spec</dt>
964<dd class="description">Specifier string or <code>NULL</code></dd>
965</dl>
966<h4 class="returnvalue">Return Value</h4>
967<p class="description">Attribute or <code>NULL</code> if not found</p>
968<h3 class="function"><a name="ppdFindOption">ppdFindOption</a></h3>
969<p class="description">Return a pointer to the specified option.</p>
970<p class="code">
971<a href="#ppd_option_t">ppd_option_t</a> *ppdFindOption (<br>
972&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
973&nbsp;&nbsp;&nbsp;&nbsp;const char *option<br>
974);</p>
975<h4 class="parameters">Parameters</h4>
976<dl>
977<dt>ppd</dt>
978<dd class="description">PPD file data</dd>
979<dt>option</dt>
980<dd class="description">Option/Keyword name</dd>
981</dl>
982<h4 class="returnvalue">Return Value</h4>
983<p class="description">Pointer to option or <code>NULL</code></p>
984<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppdFirstCustomParam">ppdFirstCustomParam</a></h3>
985<p class="description">Return the first parameter for a custom option.</p>
986<p class="code">
987<a href="#ppd_cparam_t">ppd_cparam_t</a> *ppdFirstCustomParam (<br>
988&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_coption_t">ppd_coption_t</a> *opt<br>
989);</p>
990<h4 class="parameters">Parameters</h4>
991<dl>
992<dt>opt</dt>
993<dd class="description">Custom option</dd>
994</dl>
995<h4 class="returnvalue">Return Value</h4>
996<p class="description">Custom parameter or NULL</p>
997<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppdFirstOption">ppdFirstOption</a></h3>
998<p class="description">Return the first option in the PPD file.</p>
999<p class="code">
1000<a href="#ppd_option_t">ppd_option_t</a> *ppdFirstOption (<br>
1001&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd<br>
1002);</p>
1003<h4 class="parameters">Parameters</h4>
1004<dl>
1005<dt>ppd</dt>
1006<dd class="description">PPD file</dd>
1007</dl>
1008<h4 class="returnvalue">Return Value</h4>
1009<p class="description">First option or <code>NULL</code></p>
1010<h4 class="discussion">Discussion</h4>
1011<p class="discussion">Options are returned from all groups in ascending alphanumeric order.
1012
1013</p>
1014<h3 class="function"><a name="ppdIsMarked">ppdIsMarked</a></h3>
1015<p class="description">Check to see if an option is marked.</p>
1016<p class="code">
1017int ppdIsMarked (<br>
1018&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
1019&nbsp;&nbsp;&nbsp;&nbsp;const char *option,<br>
1020&nbsp;&nbsp;&nbsp;&nbsp;const char *choice<br>
1021);</p>
1022<h4 class="parameters">Parameters</h4>
1023<dl>
1024<dt>ppd</dt>
1025<dd class="description">PPD file data</dd>
1026<dt>option</dt>
1027<dd class="description">Option/Keyword name</dd>
1028<dt>choice</dt>
1029<dd class="description">Choice name</dd>
1030</dl>
1031<h4 class="returnvalue">Return Value</h4>
1032<p class="description">Non-zero if option is marked</p>
1033<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="ppdLastError">ppdLastError</a></h3>
1034<p class="description">Return the status from the last ppdOpen*().</p>
1035<p class="code">
79e1d494 1036<a href="#ppd_status_t">ppd_status_t</a> ppdLastError (<br>
5a738aea
MS
1037&nbsp;&nbsp;&nbsp;&nbsp;int *line<br>
1038);</p>
1039<h4 class="parameters">Parameters</h4>
1040<dl>
1041<dt>line</dt>
1042<dd class="description">Line number</dd>
1043</dl>
1044<h4 class="returnvalue">Return Value</h4>
1045<p class="description">Status code</p>
1046<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppdLocalize">ppdLocalize</a></h3>
1047<p class="description">Localize the PPD file to the current locale.</p>
1048<p class="code">
1049int ppdLocalize (<br>
1050&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd<br>
1051);</p>
1052<h4 class="parameters">Parameters</h4>
1053<dl>
1054<dt>ppd</dt>
1055<dd class="description">PPD file</dd>
1056</dl>
1057<h4 class="returnvalue">Return Value</h4>
1058<p class="description">0 on success, -1 on error</p>
1059<h4 class="discussion">Discussion</h4>
1060<p class="discussion">All groups, options, and choices are localized, as are ICC profile
bc44d920 1061descriptions, printer presets, and custom option parameters. Each
1062localized string uses the UTF-8 character encoding.
1063
5a738aea 1064</p>
75bd9771
MS
1065<h3 class="function"><a name="ppdLocalizeAttr">ppdLocalizeAttr</a></h3>
1066<p class="description">Localize an attribute.</p>
1067<p class="code">
1068<a href="#ppd_attr_t">ppd_attr_t</a> *ppdLocalizeAttr (<br>
1069&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
1070&nbsp;&nbsp;&nbsp;&nbsp;const char *keyword,<br>
1071&nbsp;&nbsp;&nbsp;&nbsp;const char *spec<br>
1072);</p>
1073<h4 class="parameters">Parameters</h4>
1074<dl>
1075<dt>ppd</dt>
1076<dd class="description">PPD file</dd>
1077<dt>keyword</dt>
1078<dd class="description">Main keyword</dd>
1079<dt>spec</dt>
1080<dd class="description">Option keyword or <code>NULL</code> for none</dd>
1081</dl>
1082<h4 class="returnvalue">Return Value</h4>
1083<p class="description">Localized attribute or <code>NULL</code> if none exists</p>
1084<h4 class="discussion">Discussion</h4>
1085<p class="discussion">This function uses the current locale to find the localized attribute for
1086the given main and option keywords. If no localized version of the
1087attribute exists for the current locale, the unlocalized version is returned.</p>
5a738aea
MS
1088<h3 class="function"><span class="info">&nbsp;CUPS 1.3&nbsp;</span><a name="ppdLocalizeIPPReason">ppdLocalizeIPPReason</a></h3>
1089<p class="description">Get the localized version of a cupsIPPReason
1090attribute.</p>
1091<p class="code">
1092const char *ppdLocalizeIPPReason (<br>
1093&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
1094&nbsp;&nbsp;&nbsp;&nbsp;const char *reason,<br>
1095&nbsp;&nbsp;&nbsp;&nbsp;const char *scheme,<br>
1096&nbsp;&nbsp;&nbsp;&nbsp;char *buffer,<br>
1097&nbsp;&nbsp;&nbsp;&nbsp;size_t bufsize<br>
1098);</p>
1099<h4 class="parameters">Parameters</h4>
1100<dl>
1101<dt>ppd</dt>
1102<dd class="description">PPD file</dd>
1103<dt>reason</dt>
1104<dd class="description">IPP reason keyword to look up</dd>
1105<dt>scheme</dt>
1106<dd class="description">URI scheme or NULL for text</dd>
1107<dt>buffer</dt>
1108<dd class="description">Value buffer</dd>
1109<dt>bufsize</dt>
1110<dd class="description">Size of value buffer</dd>
1111</dl>
1112<h4 class="returnvalue">Return Value</h4>
1113<p class="description">Value or NULL if not found</p>
1114<h4 class="discussion">Discussion</h4>
1115<p class="discussion">This function uses the current locale to find the corresponding reason
bc44d920 1116text or URI from the attribute value. If &quot;scheme&quot; is NULL or &quot;text&quot;,
1117the returned value contains human-readable (UTF-8) text from the translation
5a738aea
MS
1118string or attribute value. Otherwise the corresponding URI is returned.<br>
1119<br>
1120If no value of the requested scheme can be found, NULL is returned.
1121
1122</p>
1123<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="ppdLocalizeMarkerName">ppdLocalizeMarkerName</a></h3>
1124<p class="description">Get the localized version of a marker-names
1125attribute value.</p>
1126<p class="code">
1127const char *ppdLocalizeMarkerName (<br>
1128&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
1129&nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
1130);</p>
1131<h4 class="parameters">Parameters</h4>
1132<dl>
1133<dt>ppd</dt>
1134<dd class="description">PPD file</dd>
1135<dt>name</dt>
1136<dd class="description">Marker name to look up</dd>
1137</dl>
1138<h4 class="returnvalue">Return Value</h4>
1139<p class="description">Value or <code>NULL</code> if not found</p>
1140<h4 class="discussion">Discussion</h4>
1141<p class="discussion">This function uses the current locale to find the corresponding name
1142text from the attribute value. If no localized text for the requested
1143name can be found, <code>NULL</code> is returned.
1144
1145</p>
1146<h3 class="function"><a name="ppdMarkDefaults">ppdMarkDefaults</a></h3>
1147<p class="description">Mark all default options in the PPD file.</p>
1148<p class="code">
1149void ppdMarkDefaults (<br>
1150&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd<br>
1151);</p>
1152<h4 class="parameters">Parameters</h4>
1153<dl>
1154<dt>ppd</dt>
1155<dd class="description">PPD file record</dd>
1156</dl>
1157<h3 class="function"><a name="ppdMarkOption">ppdMarkOption</a></h3>
1158<p class="description">Mark an option in a PPD file.</p>
1159<p class="code">
1160int ppdMarkOption (<br>
1161&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
1162&nbsp;&nbsp;&nbsp;&nbsp;const char *option,<br>
1163&nbsp;&nbsp;&nbsp;&nbsp;const char *choice<br>
1164);</p>
1165<h4 class="parameters">Parameters</h4>
1166<dl>
1167<dt>ppd</dt>
1168<dd class="description">PPD file record</dd>
1169<dt>option</dt>
1170<dd class="description">Keyword</dd>
1171<dt>choice</dt>
1172<dd class="description">Option name</dd>
1173</dl>
1174<h4 class="returnvalue">Return Value</h4>
1175<p class="description">Number of conflicts</p>
1176<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppdNextCustomParam">ppdNextCustomParam</a></h3>
1177<p class="description">Return the next parameter for a custom option.</p>
1178<p class="code">
1179<a href="#ppd_cparam_t">ppd_cparam_t</a> *ppdNextCustomParam (<br>
1180&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_coption_t">ppd_coption_t</a> *opt<br>
1181);</p>
1182<h4 class="parameters">Parameters</h4>
1183<dl>
1184<dt>opt</dt>
1185<dd class="description">Custom option</dd>
1186</dl>
1187<h4 class="returnvalue">Return Value</h4>
1188<p class="description">Custom parameter or NULL</p>
1189<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppdNextOption">ppdNextOption</a></h3>
1190<p class="description">Return the next option in the PPD file.</p>
1191<p class="code">
1192<a href="#ppd_option_t">ppd_option_t</a> *ppdNextOption (<br>
1193&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd<br>
1194);</p>
1195<h4 class="parameters">Parameters</h4>
1196<dl>
1197<dt>ppd</dt>
1198<dd class="description">PPD file</dd>
1199</dl>
1200<h4 class="returnvalue">Return Value</h4>
1201<p class="description">Next option or <code>NULL</code></p>
1202<h4 class="discussion">Discussion</h4>
1203<p class="discussion">Options are returned from all groups in ascending alphanumeric order.
1204
1205</p>
1206<h3 class="function"><a name="ppdOpen">ppdOpen</a></h3>
1207<p class="description">Read a PPD file into memory.</p>
1208<p class="code">
1209<a href="#ppd_file_t">ppd_file_t</a> *ppdOpen (<br>
1210&nbsp;&nbsp;&nbsp;&nbsp;FILE *fp<br>
1211);</p>
1212<h4 class="parameters">Parameters</h4>
1213<dl>
1214<dt>fp</dt>
1215<dd class="description">File to read from</dd>
1216</dl>
1217<h4 class="returnvalue">Return Value</h4>
1218<p class="description">PPD file record</p>
1219<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppdOpen2">ppdOpen2</a></h3>
1220<p class="description">Read a PPD file into memory.</p>
1221<p class="code">
1222<a href="#ppd_file_t">ppd_file_t</a> *ppdOpen2 (<br>
1223&nbsp;&nbsp;&nbsp;&nbsp;cups_file_t *fp<br>
1224);</p>
1225<h4 class="parameters">Parameters</h4>
1226<dl>
1227<dt>fp</dt>
1228<dd class="description">File to read from</dd>
1229</dl>
1230<h4 class="returnvalue">Return Value</h4>
1231<p class="description">PPD file record or <code>NULL</code> if the PPD file could not be opened.</p>
1232<h3 class="function"><a name="ppdOpenFd">ppdOpenFd</a></h3>
1233<p class="description">Read a PPD file into memory.</p>
1234<p class="code">
1235<a href="#ppd_file_t">ppd_file_t</a> *ppdOpenFd (<br>
1236&nbsp;&nbsp;&nbsp;&nbsp;int fd<br>
1237);</p>
1238<h4 class="parameters">Parameters</h4>
1239<dl>
1240<dt>fd</dt>
1241<dd class="description">File to read from</dd>
1242</dl>
1243<h4 class="returnvalue">Return Value</h4>
1244<p class="description">PPD file record or <code>NULL</code> if the PPD file could not be opened.</p>
1245<h3 class="function"><a name="ppdOpenFile">ppdOpenFile</a></h3>
1246<p class="description">Read a PPD file into memory.</p>
1247<p class="code">
1248<a href="#ppd_file_t">ppd_file_t</a> *ppdOpenFile (<br>
1249&nbsp;&nbsp;&nbsp;&nbsp;const char *filename<br>
1250);</p>
1251<h4 class="parameters">Parameters</h4>
1252<dl>
1253<dt>filename</dt>
1254<dd class="description">File to read from</dd>
1255</dl>
1256<h4 class="returnvalue">Return Value</h4>
1257<p class="description">PPD file record or <code>NULL</code> if the PPD file could not be opened.</p>
1258<h3 class="function"><a name="ppdPageLength">ppdPageLength</a></h3>
1259<p class="description">Get the page length for the given size.</p>
1260<p class="code">
1261float ppdPageLength (<br>
1262&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
1263&nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
1264);</p>
1265<h4 class="parameters">Parameters</h4>
1266<dl>
1267<dt>ppd</dt>
1268<dd class="description">PPD file</dd>
1269<dt>name</dt>
1270<dd class="description">Size name</dd>
1271</dl>
1272<h4 class="returnvalue">Return Value</h4>
1273<p class="description">Length of page in points or 0.0</p>
1274<h3 class="function"><a name="ppdPageSize">ppdPageSize</a></h3>
1275<p class="description">Get the page size record for the given size.</p>
1276<p class="code">
1277<a href="#ppd_size_t">ppd_size_t</a> *ppdPageSize (<br>
1278&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
1279&nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
1280);</p>
1281<h4 class="parameters">Parameters</h4>
1282<dl>
1283<dt>ppd</dt>
1284<dd class="description">PPD file record</dd>
1285<dt>name</dt>
1286<dd class="description">Size name</dd>
1287</dl>
1288<h4 class="returnvalue">Return Value</h4>
1289<p class="description">Size record for page or NULL</p>
1290<h3 class="function"><a name="ppdPageWidth">ppdPageWidth</a></h3>
1291<p class="description">Get the page width for the given size.</p>
1292<p class="code">
1293float ppdPageWidth (<br>
1294&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
1295&nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
1296);</p>
1297<h4 class="parameters">Parameters</h4>
1298<dl>
1299<dt>ppd</dt>
1300<dd class="description">PPD file record</dd>
1301<dt>name</dt>
1302<dd class="description">Size name</dd>
1303</dl>
1304<h4 class="returnvalue">Return Value</h4>
1305<p class="description">Width of page in points or 0.0</p>
1306<h3 class="function"><span class="info">&nbsp;CUPS 1.1.20&nbsp;</span><a name="ppdSetConformance">ppdSetConformance</a></h3>
1307<p class="description">Set the conformance level for PPD files.</p>
1308<p class="code">
1309void ppdSetConformance (<br>
1310&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_conform_t">ppd_conform_t</a> c<br>
1311);</p>
1312<h4 class="parameters">Parameters</h4>
1313<dl>
1314<dt>c</dt>
1315<dd class="description">Conformance level</dd>
1316</dl>
1317<h2 class="title"><a name="TYPES">Data Types</a></h2>
1318<h3 class="typedef"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="ppd_attr_t">ppd_attr_t</a></h3>
1319<p class="description">PPD Attribute Structure </p>
1320<p class="code">
1321typedef struct <a href="#ppd_attr_s">ppd_attr_s</a> ppd_attr_t;
1322</p>
1323<h3 class="typedef"><a name="ppd_choice_t">ppd_choice_t</a></h3>
1324<p class="description">Option choices</p>
1325<p class="code">
1326typedef struct <a href="#ppd_choice_s">ppd_choice_s</a> ppd_choice_t;
1327</p>
1328<h3 class="typedef"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="ppd_conform_t">ppd_conform_t</a></h3>
1329<p class="description">Conformance Levels </p>
1330<p class="code">
1331typedef enum <a href="#ppd_conform_e">ppd_conform_e</a> ppd_conform_t;
1332</p>
1333<h3 class="typedef"><a name="ppd_const_t">ppd_const_t</a></h3>
1334<p class="description">Constraints</p>
1335<p class="code">
1336typedef struct <a href="#ppd_const_s">ppd_const_s</a> ppd_const_t;
1337</p>
1338<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppd_coption_t">ppd_coption_t</a></h3>
1339<p class="description">Custom Option </p>
1340<p class="code">
1341typedef struct <a href="#ppd_coption_s">ppd_coption_s</a> ppd_coption_t;
1342</p>
1343<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppd_cparam_t">ppd_cparam_t</a></h3>
1344<p class="description">Custom Parameter </p>
1345<p class="code">
1346typedef struct <a href="#ppd_cparam_s">ppd_cparam_s</a> ppd_cparam_t;
1347</p>
1348<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppd_cplimit_t">ppd_cplimit_t</a></h3>
1349<p class="description">Custom Parameter Limit </p>
1350<p class="code">
1351typedef union <a href="#ppd_cplimit_u">ppd_cplimit_u</a> ppd_cplimit_t;
1352</p>
1353<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppd_cptype_t">ppd_cptype_t</a></h3>
1354<p class="description">Custom Parameter Type </p>
1355<p class="code">
1356typedef enum <a href="#ppd_cptype_e">ppd_cptype_e</a> ppd_cptype_t;
1357</p>
1358<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppd_cpvalue_t">ppd_cpvalue_t</a></h3>
1359<p class="description">Custom Parameter Value </p>
1360<p class="code">
1361typedef union <a href="#ppd_cpvalue_u">ppd_cpvalue_u</a> ppd_cpvalue_t;
1362</p>
79e1d494
MS
1363<h3 class="typedef"><a name="ppd_cs_t">ppd_cs_t</a></h3>
1364<p class="description">Colorspaces</p>
1365<p class="code">
1366typedef enum <a href="#ppd_cs_e">ppd_cs_e</a> ppd_cs_t;
1367</p>
5a738aea
MS
1368<h3 class="typedef"><a name="ppd_emul_t">ppd_emul_t</a></h3>
1369<p class="description">Emulators</p>
1370<p class="code">
1371typedef struct <a href="#ppd_emul_s">ppd_emul_s</a> ppd_emul_t;
1372</p>
1373<h3 class="typedef"><a name="ppd_file_t">ppd_file_t</a></h3>
1374<p class="description">PPD File</p>
1375<p class="code">
1376typedef struct <a href="#ppd_file_s">ppd_file_s</a> ppd_file_t;
1377</p>
1378<h3 class="typedef"><a name="ppd_group_t">ppd_group_t</a></h3>
1379<p class="description">Groups</p>
1380<p class="code">
1381typedef struct <a href="#ppd_group_s">ppd_group_s</a> ppd_group_t;
1382</p>
1383<h3 class="typedef"><a name="ppd_option_t">ppd_option_t</a></h3>
1384<p class="description">Options</p>
1385<p class="code">
1386typedef struct <a href="#ppd_option_s">ppd_option_s</a> ppd_option_t;
1387</p>
1388<h3 class="typedef"><a name="ppd_profile_t">ppd_profile_t</a></h3>
1389<p class="description">sRGB Color Profiles</p>
1390<p class="code">
1391typedef struct <a href="#ppd_profile_s">ppd_profile_s</a> ppd_profile_t;
1392</p>
1393<h3 class="typedef"><a name="ppd_section_t">ppd_section_t</a></h3>
1394<p class="description">Order dependency sections</p>
1395<p class="code">
1396typedef enum <a href="#ppd_section_e">ppd_section_e</a> ppd_section_t;
1397</p>
1398<h3 class="typedef"><a name="ppd_size_t">ppd_size_t</a></h3>
1399<p class="description">Page Sizes</p>
1400<p class="code">
1401typedef struct <a href="#ppd_size_s">ppd_size_s</a> ppd_size_t;
1402</p>
79e1d494
MS
1403<h3 class="typedef"><a name="ppd_status_t">ppd_status_t</a></h3>
1404<p class="description">Types and structures...</p>
1405<p class="code">
1406typedef enum <a href="#ppd_status_e">ppd_status_e</a> ppd_status_t;
1407</p>
5a738aea
MS
1408<h3 class="typedef"><a name="ppd_ui_t">ppd_ui_t</a></h3>
1409<p class="description">UI Types</p>
1410<p class="code">
1411typedef enum <a href="#ppd_ui_e">ppd_ui_e</a> ppd_ui_t;
1412</p>
1413<h2 class="title"><a name="STRUCTURES">Structures</a></h2>
1414<h3 class="struct"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="ppd_attr_s">ppd_attr_s</a></h3>
1415<p class="description">PPD Attribute Structure </p>
1416<p class="code">struct ppd_attr_s {<br>
1417&nbsp;&nbsp;&nbsp;&nbsp;char name[PPD_MAX_NAME];<br>
1418&nbsp;&nbsp;&nbsp;&nbsp;char spec[PPD_MAX_NAME];<br>
1419&nbsp;&nbsp;&nbsp;&nbsp;char text[PPD_MAX_TEXT];<br>
1420&nbsp;&nbsp;&nbsp;&nbsp;char *value;<br>
1421};</p>
1422<h4 class="members">Members</h4>
1423<dl>
1424<dt>name[PPD_MAX_NAME] </dt>
1425<dd class="description">Name of attribute (cupsXYZ)</dd>
1426<dt>spec[PPD_MAX_NAME] </dt>
1427<dd class="description">Specifier string, if any</dd>
1428<dt>text[PPD_MAX_TEXT] </dt>
1429<dd class="description">Human-readable text, if any</dd>
1430<dt>value </dt>
1431<dd class="description">Value string</dd>
1432</dl>
1433<h3 class="struct"><a name="ppd_choice_s">ppd_choice_s</a></h3>
1434<p class="description">Option choices</p>
1435<p class="code">struct ppd_choice_s {<br>
1436&nbsp;&nbsp;&nbsp;&nbsp;char choice[PPD_MAX_NAME];<br>
1437&nbsp;&nbsp;&nbsp;&nbsp;char *code;<br>
1438&nbsp;&nbsp;&nbsp;&nbsp;char marked;<br>
1439&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_option_t">ppd_option_t</a> *option;<br>
1440&nbsp;&nbsp;&nbsp;&nbsp;char text[PPD_MAX_TEXT];<br>
1441};</p>
1442<h4 class="members">Members</h4>
1443<dl>
1444<dt>choice[PPD_MAX_NAME] </dt>
1445<dd class="description">Computer-readable option name</dd>
1446<dt>code </dt>
1447<dd class="description">Code to send for this option</dd>
1448<dt>marked </dt>
1449<dd class="description">0 if not selected, 1 otherwise</dd>
1450<dt>option </dt>
1451<dd class="description">Pointer to parent option structure</dd>
1452<dt>text[PPD_MAX_TEXT] </dt>
1453<dd class="description">Human-readable option name</dd>
1454</dl>
1455<h3 class="struct"><a name="ppd_const_s">ppd_const_s</a></h3>
1456<p class="description">Constraints</p>
1457<p class="code">struct ppd_const_s {<br>
1458&nbsp;&nbsp;&nbsp;&nbsp;char choice1[PPD_MAX_NAME];<br>
1459&nbsp;&nbsp;&nbsp;&nbsp;char choice2[PPD_MAX_NAME];<br>
1460&nbsp;&nbsp;&nbsp;&nbsp;char option1[PPD_MAX_NAME];<br>
1461&nbsp;&nbsp;&nbsp;&nbsp;char option2[PPD_MAX_NAME];<br>
1462};</p>
1463<h4 class="members">Members</h4>
1464<dl>
1465<dt>choice1[PPD_MAX_NAME] </dt>
1466<dd class="description">First option/choice (blank for all)</dd>
1467<dt>choice2[PPD_MAX_NAME] </dt>
1468<dd class="description">Second option/choice (blank for all)</dd>
1469<dt>option1[PPD_MAX_NAME] </dt>
1470<dd class="description">First keyword</dd>
1471<dt>option2[PPD_MAX_NAME] </dt>
1472<dd class="description">Second keyword</dd>
1473</dl>
1474<h3 class="struct"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppd_coption_s">ppd_coption_s</a></h3>
1475<p class="description">Custom Option </p>
1476<p class="code">struct ppd_coption_s {<br>
1477&nbsp;&nbsp;&nbsp;&nbsp;char keyword[PPD_MAX_NAME];<br>
1478&nbsp;&nbsp;&nbsp;&nbsp;int marked;<br>
1479&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_option_t">ppd_option_t</a> *option;<br>
1480&nbsp;&nbsp;&nbsp;&nbsp;cups_array_t *params;<br>
1481};</p>
1482<h4 class="members">Members</h4>
1483<dl>
1484<dt>keyword[PPD_MAX_NAME] </dt>
1485<dd class="description">Name of option that is being extended...</dd>
1486<dt>marked </dt>
1487<dd class="description">Extended option is marked</dd>
1488<dt>option </dt>
1489<dd class="description">Option that is being extended...</dd>
1490<dt>params </dt>
1491<dd class="description">Parameters</dd>
1492</dl>
1493<h3 class="struct"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppd_cparam_s">ppd_cparam_s</a></h3>
1494<p class="description">Custom Parameter </p>
1495<p class="code">struct ppd_cparam_s {<br>
1496&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_cpvalue_t">ppd_cpvalue_t</a> current;<br>
1497&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_cplimit_t">ppd_cplimit_t</a> minimum, maximum;<br>
1498&nbsp;&nbsp;&nbsp;&nbsp;char name[PPD_MAX_NAME];<br>
1499&nbsp;&nbsp;&nbsp;&nbsp;int order;<br>
1500&nbsp;&nbsp;&nbsp;&nbsp;char text[PPD_MAX_TEXT];<br>
1501&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_cptype_t">ppd_cptype_t</a> type;<br>
1502};</p>
1503<h4 class="members">Members</h4>
1504<dl>
1505<dt>current </dt>
1506<dd class="description">Current value</dd>
1507<dt>maximum </dt>
1508<dd class="description">Maximum value</dd>
1509<dt>name[PPD_MAX_NAME] </dt>
1510<dd class="description">Parameter name</dd>
1511<dt>order </dt>
1512<dd class="description">Order (0 to N)</dd>
1513<dt>text[PPD_MAX_TEXT] </dt>
1514<dd class="description">Human-readable text</dd>
1515<dt>type </dt>
1516<dd class="description">Parameter type</dd>
1517</dl>
1518<h3 class="struct"><a name="ppd_emul_s">ppd_emul_s</a></h3>
1519<p class="description">Emulators</p>
1520<p class="code">struct ppd_emul_s {<br>
1521&nbsp;&nbsp;&nbsp;&nbsp;char name[PPD_MAX_NAME];<br>
1522&nbsp;&nbsp;&nbsp;&nbsp;char *start;<br>
1523&nbsp;&nbsp;&nbsp;&nbsp;char *stop;<br>
1524};</p>
1525<h4 class="members">Members</h4>
1526<dl>
1527<dt>name[PPD_MAX_NAME] </dt>
1528<dd class="description">Emulator name</dd>
1529<dt>start </dt>
1530<dd class="description">Code to switch to this emulation</dd>
1531<dt>stop </dt>
1532<dd class="description">Code to stop this emulation</dd>
1533</dl>
1534<h3 class="struct"><a name="ppd_file_s">ppd_file_s</a></h3>
1535<p class="description">PPD File</p>
1536<p class="code">struct ppd_file_s {<br>
1537&nbsp;&nbsp;&nbsp;&nbsp;int accurate_screens;<br>
1538&nbsp;&nbsp;&nbsp;&nbsp;int color_device;<br>
79e1d494 1539&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_cs_t">ppd_cs_t</a> colorspace;<br>
5a738aea
MS
1540&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_const_t">ppd_const_t</a> *consts;<br>
1541&nbsp;&nbsp;&nbsp;&nbsp;int contone_only;<br>
1542&nbsp;&nbsp;&nbsp;&nbsp;float custom_margins[4];<br>
1543&nbsp;&nbsp;&nbsp;&nbsp;float custom_max[2];<br>
1544&nbsp;&nbsp;&nbsp;&nbsp;float custom_min[2];<br>
1545&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_emul_t">ppd_emul_t</a> *emulations;<br>
1546&nbsp;&nbsp;&nbsp;&nbsp;char **filters;<br>
1547&nbsp;&nbsp;&nbsp;&nbsp;int flip_duplex;<br>
1548&nbsp;&nbsp;&nbsp;&nbsp;char **fonts;<br>
1549&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_group_t">ppd_group_t</a> *groups;<br>
1550&nbsp;&nbsp;&nbsp;&nbsp;char *jcl_begin;<br>
1551&nbsp;&nbsp;&nbsp;&nbsp;char *jcl_end;<br>
1552&nbsp;&nbsp;&nbsp;&nbsp;char *jcl_ps;<br>
1553&nbsp;&nbsp;&nbsp;&nbsp;int landscape;<br>
1554&nbsp;&nbsp;&nbsp;&nbsp;char *lang_encoding;<br>
1555&nbsp;&nbsp;&nbsp;&nbsp;char *lang_version;<br>
1556&nbsp;&nbsp;&nbsp;&nbsp;int language_level;<br>
1557&nbsp;&nbsp;&nbsp;&nbsp;int manual_copies;<br>
1558&nbsp;&nbsp;&nbsp;&nbsp;char *manufacturer;<br>
1559&nbsp;&nbsp;&nbsp;&nbsp;int model_number;<br>
1560&nbsp;&nbsp;&nbsp;&nbsp;char *modelname;<br>
1561&nbsp;&nbsp;&nbsp;&nbsp;char *nickname;<br>
1562&nbsp;&nbsp;&nbsp;&nbsp;int num_consts;<br>
1563&nbsp;&nbsp;&nbsp;&nbsp;int num_emulations;<br>
1564&nbsp;&nbsp;&nbsp;&nbsp;int num_filters;<br>
1565&nbsp;&nbsp;&nbsp;&nbsp;int num_fonts;<br>
1566&nbsp;&nbsp;&nbsp;&nbsp;int num_groups;<br>
1567&nbsp;&nbsp;&nbsp;&nbsp;int num_profiles;<br>
1568&nbsp;&nbsp;&nbsp;&nbsp;int num_sizes;<br>
1569&nbsp;&nbsp;&nbsp;&nbsp;char *patches;<br>
1570&nbsp;&nbsp;&nbsp;&nbsp;char *pcfilename;<br>
1571&nbsp;&nbsp;&nbsp;&nbsp;char *product;<br>
1572&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_profile_t">ppd_profile_t</a> *profiles;<br>
1573&nbsp;&nbsp;&nbsp;&nbsp;char *protocols;<br>
1574&nbsp;&nbsp;&nbsp;&nbsp;char *shortnickname;<br>
1575&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_size_t">ppd_size_t</a> *sizes;<br>
1576&nbsp;&nbsp;&nbsp;&nbsp;int throughput;<br>
1577&nbsp;&nbsp;&nbsp;&nbsp;char *ttrasterizer;<br>
1578&nbsp;&nbsp;&nbsp;&nbsp;int variable_sizes;<br>
1579};</p>
1580<h4 class="members">Members</h4>
1581<dl>
1582<dt>accurate_screens </dt>
1583<dd class="description">1 = supports accurate screens, 0 = not</dd>
1584<dt>color_device </dt>
1585<dd class="description">1 = color device, 0 = grayscale</dd>
1586<dt>colorspace </dt>
1587<dd class="description">Default colorspace</dd>
1588<dt>consts </dt>
1589<dd class="description">UI/Non-UI constraints</dd>
1590<dt>contone_only </dt>
1591<dd class="description">1 = continuous tone only, 0 = not</dd>
1592<dt>custom_margins[4] </dt>
1593<dd class="description">Margins around page</dd>
1594<dt>custom_max[2] </dt>
1595<dd class="description">Maximum variable page size</dd>
1596<dt>custom_min[2] </dt>
1597<dd class="description">Minimum variable page size</dd>
1598<dt>emulations </dt>
1599<dd class="description">Emulations and the code to invoke them</dd>
1600<dt>filters </dt>
1601<dd class="description">Filter strings...</dd>
1602<dt>flip_duplex <span class="info">&nbsp;DEPRECATED&nbsp;</span></dt>
1603<dd class="description">1 = Flip page for back sides </dd>
1604<dt>fonts </dt>
1605<dd class="description">Pre-loaded fonts</dd>
1606<dt>groups </dt>
1607<dd class="description">UI groups</dd>
1608<dt>jcl_begin </dt>
1609<dd class="description">Start JCL commands</dd>
1610<dt>jcl_end </dt>
1611<dd class="description">End JCL commands</dd>
1612<dt>jcl_ps </dt>
1613<dd class="description">Enter PostScript interpreter</dd>
1614<dt>landscape </dt>
1615<dd class="description">-90 or 90</dd>
1616<dt>lang_encoding </dt>
1617<dd class="description">Language encoding</dd>
1618<dt>lang_version </dt>
1619<dd class="description">Language version (English, Spanish, etc.)</dd>
1620<dt>language_level </dt>
1621<dd class="description">Language level of device</dd>
1622<dt>manual_copies </dt>
1623<dd class="description">1 = Copies done manually, 0 = hardware</dd>
1624<dt>manufacturer </dt>
1625<dd class="description">Manufacturer name</dd>
1626<dt>model_number </dt>
1627<dd class="description">Device-specific model number</dd>
1628<dt>modelname </dt>
1629<dd class="description">Model name (general)</dd>
1630<dt>nickname </dt>
1631<dd class="description">Nickname (specific)</dd>
1632<dt>num_consts </dt>
1633<dd class="description">Number of UI/Non-UI constraints</dd>
1634<dt>num_emulations </dt>
1635<dd class="description">Number of emulations supported</dd>
1636<dt>num_filters </dt>
1637<dd class="description">Number of filters</dd>
1638<dt>num_fonts </dt>
1639<dd class="description">Number of pre-loaded fonts</dd>
1640<dt>num_groups </dt>
1641<dd class="description">Number of UI groups</dd>
1642<dt>num_profiles </dt>
1643<dd class="description">Number of sRGB color profiles</dd>
1644<dt>num_sizes </dt>
1645<dd class="description">Number of page sizes</dd>
1646<dt>patches </dt>
1647<dd class="description">Patch commands to be sent to printer</dd>
1648<dt>pcfilename <span class="info">&nbsp;CUPS 1.1.19&nbsp;</span></dt>
1649<dd class="description">PCFileName string </dd>
1650<dt>product </dt>
1651<dd class="description">Product name (from PS RIP/interpreter)</dd>
1652<dt>profiles </dt>
1653<dd class="description">sRGB color profiles</dd>
1654<dt>protocols <span class="info">&nbsp;CUPS 1.1.19&nbsp;</span></dt>
1655<dd class="description">Protocols (BCP, TBCP) string </dd>
1656<dt>shortnickname </dt>
1657<dd class="description">Short version of nickname</dd>
1658<dt>sizes </dt>
1659<dd class="description">Page sizes</dd>
1660<dt>throughput </dt>
1661<dd class="description">Pages per minute</dd>
1662<dt>ttrasterizer </dt>
1663<dd class="description">Truetype rasterizer</dd>
1664<dt>variable_sizes </dt>
1665<dd class="description">1 = supports variable sizes, 0 = doesn't</dd>
1666</dl>
1667<h3 class="struct"><a name="ppd_group_s">ppd_group_s</a></h3>
1668<p class="description">Groups</p>
1669<p class="code">struct ppd_group_s {<br>
1670&nbsp;&nbsp;&nbsp;&nbsp;char text[PPD_MAX_TEXT - PPD_MAX_NAME];<br>
1671&nbsp;&nbsp;&nbsp;&nbsp;char name[PPD_MAX_NAME];<br>
1672&nbsp;&nbsp;&nbsp;&nbsp;int num_options;<br>
1673&nbsp;&nbsp;&nbsp;&nbsp;int num_subgroups;<br>
1674&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_option_t">ppd_option_t</a> *options;<br>
1675&nbsp;&nbsp;&nbsp;&nbsp;struct <a href="#ppd_group_s">ppd_group_s</a> *subgroups;<br>
1676};</p>
1677<h4 class="members">Members</h4>
1678<dl>
1679<dt>PPD_MAX_NAME] </dt>
1680<dd class="description">Human-readable group name</dd>
1681<dt>name[PPD_MAX_NAME] <span class="info">&nbsp;CUPS 1.1.18&nbsp;</span></dt>
1682<dd class="description">Group name </dd>
1683<dt>num_options </dt>
1684<dd class="description">Number of options</dd>
1685<dt>num_subgroups </dt>
1686<dd class="description">Number of sub-groups</dd>
1687<dt>options </dt>
1688<dd class="description">Options</dd>
1689<dt>subgroups </dt>
1690<dd class="description">Sub-groups (max depth = 1)</dd>
1691</dl>
1692<h3 class="struct"><a name="ppd_option_s">ppd_option_s</a></h3>
1693<p class="description">Options</p>
1694<p class="code">struct ppd_option_s {<br>
1695&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_choice_t">ppd_choice_t</a> *choices;<br>
1696&nbsp;&nbsp;&nbsp;&nbsp;char conflicted;<br>
1697&nbsp;&nbsp;&nbsp;&nbsp;char defchoice[PPD_MAX_NAME];<br>
1698&nbsp;&nbsp;&nbsp;&nbsp;char keyword[PPD_MAX_NAME];<br>
1699&nbsp;&nbsp;&nbsp;&nbsp;int num_choices;<br>
1700&nbsp;&nbsp;&nbsp;&nbsp;float order;<br>
1701&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_section_t">ppd_section_t</a> section;<br>
1702&nbsp;&nbsp;&nbsp;&nbsp;char text[PPD_MAX_TEXT];<br>
1703&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_ui_t">ppd_ui_t</a> ui;<br>
1704};</p>
1705<h4 class="members">Members</h4>
1706<dl>
1707<dt>choices </dt>
1708<dd class="description">Option choices</dd>
1709<dt>conflicted </dt>
1710<dd class="description">0 if no conflicts exist, 1 otherwise</dd>
1711<dt>defchoice[PPD_MAX_NAME] </dt>
1712<dd class="description">Default option choice</dd>
1713<dt>keyword[PPD_MAX_NAME] </dt>
1714<dd class="description">Option keyword name (&quot;PageSize&quot;, etc.)</dd>
1715<dt>num_choices </dt>
1716<dd class="description">Number of option choices</dd>
1717<dt>order </dt>
1718<dd class="description">Order number</dd>
1719<dt>section </dt>
1720<dd class="description">Section for command</dd>
1721<dt>text[PPD_MAX_TEXT] </dt>
1722<dd class="description">Human-readable text</dd>
1723<dt>ui </dt>
1724<dd class="description">Type of UI option</dd>
1725</dl>
1726<h3 class="struct"><a name="ppd_profile_s">ppd_profile_s</a></h3>
1727<p class="description">sRGB Color Profiles</p>
1728<p class="code">struct ppd_profile_s {<br>
1729&nbsp;&nbsp;&nbsp;&nbsp;float density;<br>
1730&nbsp;&nbsp;&nbsp;&nbsp;float gamma;<br>
1731&nbsp;&nbsp;&nbsp;&nbsp;float matrix[3][3];<br>
1732&nbsp;&nbsp;&nbsp;&nbsp;char media_type[PPD_MAX_NAME];<br>
1733&nbsp;&nbsp;&nbsp;&nbsp;char resolution[PPD_MAX_NAME];<br>
1734};</p>
1735<h4 class="members">Members</h4>
1736<dl>
1737<dt>density </dt>
1738<dd class="description">Ink density to use</dd>
1739<dt>gamma </dt>
1740<dd class="description">Gamma correction to use</dd>
1741<dt>matrix[3][3] </dt>
1742<dd class="description">Transform matrix</dd>
1743<dt>media_type[PPD_MAX_NAME] </dt>
1744<dd class="description">Media type or &quot;-&quot;</dd>
1745<dt>resolution[PPD_MAX_NAME] </dt>
1746<dd class="description">Resolution or &quot;-&quot;</dd>
1747</dl>
1748<h3 class="struct"><a name="ppd_size_s">ppd_size_s</a></h3>
1749<p class="description">Page Sizes</p>
1750<p class="code">struct ppd_size_s {<br>
1751&nbsp;&nbsp;&nbsp;&nbsp;float bottom;<br>
1752&nbsp;&nbsp;&nbsp;&nbsp;float left;<br>
1753&nbsp;&nbsp;&nbsp;&nbsp;float length;<br>
1754&nbsp;&nbsp;&nbsp;&nbsp;int marked;<br>
1755&nbsp;&nbsp;&nbsp;&nbsp;char name[PPD_MAX_NAME];<br>
1756&nbsp;&nbsp;&nbsp;&nbsp;float right;<br>
1757&nbsp;&nbsp;&nbsp;&nbsp;float top;<br>
1758&nbsp;&nbsp;&nbsp;&nbsp;float width;<br>
1759};</p>
1760<h4 class="members">Members</h4>
1761<dl>
1762<dt>bottom </dt>
1763<dd class="description">Bottom printable margin in points</dd>
1764<dt>left </dt>
1765<dd class="description">Left printable margin in points</dd>
1766<dt>length </dt>
1767<dd class="description">Length of media in points</dd>
1768<dt>marked </dt>
1769<dd class="description">Page size selected?</dd>
1770<dt>name[PPD_MAX_NAME] </dt>
1771<dd class="description">Media size option</dd>
1772<dt>right </dt>
1773<dd class="description">Right printable margin in points</dd>
1774<dt>top </dt>
1775<dd class="description">Top printable margin in points</dd>
1776<dt>width </dt>
1777<dd class="description">Width of media in points</dd>
1778</dl>
1779<h2 class="title"><a name="UNIONS">Unions</a></h2>
1780<h3 class="union"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppd_cplimit_u">ppd_cplimit_u</a></h3>
1781<p class="description">Custom Parameter Limit </p>
1782<p class="code">union ppd_cplimit_u {<br>
1783&nbsp;&nbsp;&nbsp;&nbsp;float custom_curve;<br>
1784&nbsp;&nbsp;&nbsp;&nbsp;int custom_int;<br>
1785&nbsp;&nbsp;&nbsp;&nbsp;float custom_invcurve;<br>
1786&nbsp;&nbsp;&nbsp;&nbsp;int custom_passcode;<br>
1787&nbsp;&nbsp;&nbsp;&nbsp;int custom_password;<br>
1788&nbsp;&nbsp;&nbsp;&nbsp;float custom_points;<br>
1789&nbsp;&nbsp;&nbsp;&nbsp;float custom_real;<br>
1790&nbsp;&nbsp;&nbsp;&nbsp;int custom_string;<br>
1791};</p>
1792<h4 class="members">Members</h4>
1793<dl>
1794<dt>custom_curve </dt>
1795<dd class="description">Gamma value</dd>
1796<dt>custom_int </dt>
1797<dd class="description">Integer value</dd>
1798<dt>custom_invcurve </dt>
1799<dd class="description">Gamma value</dd>
1800<dt>custom_passcode </dt>
1801<dd class="description">Passcode length</dd>
1802<dt>custom_password </dt>
1803<dd class="description">Password length</dd>
1804<dt>custom_points </dt>
1805<dd class="description">Measurement value</dd>
1806<dt>custom_real </dt>
1807<dd class="description">Real value</dd>
1808<dt>custom_string </dt>
1809<dd class="description">String length</dd>
1810</dl>
1811<h3 class="union"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppd_cpvalue_u">ppd_cpvalue_u</a></h3>
1812<p class="description">Custom Parameter Value </p>
1813<p class="code">union ppd_cpvalue_u {<br>
1814&nbsp;&nbsp;&nbsp;&nbsp;float custom_curve;<br>
1815&nbsp;&nbsp;&nbsp;&nbsp;int custom_int;<br>
1816&nbsp;&nbsp;&nbsp;&nbsp;float custom_invcurve;<br>
1817&nbsp;&nbsp;&nbsp;&nbsp;char *custom_passcode;<br>
1818&nbsp;&nbsp;&nbsp;&nbsp;char *custom_password;<br>
1819&nbsp;&nbsp;&nbsp;&nbsp;float custom_points;<br>
1820&nbsp;&nbsp;&nbsp;&nbsp;float custom_real;<br>
1821&nbsp;&nbsp;&nbsp;&nbsp;char *custom_string;<br>
1822};</p>
1823<h4 class="members">Members</h4>
1824<dl>
1825<dt>custom_curve </dt>
1826<dd class="description">Gamma value</dd>
1827<dt>custom_int </dt>
1828<dd class="description">Integer value</dd>
1829<dt>custom_invcurve </dt>
1830<dd class="description">Gamma value</dd>
1831<dt>custom_passcode </dt>
1832<dd class="description">Passcode value</dd>
1833<dt>custom_password </dt>
1834<dd class="description">Password value</dd>
1835<dt>custom_points </dt>
1836<dd class="description">Measurement value</dd>
1837<dt>custom_real </dt>
1838<dd class="description">Real value</dd>
1839<dt>custom_string </dt>
1840<dd class="description">String value</dd>
1841</dl>
1842<h2 class="title"><a name="ENUMERATIONS">Constants</a></h2>
1843<h3 class="enumeration"><a name="ppd_conform_e">ppd_conform_e</a></h3>
1844<p class="description"></p>
1845<h4 class="constants">Constants</h4>
1846<dl>
1847<dt>PPD_CONFORM_RELAXED </dt>
1848<dd class="description">Relax whitespace and control char</dd>
1849<dt>PPD_CONFORM_STRICT </dt>
1850<dd class="description">Require strict conformance</dd>
1851</dl>
1852<h3 class="enumeration"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppd_cptype_e">ppd_cptype_e</a></h3>
1853<p class="description">Custom Parameter Type </p>
1854<h4 class="constants">Constants</h4>
1855<dl>
1856<dt>PPD_CUSTOM_CURVE </dt>
1857<dd class="description">Curve value for f(x) = x^value</dd>
1858<dt>PPD_CUSTOM_INT </dt>
1859<dd class="description">Integer number value</dd>
1860<dt>PPD_CUSTOM_INVCURVE </dt>
1861<dd class="description">Curve value for f(x) = x^(1/value)</dd>
1862<dt>PPD_CUSTOM_PASSCODE </dt>
1863<dd class="description">String of (hidden) numbers</dd>
1864<dt>PPD_CUSTOM_PASSWORD </dt>
1865<dd class="description">String of (hidden) characters</dd>
1866<dt>PPD_CUSTOM_POINTS </dt>
1867<dd class="description">Measurement value in points</dd>
1868<dt>PPD_CUSTOM_REAL </dt>
1869<dd class="description">Real number value</dd>
1870<dt>PPD_CUSTOM_STRING </dt>
1871<dd class="description">String of characters</dd>
1872</dl>
1873<h3 class="enumeration"><a name="ppd_cs_e">ppd_cs_e</a></h3>
1874<p class="description">Colorspaces</p>
1875<h4 class="constants">Constants</h4>
1876<dl>
1877<dt>PPD_CS_CMY </dt>
1878<dd class="description">CMY colorspace</dd>
1879<dt>PPD_CS_CMYK </dt>
1880<dd class="description">CMYK colorspace</dd>
1881<dt>PPD_CS_GRAY </dt>
1882<dd class="description">Grayscale colorspace</dd>
1883<dt>PPD_CS_N </dt>
1884<dd class="description">DeviceN colorspace</dd>
1885<dt>PPD_CS_RGB </dt>
1886<dd class="description">RGB colorspace</dd>
1887<dt>PPD_CS_RGBK </dt>
1888<dd class="description">RGBK (K = gray) colorspace</dd>
1889</dl>
1890<h3 class="enumeration"><a name="ppd_section_e">ppd_section_e</a></h3>
1891<p class="description">Order dependency sections</p>
1892<h4 class="constants">Constants</h4>
1893<dl>
1894<dt>PPD_ORDER_ANY </dt>
1895<dd class="description">Option code can be anywhere in the file</dd>
1896<dt>PPD_ORDER_DOCUMENT </dt>
1897<dd class="description">... must be in the DocumentSetup section</dd>
1898<dt>PPD_ORDER_EXIT </dt>
1899<dd class="description">... must be sent prior to the document</dd>
1900<dt>PPD_ORDER_JCL </dt>
1901<dd class="description">... must be sent as a JCL command</dd>
1902<dt>PPD_ORDER_PAGE </dt>
1903<dd class="description">... must be in the PageSetup section</dd>
1904<dt>PPD_ORDER_PROLOG </dt>
1905<dd class="description">... must be in the Prolog section</dd>
1906</dl>
1907<h3 class="enumeration"><a name="ppd_status_e">ppd_status_e</a></h3>
1908<p class="description">Types and structures...</p>
1909<h4 class="constants">Constants</h4>
1910<dl>
1911<dt>PPD_ALLOC_ERROR </dt>
1912<dd class="description">Memory allocation error</dd>
1913<dt>PPD_BAD_CUSTOM_PARAM </dt>
1914<dd class="description">Bad custom parameter</dd>
1915<dt>PPD_BAD_OPEN_GROUP </dt>
1916<dd class="description">Bad OpenGroup</dd>
1917<dt>PPD_BAD_OPEN_UI </dt>
1918<dd class="description">Bad OpenUI/JCLOpenUI</dd>
1919<dt>PPD_BAD_ORDER_DEPENDENCY </dt>
1920<dd class="description">Bad OrderDependency</dd>
1921<dt>PPD_BAD_UI_CONSTRAINTS </dt>
1922<dd class="description">Bad UIConstraints</dd>
1923<dt>PPD_FILE_OPEN_ERROR </dt>
1924<dd class="description">Unable to open PPD file</dd>
1925<dt>PPD_ILLEGAL_CHARACTER </dt>
1926<dd class="description">Illegal control character</dd>
1927<dt>PPD_ILLEGAL_MAIN_KEYWORD </dt>
1928<dd class="description">Illegal main keyword string</dd>
1929<dt>PPD_ILLEGAL_OPTION_KEYWORD </dt>
1930<dd class="description">Illegal option keyword string</dd>
1931<dt>PPD_ILLEGAL_TRANSLATION </dt>
1932<dd class="description">Illegal translation string</dd>
1933<dt>PPD_ILLEGAL_WHITESPACE </dt>
1934<dd class="description">Illegal whitespace character</dd>
1935<dt>PPD_INTERNAL_ERROR </dt>
1936<dd class="description">Internal error</dd>
1937<dt>PPD_LINE_TOO_LONG </dt>
1938<dd class="description">Line longer than 255 chars</dd>
1939<dt>PPD_MISSING_ASTERISK </dt>
1940<dd class="description">Missing asterisk in column 0</dd>
1941<dt>PPD_MISSING_PPDADOBE4 </dt>
1942<dd class="description">Missing PPD-Adobe-4.x header</dd>
1943<dt>PPD_MISSING_VALUE </dt>
1944<dd class="description">Missing value string</dd>
1945<dt>PPD_NESTED_OPEN_GROUP </dt>
1946<dd class="description">OpenGroup without a CloseGroup first</dd>
1947<dt>PPD_NESTED_OPEN_UI </dt>
1948<dd class="description">OpenUI/JCLOpenUI without a CloseUI/JCLCloseUI first</dd>
1949<dt>PPD_NULL_FILE </dt>
1950<dd class="description">NULL PPD file pointer</dd>
1951<dt>PPD_OK </dt>
1952<dd class="description">OK</dd>
1953</dl>
1954<h3 class="enumeration"><a name="ppd_ui_e">ppd_ui_e</a></h3>
1955<p class="description">UI Types</p>
1956<h4 class="constants">Constants</h4>
1957<dl>
1958<dt>PPD_UI_BOOLEAN </dt>
1959<dd class="description">True or False option</dd>
1960<dt>PPD_UI_PICKMANY </dt>
1961<dd class="description">Pick zero or more from a list</dd>
1962<dt>PPD_UI_PICKONE </dt>
1963<dd class="description">Pick one from a list</dd>
1964</dl>
1965</div>
ef416fc2 1966</body>
1967</html>