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