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