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