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