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