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