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