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