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