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