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