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