1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
3 <!-- SECTION: Programming -->
6 <meta name='keywords' content='Programming'
>
7 <meta name='creator' content='Mini-XML v2.3'
>
8 <style type='text/css'
><!--
9 h1, h2, h3, p { font-family: sans-serif; text-align: justify; }
10 tt, pre a:link, pre a:visited, tt a:link, tt a:visited { font-weight: bold; color: #7f0000; }
11 pre { font-weight: bold; color: #7f0000; margin-left: 2em; }
12 span.info { background: #000000; border: solid thin #000000; color: #ffffff; font-size: 80%; font-style: italic; font-weight: bold; white-space: nowrap; }
13 h3 span.info { float: right; font-size: 100%; }
14 h1.title, h2.title, h3.title { border-bottom: solid 2px #000000; }
19 "$Id: api-ppd.shtml 6649 2007-07-11 21:46:42Z mike $"
21 PPD API introduction for the Common UNIX Printing System (CUPS).
23 Copyright 2007 by Apple Inc.
24 Copyright 1997-2006 by Easy Software Products, all rights reserved.
26 These coded instructions, statements, and computer programs are the
27 property of Apple Inc. and are protected by Federal copyright
28 law. Distribution and use rights are outlined in the file "LICENSE.txt"
29 which should have been included with this file. If this file is
30 file is missing or damaged, see the license at "http://www.cups.org/".
33 <h2 class='title'
>Introduction
</h2>
35 <p>The CUPS PPD API provides read-only access the data in
36 PostScript Printer Description (
"PPD") files. With it you can
37 display printer options to users, mark option choices and check
38 for conflicting choices, and output marked choices in PostScript
41 <h2 class='title'
>General Usage
</h2>
43 <p>The
<var><cups/ppd.h
></var> header file must be included
44 to use the
<tt>ppd
</tt> functions.
</p>
46 <p>Programs using these functions must be linked to the CUPS
47 library:
<var>libcups.a
</var>,
<var>libcups.so
.2</var>,
48 <var>libcups
.2.dylib
</var>,
<var>libcups_s.a
</var>, or
49 <var>libcups2.lib
</var> depending on the platform. The following
50 command compiles
<var>myprogram.c
</var> using GCC and the CUPS
54 <kbd>gcc -o myprogram myprogram.c -lcups
</kbd>
57 <h2 class='title'
>Compatibility
</h2>
59 <p>Unless otherwise specified, the PPD API functions require CUPS
61 <h2 class='title'
>Contents
</h2>
63 <li><a href='#ENUMERATIONS'
>Enumerations
</a></li>
64 <li><a href='#FUNCTIONS'
>Functions
</a></li>
65 <li><a href='#STRUCTURES'
>Structures
</a></li>
66 <li><a href='#TYPES'
>Types
</a></li>
67 <li><a href='#UNIONS'
>Unions
</a></li>
70 <h2 class='title'
><a name='ENUMERATIONS'
>Enumerations
</a></h2>
72 <li><a href='#ppd_conform_e'
><tt>ppd_conform_e
</tt></a> </li>
73 <li><a href='#ppd_cptype_e'
><tt>ppd_cptype_e
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
74 <li><a href='#ppd_cs_e'
><tt>ppd_cs_e
</tt></a> </li>
75 <li><a href='#ppd_section_e'
><tt>ppd_section_e
</tt></a> </li>
76 <li><a href='#ppd_status_e'
><tt>ppd_status_e
</tt></a> </li>
77 <li><a href='#ppd_ui_e'
><tt>ppd_ui_e
</tt></a> </li>
80 <h3 class='title'
><a name='ppd_conform_e'
>ppd_conform_e
</a></h3>
84 <div class='table'
><table align='center' border='
1' width='
80%' summary='Values'
>
85 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
87 <tr><td><tt>PPD_CONFORM_RELAXED
</tt> </td><td>Relax whitespace and control char
89 <tr><td><tt>PPD_CONFORM_STRICT
</tt> </td><td>Require strict conformance
91 </tbody></table></div>
93 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ppd_cptype_e'
>ppd_cptype_e
</a></h3>
95 <p>Custom Parameter Type
97 <div class='table'
><table align='center' border='
1' width='
80%' summary='Values'
>
98 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
100 <tr><td><tt>PPD_CUSTOM_CURVE
</tt> </td><td>Curve value for f(x) = x^value
102 <tr><td><tt>PPD_CUSTOM_INT
</tt> </td><td>Integer number value
104 <tr><td><tt>PPD_CUSTOM_INVCURVE
</tt> </td><td>Curve value for f(x) = x^(
1/value)
106 <tr><td><tt>PPD_CUSTOM_PASSCODE
</tt> </td><td>String of (hidden) numbers
108 <tr><td><tt>PPD_CUSTOM_PASSWORD
</tt> </td><td>String of (hidden) characters
110 <tr><td><tt>PPD_CUSTOM_POINTS
</tt> </td><td>Measurement value in points
112 <tr><td><tt>PPD_CUSTOM_REAL
</tt> </td><td>Real number value
114 <tr><td><tt>PPD_CUSTOM_STRING
</tt> </td><td>String of characters
116 </tbody></table></div>
118 <h3 class='title'
><a name='ppd_cs_e'
>ppd_cs_e
</a></h3>
122 <div class='table'
><table align='center' border='
1' width='
80%' summary='Values'
>
123 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
125 <tr><td><tt>PPD_CS_CMY
</tt> </td><td>CMY colorspace
127 <tr><td><tt>PPD_CS_CMYK
</tt> </td><td>CMYK colorspace
129 <tr><td><tt>PPD_CS_GRAY
</tt> </td><td>Grayscale colorspace
131 <tr><td><tt>PPD_CS_N
</tt> </td><td>DeviceN colorspace
133 <tr><td><tt>PPD_CS_RGB
</tt> </td><td>RGB colorspace
135 <tr><td><tt>PPD_CS_RGBK
</tt> </td><td>RGBK (K = gray) colorspace
137 </tbody></table></div>
139 <h3 class='title'
><a name='ppd_section_e'
>ppd_section_e
</a></h3>
141 <p>Order dependency sections
143 <div class='table'
><table align='center' border='
1' width='
80%' summary='Values'
>
144 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
146 <tr><td><tt>PPD_ORDER_ANY
</tt> </td><td>Option code can be anywhere in the file
148 <tr><td><tt>PPD_ORDER_DOCUMENT
</tt> </td><td>... must be in the DocumentSetup section
150 <tr><td><tt>PPD_ORDER_EXIT
</tt> </td><td>... must be sent prior to the document
152 <tr><td><tt>PPD_ORDER_JCL
</tt> </td><td>... must be sent as a JCL command
154 <tr><td><tt>PPD_ORDER_PAGE
</tt> </td><td>... must be in the PageSetup section
156 <tr><td><tt>PPD_ORDER_PROLOG
</tt> </td><td>... must be in the Prolog section
158 </tbody></table></div>
160 <h3 class='title'
><a name='ppd_status_e'
>ppd_status_e
</a></h3>
162 <p>Types and structures...
164 <div class='table'
><table align='center' border='
1' width='
80%' summary='Values'
>
165 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
167 <tr><td><tt>PPD_ALLOC_ERROR
</tt> </td><td>Memory allocation error
169 <tr><td><tt>PPD_BAD_CUSTOM_PARAM
</tt> </td><td>Bad custom parameter
171 <tr><td><tt>PPD_BAD_OPEN_GROUP
</tt> </td><td>Bad OpenGroup
173 <tr><td><tt>PPD_BAD_OPEN_UI
</tt> </td><td>Bad OpenUI/JCLOpenUI
175 <tr><td><tt>PPD_BAD_ORDER_DEPENDENCY
</tt> </td><td>Bad OrderDependency
177 <tr><td><tt>PPD_BAD_UI_CONSTRAINTS
</tt> </td><td>Bad UIConstraints
179 <tr><td><tt>PPD_FILE_OPEN_ERROR
</tt> </td><td>Unable to open PPD file
181 <tr><td><tt>PPD_ILLEGAL_CHARACTER
</tt> </td><td>Illegal control character
183 <tr><td><tt>PPD_ILLEGAL_MAIN_KEYWORD
</tt> </td><td>Illegal main keyword string
185 <tr><td><tt>PPD_ILLEGAL_OPTION_KEYWORD
</tt> </td><td>Illegal option keyword string
187 <tr><td><tt>PPD_ILLEGAL_TRANSLATION
</tt> </td><td>Illegal translation string
189 <tr><td><tt>PPD_ILLEGAL_WHITESPACE
</tt> </td><td>Illegal whitespace character
191 <tr><td><tt>PPD_INTERNAL_ERROR
</tt> </td><td>Internal error
193 <tr><td><tt>PPD_LINE_TOO_LONG
</tt> </td><td>Line longer than
255 chars
195 <tr><td><tt>PPD_MISSING_ASTERISK
</tt> </td><td>Missing asterisk in column
0
197 <tr><td><tt>PPD_MISSING_PPDADOBE4
</tt> </td><td>Missing PPD-Adobe-
4.x header
199 <tr><td><tt>PPD_MISSING_VALUE
</tt> </td><td>Missing value string
201 <tr><td><tt>PPD_NESTED_OPEN_GROUP
</tt> </td><td>OpenGroup without a CloseGroup first
203 <tr><td><tt>PPD_NESTED_OPEN_UI
</tt> </td><td>OpenUI/JCLOpenUI without a CloseUI/JCLCloseUI first
205 <tr><td><tt>PPD_NULL_FILE
</tt> </td><td>NULL PPD file pointer
207 <tr><td><tt>PPD_OK
</tt> </td><td>OK
209 </tbody></table></div>
211 <h3 class='title'
><a name='ppd_ui_e'
>ppd_ui_e
</a></h3>
215 <div class='table'
><table align='center' border='
1' width='
80%' summary='Values'
>
216 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
218 <tr><td><tt>PPD_UI_BOOLEAN
</tt> </td><td>True or False option
220 <tr><td><tt>PPD_UI_PICKMANY
</tt> </td><td>Pick zero or more from a list
222 <tr><td><tt>PPD_UI_PICKONE
</tt> </td><td>Pick one from a list
224 </tbody></table></div>
226 <h2 class='title'
><a name='FUNCTIONS'
>Functions
</a></h2>
228 <li><a href='#ppdClose'
><tt>ppdClose()
</tt></a> </li>
229 <li><a href='#ppdCollect'
><tt>ppdCollect()
</tt></a> </li>
230 <li><a href='#ppdCollect2'
><tt>ppdCollect2()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
231 <li><a href='#ppdConflicts'
><tt>ppdConflicts()
</tt></a> </li>
232 <li><a href='#ppdEmit'
><tt>ppdEmit()
</tt></a> </li>
233 <li><a href='#ppdEmitAfterOrder'
><tt>ppdEmitAfterOrder()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
234 <li><a href='#ppdEmitFd'
><tt>ppdEmitFd()
</tt></a> </li>
235 <li><a href='#ppdEmitJCL'
><tt>ppdEmitJCL()
</tt></a> </li>
236 <li><a href='#ppdEmitJCLEnd'
><tt>ppdEmitJCLEnd()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
237 <li><a href='#ppdEmitString'
><tt>ppdEmitString()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
238 <li><a href='#ppdErrorString'
><tt>ppdErrorString()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
239 <li><a href='#ppdFindAttr'
><tt>ppdFindAttr()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
240 <li><a href='#ppdFindChoice'
><tt>ppdFindChoice()
</tt></a> </li>
241 <li><a href='#ppdFindCustomOption'
><tt>ppdFindCustomOption()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
242 <li><a href='#ppdFindCustomParam'
><tt>ppdFindCustomParam()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
243 <li><a href='#ppdFindMarkedChoice'
><tt>ppdFindMarkedChoice()
</tt></a> </li>
244 <li><a href='#ppdFindNextAttr'
><tt>ppdFindNextAttr()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
245 <li><a href='#ppdFindOption'
><tt>ppdFindOption()
</tt></a> </li>
246 <li><a href='#ppdFirstCustomParam'
><tt>ppdFirstCustomParam()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
247 <li><a href='#ppdFirstOption'
><tt>ppdFirstOption()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
248 <li><a href='#ppdIsMarked'
><tt>ppdIsMarked()
</tt></a> </li>
249 <li><a href='#ppdLastError'
><tt>ppdLastError()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
250 <li><a href='#ppdLocalize'
><tt>ppdLocalize()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
251 <li><a href='#ppdLocalizeIPPReason'
><tt>ppdLocalizeIPPReason()
</tt></a> <span class='info'
> CUPS
1.3 </span></li>
252 <li><a href='#ppdMarkDefaults'
><tt>ppdMarkDefaults()
</tt></a> </li>
253 <li><a href='#ppdMarkOption'
><tt>ppdMarkOption()
</tt></a> </li>
254 <li><a href='#ppdNextCustomParam'
><tt>ppdNextCustomParam()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
255 <li><a href='#ppdNextOption'
><tt>ppdNextOption()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
256 <li><a href='#ppdOpen'
><tt>ppdOpen()
</tt></a> </li>
257 <li><a href='#ppdOpen2'
><tt>ppdOpen2()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
258 <li><a href='#ppdOpenFd'
><tt>ppdOpenFd()
</tt></a> </li>
259 <li><a href='#ppdOpenFile'
><tt>ppdOpenFile()
</tt></a> </li>
260 <li><a href='#ppdPageLength'
><tt>ppdPageLength()
</tt></a> </li>
261 <li><a href='#ppdPageSize'
><tt>ppdPageSize()
</tt></a> </li>
262 <li><a href='#ppdPageWidth'
><tt>ppdPageWidth()
</tt></a> </li>
263 <li><a href='#ppdSetConformance'
><tt>ppdSetConformance()
</tt></a> <span class='info'
> CUPS
1.1.20 </span></li>
266 <h3 class='title'
><a name='ppdClose'
>ppdClose()
</a></h3>
268 <p>Free all memory used by the PPD file.
273 <a href='#ppd_file_t'
>ppd_file_t
</a> * ppd);
276 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
277 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
279 <tr><td><tt>ppd
</tt></td><td>PPD file record
</td></tr>
280 </tbody></table></div>
284 <h3 class='title'
><a name='ppdCollect'
>ppdCollect()
</a></h3>
286 <p>Collect all marked options that reside in the specified
292 <a href='#ppd_file_t'
>ppd_file_t
</a> * ppd,
293 <a href='#ppd_section_t'
>ppd_section_t
</a> section,
294 <a href='#ppd_choice_t'
>ppd_choice_t
</a> *** choices);
297 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
298 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
300 <tr><td><tt>ppd
</tt></td><td>PPD file data
</td></tr>
301 <tr><td><tt>section
</tt></td><td>Section to collect
</td></tr>
302 <tr><td><tt>choices
</tt></td><td>Pointers to choices
</td></tr>
303 </tbody></table></div>
305 <p>Number of options marked
</p>
307 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ppdCollect2'
>ppdCollect2()
</a></h3>
309 <p>Collect all marked options that reside in the
310 specified section and minimum order.
317 <a href='#ppd_file_t'
>ppd_file_t
</a> * ppd,
318 <a href='#ppd_section_t'
>ppd_section_t
</a> section,
320 <a href='#ppd_choice_t'
>ppd_choice_t
</a> *** choices);
323 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
324 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
326 <tr><td><tt>ppd
</tt></td><td>PPD file data
</td></tr>
327 <tr><td><tt>section
</tt></td><td>Section to collect
</td></tr>
328 <tr><td><tt>min_order
</tt></td><td>Minimum OrderDependency value
</td></tr>
329 <tr><td><tt>choices
</tt></td><td>Pointers to choices
</td></tr>
330 </tbody></table></div>
332 <p>Number of options marked
</p>
334 <h3 class='title'
><a name='ppdConflicts'
>ppdConflicts()
</a></h3>
336 <p>Check to see if there are any conflicts.
341 <a href='#ppd_file_t'
>ppd_file_t
</a> * ppd);
344 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
345 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
347 <tr><td><tt>ppd
</tt></td><td>PPD to check
</td></tr>
348 </tbody></table></div>
350 <p>Number of conflicts found
</p>
352 <h3 class='title'
><a name='ppdEmit'
>ppdEmit()
</a></h3>
354 <p>Emit code for marked options to a file.
359 <a href='#ppd_file_t'
>ppd_file_t
</a> * ppd,
361 <a href='#ppd_section_t'
>ppd_section_t
</a> section);
364 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
365 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
367 <tr><td><tt>ppd
</tt></td><td>PPD file record
</td></tr>
368 <tr><td><tt>fp
</tt></td><td>File to write to
</td></tr>
369 <tr><td><tt>section
</tt></td><td>Section to write
</td></tr>
370 </tbody></table></div>
372 <p>0 on success, -
1 on failure
</p>
374 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ppdEmitAfterOrder'
>ppdEmitAfterOrder()
</a></h3>
376 <p>Emit a subset of the code for marked options to a file.
377 <p>When
"limit
" is non-zero, this function only emits options whose
378 OrderDependency value is greater than or equal to
"min_order
".
379 <p>When
"limit
" is zero, this function is identical to ppdEmit().
386 <a href='#ppd_file_t'
>ppd_file_t
</a> * ppd,
388 <a href='#ppd_section_t'
>ppd_section_t
</a> section,
393 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
394 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
396 <tr><td><tt>ppd
</tt></td><td>PPD file record
</td></tr>
397 <tr><td><tt>fp
</tt></td><td>File to write to
</td></tr>
398 <tr><td><tt>section
</tt></td><td>Section to write
</td></tr>
399 <tr><td><tt>limit
</tt></td><td>Non-zero to use min_order
</td></tr>
400 <tr><td><tt>min_order
</tt></td><td>Lowest OrderDependency
</td></tr>
401 </tbody></table></div>
403 <p>0 on success, -
1 on failure
</p>
405 <h3 class='title'
><a name='ppdEmitFd'
>ppdEmitFd()
</a></h3>
407 <p>Emit code for marked options to a file.
412 <a href='#ppd_file_t'
>ppd_file_t
</a> * ppd,
414 <a href='#ppd_section_t'
>ppd_section_t
</a> section);
417 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
418 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
420 <tr><td><tt>ppd
</tt></td><td>PPD file record
</td></tr>
421 <tr><td><tt>fd
</tt></td><td>File to write to
</td></tr>
422 <tr><td><tt>section
</tt></td><td>Section to write
</td></tr>
423 </tbody></table></div>
425 <p>0 on success, -
1 on failure
</p>
427 <h3 class='title'
><a name='ppdEmitJCL'
>ppdEmitJCL()
</a></h3>
429 <p>Emit code for JCL options to a file.
434 <a href='#ppd_file_t'
>ppd_file_t
</a> * ppd,
441 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
442 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
444 <tr><td><tt>ppd
</tt></td><td>PPD file record
</td></tr>
445 <tr><td><tt>fp
</tt></td><td>File to write to
</td></tr>
446 <tr><td><tt>job_id
</tt></td><td>Job ID
</td></tr>
447 <tr><td><tt>user
</tt></td><td>Username
</td></tr>
448 <tr><td><tt>title
</tt></td><td>Title
</td></tr>
449 </tbody></table></div>
451 <p>0 on success, -
1 on failure
</p>
453 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ppdEmitJCLEnd'
>ppdEmitJCLEnd()
</a></h3>
455 <p>Emit JCLEnd code to a file.
462 <a href='#ppd_file_t'
>ppd_file_t
</a> * ppd,
466 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
467 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
469 <tr><td><tt>ppd
</tt></td><td>PPD file record
</td></tr>
470 <tr><td><tt>fp
</tt></td><td>File to write to
</td></tr>
471 </tbody></table></div>
473 <p>0 on success, -
1 on failure
</p>
475 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ppdEmitString'
>ppdEmitString()
</a></h3>
477 <p>Get a string containing the code for marked options.
478 <p>When
"min_order
" is greater than zero, this function only includes options
479 whose OrderDependency value is greater than or equal to
"min_order
".
480 Otherwise, all options in the specified section are included in the
482 <p>The return string is allocated on the heap and should be freed using
483 free() when you are done with it.
490 <a href='#ppd_file_t'
>ppd_file_t
</a> * ppd,
491 <a href='#ppd_section_t'
>ppd_section_t
</a> section,
495 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
496 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
498 <tr><td><tt>ppd
</tt></td><td>PPD file record
</td></tr>
499 <tr><td><tt>section
</tt></td><td>Section to write
</td></tr>
500 <tr><td><tt>min_order
</tt></td><td>Lowest OrderDependency
</td></tr>
501 </tbody></table></div>
503 <p>String containing option code
</p>
505 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='ppdErrorString'
>ppdErrorString()
</a></h3>
507 <p>Returns the text assocated with a status.
514 ppd_status_t status);
517 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
518 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
520 <tr><td><tt>status
</tt></td><td>PPD status
</td></tr>
521 </tbody></table></div>
525 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='ppdFindAttr'
>ppdFindAttr()
</a></h3>
527 <p>Find the first matching attribute...
532 <a href='#ppd_attr_t'
>ppd_attr_t
</a> *
<br>
534 <a href='#ppd_file_t'
>ppd_file_t
</a> * ppd,
539 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
540 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
542 <tr><td><tt>ppd
</tt></td><td>PPD file data
</td></tr>
543 <tr><td><tt>name
</tt></td><td>Attribute name
</td></tr>
544 <tr><td><tt>spec
</tt></td><td>Specifier string or NULL
</td></tr>
545 </tbody></table></div>
547 <p>Attribute or NULL if not found
</p>
549 <h3 class='title'
><a name='ppdFindChoice'
>ppdFindChoice()
</a></h3>
551 <p>Return a pointer to an option choice.
554 <a href='#ppd_choice_t'
>ppd_choice_t
</a> *
<br>
556 <a href='#ppd_option_t'
>ppd_option_t
</a> * o,
557 const char * choice);
560 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
561 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
563 <tr><td><tt>o
</tt></td><td>Pointer to option
</td></tr>
564 <tr><td><tt>choice
</tt></td><td>Name of choice
</td></tr>
565 </tbody></table></div>
567 <p>Choice pointer or NULL
</p>
569 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ppdFindCustomOption'
>ppdFindCustomOption()
</a></h3>
571 <p>Find a custom option.
576 <a href='#ppd_coption_t'
>ppd_coption_t
</a> *
<br>
578 <a href='#ppd_file_t'
>ppd_file_t
</a> * ppd,
579 const char * keyword);
582 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
583 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
585 <tr><td><tt>ppd
</tt></td><td>PPD file
</td></tr>
586 <tr><td><tt>keyword
</tt></td><td>Custom option name
</td></tr>
587 </tbody></table></div>
589 <p>Custom option or NULL
</p>
591 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ppdFindCustomParam'
>ppdFindCustomParam()
</a></h3>
593 <p>Find a parameter for a custom option.
598 <a href='#ppd_cparam_t'
>ppd_cparam_t
</a> *
<br>
600 <a href='#ppd_coption_t'
>ppd_coption_t
</a> * opt,
604 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
605 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
607 <tr><td><tt>opt
</tt></td><td>Custom option
</td></tr>
608 <tr><td><tt>name
</tt></td><td>Parameter name
</td></tr>
609 </tbody></table></div>
611 <p>Custom parameter or NULL
</p>
613 <h3 class='title'
><a name='ppdFindMarkedChoice'
>ppdFindMarkedChoice()
</a></h3>
615 <p>Return the marked choice for the specified option.
618 <a href='#ppd_choice_t'
>ppd_choice_t
</a> *
<br>
620 <a href='#ppd_file_t'
>ppd_file_t
</a> * ppd,
621 const char * option);
624 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
625 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
627 <tr><td><tt>ppd
</tt></td><td>PPD file
</td></tr>
628 <tr><td><tt>option
</tt></td><td>Keyword/option name
</td></tr>
629 </tbody></table></div>
631 <p>Pointer to choice or NULL
</p>
633 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='ppdFindNextAttr'
>ppdFindNextAttr()
</a></h3>
635 <p>Find the next matching attribute...
640 <a href='#ppd_attr_t'
>ppd_attr_t
</a> *
<br>
642 <a href='#ppd_file_t'
>ppd_file_t
</a> * ppd,
647 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
648 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
650 <tr><td><tt>ppd
</tt></td><td>PPD file data
</td></tr>
651 <tr><td><tt>name
</tt></td><td>Attribute name
</td></tr>
652 <tr><td><tt>spec
</tt></td><td>Specifier string or NULL
</td></tr>
653 </tbody></table></div>
655 <p>Attribute or NULL if not found
</p>
657 <h3 class='title'
><a name='ppdFindOption'
>ppdFindOption()
</a></h3>
659 <p>Return a pointer to the specified option.
662 <a href='#ppd_option_t'
>ppd_option_t
</a> *
<br>
664 <a href='#ppd_file_t'
>ppd_file_t
</a> * ppd,
665 const char * option);
668 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
669 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
671 <tr><td><tt>ppd
</tt></td><td>PPD file data
</td></tr>
672 <tr><td><tt>option
</tt></td><td>Option/Keyword name
</td></tr>
673 </tbody></table></div>
675 <p>Pointer to option or NULL
</p>
677 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ppdFirstCustomParam'
>ppdFirstCustomParam()
</a></h3>
679 <p>Return the first parameter for a custom option.
684 <a href='#ppd_cparam_t'
>ppd_cparam_t
</a> *
<br>
686 <a href='#ppd_coption_t'
>ppd_coption_t
</a> * opt);
689 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
690 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
692 <tr><td><tt>opt
</tt></td><td>Custom option
</td></tr>
693 </tbody></table></div>
695 <p>Custom parameter or NULL
</p>
697 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ppdFirstOption'
>ppdFirstOption()
</a></h3>
699 <p>Return the first option in the PPD file.
700 <p>Options are returned from all groups in sorted order.
705 <a href='#ppd_option_t'
>ppd_option_t
</a> *
<br>
707 <a href='#ppd_file_t'
>ppd_file_t
</a> * ppd);
710 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
711 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
713 <tr><td><tt>ppd
</tt></td><td>PPD file
</td></tr>
714 </tbody></table></div>
716 <p>First option or NULL
</p>
718 <h3 class='title'
><a name='ppdIsMarked'
>ppdIsMarked()
</a></h3>
720 <p>Check to see if an option is marked...
725 <a href='#ppd_file_t'
>ppd_file_t
</a> * ppd,
727 const char * choice);
730 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
731 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
733 <tr><td><tt>ppd
</tt></td><td>PPD file data
</td></tr>
734 <tr><td><tt>option
</tt></td><td>Option/Keyword name
</td></tr>
735 <tr><td><tt>choice
</tt></td><td>Choice name
</td></tr>
736 </tbody></table></div>
738 <p>Non-zero if option is marked
</p>
740 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='ppdLastError'
>ppdLastError()
</a></h3>
742 <p>Return the status from the last ppdOpen*().
752 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
753 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
755 <tr><td><tt>line
</tt></td><td>Line number
</td></tr>
756 </tbody></table></div>
760 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ppdLocalize'
>ppdLocalize()
</a></h3>
762 <p>Localize the PPD file to the current locale.
763 <p>All groups, options, and choices are localized, as are ICC profile
764 descriptions, printer presets, and custom option parameters. Each
765 localized string uses the UTF-
8 character encoding.
772 <a href='#ppd_file_t'
>ppd_file_t
</a> * ppd);
775 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
776 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
778 <tr><td><tt>ppd
</tt></td><td>PPD file
</td></tr>
779 </tbody></table></div>
781 <p>0 on success, -
1 on error
</p>
783 <h3 class='title'
><span class='info'
> CUPS
1.3 </span><a name='ppdLocalizeIPPReason'
>ppdLocalizeIPPReason()
</a></h3>
785 <p>Get the localized version of a cupsIPPReason
787 <p>This function uses the current locale to find the corresponding reason
788 text or URI from the attribute value. If
"scheme
" is NULL or
"text
",
789 the returned value contains human-readable (UTF-
8) text from the translation
790 string or attribute value. Otherwise the corresponding URI is returned.
791 <p>If no value of the requested scheme can be found, NULL is returned.
797 ppdLocalizeIPPReason(
798 <a href='#ppd_file_t'
>ppd_file_t
</a> * ppd,
805 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
806 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
808 <tr><td><tt>ppd
</tt></td><td>PPD file
</td></tr>
809 <tr><td><tt>reason
</tt></td><td>IPP reason keyword to look up
</td></tr>
810 <tr><td><tt>scheme
</tt></td><td>URI scheme or NULL for text
</td></tr>
811 <tr><td><tt>buffer
</tt></td><td>Value buffer
</td></tr>
812 <tr><td><tt>bufsize
</tt></td><td>Size of value buffer
</td></tr>
813 </tbody></table></div>
815 <p>Value or NULL if not found
</p>
817 <h3 class='title'
><a name='ppdMarkDefaults'
>ppdMarkDefaults()
</a></h3>
819 <p>Mark all default options in the PPD file.
824 <a href='#ppd_file_t'
>ppd_file_t
</a> * ppd);
827 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
828 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
830 <tr><td><tt>ppd
</tt></td><td>PPD file record
</td></tr>
831 </tbody></table></div>
835 <h3 class='title'
><a name='ppdMarkOption'
>ppdMarkOption()
</a></h3>
837 <p>Mark an option in a PPD file.
839 <p>-
1 is returned if the given option would conflict with any currently
845 <a href='#ppd_file_t'
>ppd_file_t
</a> * ppd,
847 const char * choice);
850 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
851 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
853 <tr><td><tt>ppd
</tt></td><td>PPD file record
</td></tr>
854 <tr><td><tt>option
</tt></td><td>Keyword
</td></tr>
855 <tr><td><tt>choice
</tt></td><td>Option name
</td></tr>
856 </tbody></table></div>
858 <p>Number of conflicts
</p>
860 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ppdNextCustomParam'
>ppdNextCustomParam()
</a></h3>
862 <p>Return the next parameter for a custom option.
867 <a href='#ppd_cparam_t'
>ppd_cparam_t
</a> *
<br>
869 <a href='#ppd_coption_t'
>ppd_coption_t
</a> * opt);
872 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
873 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
875 <tr><td><tt>opt
</tt></td><td>Custom option
</td></tr>
876 </tbody></table></div>
878 <p>Custom parameter or NULL
</p>
880 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ppdNextOption'
>ppdNextOption()
</a></h3>
882 <p>Return the next option in the PPD file.
883 <p>Options are returned from all groups in sorted order.
888 <a href='#ppd_option_t'
>ppd_option_t
</a> *
<br>
890 <a href='#ppd_file_t'
>ppd_file_t
</a> * ppd);
893 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
894 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
896 <tr><td><tt>ppd
</tt></td><td>PPD file
</td></tr>
897 </tbody></table></div>
899 <p>Next option or NULL
</p>
901 <h3 class='title'
><a name='ppdOpen'
>ppdOpen()
</a></h3>
903 <p>Read a PPD file into memory.
906 <a href='#ppd_file_t'
>ppd_file_t
</a> *
<br>
911 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
912 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
914 <tr><td><tt>fp
</tt></td><td>File to read from
</td></tr>
915 </tbody></table></div>
917 <p>PPD file record
</p>
919 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ppdOpen2'
>ppdOpen2()
</a></h3>
921 <p>Read a PPD file into memory.
926 <a href='#ppd_file_t'
>ppd_file_t
</a> *
<br>
931 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
932 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
934 <tr><td><tt>fp
</tt></td><td>File to read from
</td></tr>
935 </tbody></table></div>
937 <p>PPD file record
</p>
939 <h3 class='title'
><a name='ppdOpenFd'
>ppdOpenFd()
</a></h3>
941 <p>Read a PPD file into memory.
944 <a href='#ppd_file_t'
>ppd_file_t
</a> *
<br>
949 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
950 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
952 <tr><td><tt>fd
</tt></td><td>File to read from
</td></tr>
953 </tbody></table></div>
955 <p>PPD file record
</p>
957 <h3 class='title'
><a name='ppdOpenFile'
>ppdOpenFile()
</a></h3>
959 <p>Read a PPD file into memory.
962 <a href='#ppd_file_t'
>ppd_file_t
</a> *
<br>
964 const char * filename);
967 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
968 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
970 <tr><td><tt>filename
</tt></td><td>File to read from
</td></tr>
971 </tbody></table></div>
973 <p>PPD file record
</p>
975 <h3 class='title'
><a name='ppdPageLength'
>ppdPageLength()
</a></h3>
977 <p>Get the page length for the given size.
982 <a href='#ppd_file_t'
>ppd_file_t
</a> * ppd,
986 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
987 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
989 <tr><td><tt>ppd
</tt></td><td>PPD file
</td></tr>
990 <tr><td><tt>name
</tt></td><td>Size name
</td></tr>
991 </tbody></table></div>
993 <p>Length of page in points or
0.0</p>
995 <h3 class='title'
><a name='ppdPageSize'
>ppdPageSize()
</a></h3>
997 <p>Get the page size record for the given size.
1000 <a href='#ppd_size_t'
>ppd_size_t
</a> *
<br>
1002 <a href='#ppd_file_t'
>ppd_file_t
</a> * ppd,
1006 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
1007 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1009 <tr><td><tt>ppd
</tt></td><td>PPD file record
</td></tr>
1010 <tr><td><tt>name
</tt></td><td>Size name
</td></tr>
1011 </tbody></table></div>
1013 <p>Size record for page or NULL
</p>
1015 <h3 class='title'
><a name='ppdPageWidth'
>ppdPageWidth()
</a></h3>
1016 <h4>Description
</h4>
1017 <p>Get the page width for the given size.
1022 <a href='#ppd_file_t'
>ppd_file_t
</a> * ppd,
1026 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
1027 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1029 <tr><td><tt>ppd
</tt></td><td>PPD file record
</td></tr>
1030 <tr><td><tt>name
</tt></td><td>Size name
</td></tr>
1031 </tbody></table></div>
1033 <p>Width of page in points or
0.0</p>
1035 <h3 class='title'
><span class='info'
> CUPS
1.1.20 </span><a name='ppdSetConformance'
>ppdSetConformance()
</a></h3>
1036 <h4>Description
</h4>
1037 <p>Set the conformance level for PPD files.
1044 <a href='#ppd_conform_t'
>ppd_conform_t
</a> c);
1047 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0' summary='Arguments'
>
1048 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1050 <tr><td><tt>c
</tt></td><td>Conformance level
</td></tr>
1051 </tbody></table></div>
1055 <h2 class='title'
><a name='STRUCTURES'
>Structures
</a></h2>
1057 <li><a href='#ppd_attr_s'
><tt>ppd_attr_s
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
1058 <li><a href='#ppd_choice_s'
><tt>ppd_choice_s
</tt></a> </li>
1059 <li><a href='#ppd_coption_s'
><tt>ppd_coption_s
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
1060 <li><a href='#ppd_cparam_s'
><tt>ppd_cparam_s
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
1061 <li><a href='#ppd_emul_s'
><tt>ppd_emul_s
</tt></a> </li>
1062 <li><a href='#ppd_file_s'
><tt>ppd_file_s
</tt></a> </li>
1063 <li><a href='#ppd_group_s'
><tt>ppd_group_s
</tt></a> </li>
1064 <li><a href='#ppd_option_s'
><tt>ppd_option_s
</tt></a> </li>
1065 <li><a href='#ppd_profile_s'
><tt>ppd_profile_s
</tt></a> </li>
1066 <li><a href='#ppd_size_s'
><tt>ppd_size_s
</tt></a> </li>
1069 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='ppd_attr_s'
>ppd_attr_s
</a></h3>
1070 <h4>Description
</h4>
1071 <p>PPD Attribute Structure
1074 struct ppd_attr_s
<br>
1076 char name[PPD_MAX_NAME];
<br>
1077 char spec[PPD_MAX_NAME];
<br>
1078 char text[PPD_MAX_TEXT];
<br>
1079 char * value;
<br>
1082 <div class='table'
><table align='center' border='
1' width='
80%' summary='Members'
>
1083 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1085 <tr><td><tt>name[PPD_MAX_NAME]
</tt> </td><td>Name of attribute (cupsXYZ)
1087 <tr><td><tt>spec[PPD_MAX_NAME]
</tt> </td><td>Specifier string, if any
1089 <tr><td><tt>text[PPD_MAX_TEXT]
</tt> </td><td>Human-readable text, if any
1091 <tr><td><tt>value
</tt> </td><td>Value string
1093 </tbody></table></div>
1095 <h3 class='title'
><a name='ppd_choice_s'
>ppd_choice_s
</a></h3>
1096 <h4>Description
</h4>
1100 struct ppd_choice_s
<br>
1102 char choice[PPD_MAX_NAME];
<br>
1103 char * code;
<br>
1104 char marked;
<br>
1105 <a href='#ppd_option_t'
>ppd_option_t
</a> * option;
<br>
1106 char text[PPD_MAX_TEXT];
<br>
1109 <div class='table'
><table align='center' border='
1' width='
80%' summary='Members'
>
1110 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1112 <tr><td><tt>choice[PPD_MAX_NAME]
</tt> </td><td>Computer-readable option name
1114 <tr><td><tt>code
</tt> </td><td>Code to send for this option
1116 <tr><td><tt>marked
</tt> </td><td>0 if not selected,
1 otherwise
1118 <tr><td><tt>option
</tt> </td><td>Pointer to parent option structure
1120 <tr><td><tt>text[PPD_MAX_TEXT]
</tt> </td><td>Human-readable option name
1122 </tbody></table></div>
1124 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ppd_coption_s'
>ppd_coption_s
</a></h3>
1125 <h4>Description
</h4>
1129 struct ppd_coption_s
<br>
1131 char keyword[PPD_MAX_NAME];
<br>
1132 int marked;
<br>
1133 <a href='#ppd_option_t'
>ppd_option_t
</a> * option;
<br>
1134 cups_array_t * params;
<br>
1137 <div class='table'
><table align='center' border='
1' width='
80%' summary='Members'
>
1138 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1140 <tr><td><tt>keyword[PPD_MAX_NAME]
</tt> </td><td>Name of option that is being extended...
1142 <tr><td><tt>marked
</tt> </td><td>Extended option is marked
1144 <tr><td><tt>option
</tt> </td><td>Option that is being extended...
1146 <tr><td><tt>params
</tt> </td><td>Parameters
1148 </tbody></table></div>
1150 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ppd_cparam_s'
>ppd_cparam_s
</a></h3>
1151 <h4>Description
</h4>
1155 struct ppd_cparam_s
<br>
1157 <a href='#ppd_cpvalue_t'
>ppd_cpvalue_t
</a> current;
<br>
1158 <a href='#ppd_cplimit_t'
>ppd_cplimit_t
</a> minimum, maximum;
<br>
1159 char name[PPD_MAX_NAME];
<br>
1160 int order;
<br>
1161 char text[PPD_MAX_TEXT];
<br>
1162 <a href='#ppd_cptype_t'
>ppd_cptype_t
</a> type;
<br>
1165 <div class='table'
><table align='center' border='
1' width='
80%' summary='Members'
>
1166 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1168 <tr><td><tt>current
</tt> </td><td>Current value
1170 <tr><td><tt>maximum
</tt> </td><td>Maximum value
1172 <tr><td><tt>name[PPD_MAX_NAME]
</tt> </td><td>Parameter name
1174 <tr><td><tt>order
</tt> </td><td>Order (
0 to N)
1176 <tr><td><tt>text[PPD_MAX_TEXT]
</tt> </td><td>Human-readable text
1178 <tr><td><tt>type
</tt> </td><td>Parameter type
1180 </tbody></table></div>
1182 <h3 class='title'
><a name='ppd_emul_s'
>ppd_emul_s
</a></h3>
1183 <h4>Description
</h4>
1187 struct ppd_emul_s
<br>
1189 char name[PPD_MAX_NAME];
<br>
1190 char * start;
<br>
1191 char * stop;
<br>
1194 <div class='table'
><table align='center' border='
1' width='
80%' summary='Members'
>
1195 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1197 <tr><td><tt>name[PPD_MAX_NAME]
</tt> </td><td>Emulator name
1199 <tr><td><tt>start
</tt> </td><td>Code to switch to this emulation
1201 <tr><td><tt>stop
</tt> </td><td>Code to stop this emulation
1203 </tbody></table></div>
1205 <h3 class='title'
><a name='ppd_file_s'
>ppd_file_s
</a></h3>
1206 <h4>Description
</h4>
1210 struct ppd_file_s
<br>
1212 int accurate_screens;
<br>
1213 <a href='#ppd_attr_t'
>ppd_attr_t
</a> ** attrs;
<br>
1214 int color_device;
<br>
1215 ppd_cs_t colorspace;
<br>
1216 <a href='#ppd_const_t'
>ppd_const_t
</a> * consts;
<br>
1217 int contone_only;
<br>
1218 cups_array_t * coptions;
<br>
1219 int cur_attr;
<br>
1220 float custom_margins[
4];
<br>
1221 float custom_max[
2];
<br>
1222 float custom_min[
2];
<br>
1223 <a href='#ppd_emul_t'
>ppd_emul_t
</a> * emulations;
<br>
1224 char ** filters;
<br>
1225 int flip_duplex;
<br>
1226 char ** fonts;
<br>
1227 <a href='#ppd_group_t'
>ppd_group_t
</a> * groups;
<br>
1228 char * jcl_begin;
<br>
1229 char * jcl_end;
<br>
1230 char * jcl_ps;
<br>
1231 int landscape;
<br>
1232 char * lang_encoding;
<br>
1233 char * lang_version;
<br>
1234 int language_level;
<br>
1235 int manual_copies;
<br>
1236 char * manufacturer;
<br>
1237 cups_array_t * marked;
<br>
1238 int model_number;
<br>
1239 char * modelname;
<br>
1240 char * nickname;
<br>
1241 int num_attrs;
<br>
1242 int num_consts;
<br>
1243 int num_emulations;
<br>
1244 int num_filters;
<br>
1245 int num_fonts;
<br>
1246 int num_groups;
<br>
1247 int num_profiles;
<br>
1248 int num_sizes;
<br>
1249 cups_array_t * options;
<br>
1250 char * patches;
<br>
1251 char * pcfilename;
<br>
1252 char * product;
<br>
1253 <a href='#ppd_profile_t'
>ppd_profile_t
</a> * profiles;
<br>
1254 char * protocols;
<br>
1255 char * shortnickname;
<br>
1256 <a href='#ppd_size_t'
>ppd_size_t
</a> * sizes;
<br>
1257 cups_array_t * sorted_attrs;
<br>
1258 int throughput;
<br>
1259 char * ttrasterizer;
<br>
1260 int variable_sizes;
<br>
1263 <div class='table'
><table align='center' border='
1' width='
80%' summary='Members'
>
1264 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1266 <tr><td><tt>accurate_screens
</tt> </td><td>1 = supports accurate screens,
0 = not
1268 <tr><td><tt>attrs
</tt> <span class='info'
> CUPS
1.1.19 </span></td><td>Attributes @private@
1270 <tr><td><tt>color_device
</tt> </td><td>1 = color device,
0 = grayscale
1272 <tr><td><tt>colorspace
</tt> </td><td>Default colorspace
1274 <tr><td><tt>consts
</tt> </td><td>UI/Non-UI constraints
1276 <tr><td><tt>contone_only
</tt> </td><td>1 = continuous tone only,
0 = not
1278 <tr><td><tt>coptions
</tt> <span class='info'
> CUPS
1.2 </span></td><td>Custom options array @private@
1280 <tr><td><tt>cur_attr
</tt> <span class='info'
> CUPS
1.1.19 </span></td><td>Current attribute @private@
1282 <tr><td><tt>custom_margins[
4]
</tt> </td><td>Margins around page
1284 <tr><td><tt>custom_max[
2]
</tt> </td><td>Maximum variable page size
1286 <tr><td><tt>custom_min[
2]
</tt> </td><td>Minimum variable page size
1288 <tr><td><tt>emulations
</tt> </td><td>Emulations and the code to invoke them
1290 <tr><td><tt>filters
</tt> </td><td>Filter strings...
1292 <tr><td><tt>flip_duplex
</tt> <span class='info'
> DEPRECATED
</span></td><td>1 = Flip page for back sides
1294 <tr><td><tt>fonts
</tt> </td><td>Pre-loaded fonts
1296 <tr><td><tt>groups
</tt> </td><td>UI groups
1298 <tr><td><tt>jcl_begin
</tt> </td><td>Start JCL commands
1300 <tr><td><tt>jcl_end
</tt> </td><td>End JCL commands
1302 <tr><td><tt>jcl_ps
</tt> </td><td>Enter PostScript interpreter
1304 <tr><td><tt>landscape
</tt> </td><td>-
90 or
90
1306 <tr><td><tt>lang_encoding
</tt> </td><td>Language encoding
1308 <tr><td><tt>lang_version
</tt> </td><td>Language version (English, Spanish, etc.)
1310 <tr><td><tt>language_level
</tt> </td><td>Language level of device
1312 <tr><td><tt>manual_copies
</tt> </td><td>1 = Copies done manually,
0 = hardware
1314 <tr><td><tt>manufacturer
</tt> </td><td>Manufacturer name
1316 <tr><td><tt>marked
</tt> <span class='info'
> CUPS
1.3 </span></td><td>Marked choices @private@
1318 <tr><td><tt>model_number
</tt> </td><td>Device-specific model number
1320 <tr><td><tt>modelname
</tt> </td><td>Model name (general)
1322 <tr><td><tt>nickname
</tt> </td><td>Nickname (specific)
1324 <tr><td><tt>num_attrs
</tt> <span class='info'
> CUPS
1.1.19 </span></td><td>Number of attributes @private@
1326 <tr><td><tt>num_consts
</tt> </td><td>Number of UI/Non-UI constraints
1328 <tr><td><tt>num_emulations
</tt> </td><td>Number of emulations supported
1330 <tr><td><tt>num_filters
</tt> </td><td>Number of filters
1332 <tr><td><tt>num_fonts
</tt> </td><td>Number of pre-loaded fonts
1334 <tr><td><tt>num_groups
</tt> </td><td>Number of UI groups
1336 <tr><td><tt>num_profiles
</tt> </td><td>Number of sRGB color profiles
1338 <tr><td><tt>num_sizes
</tt> </td><td>Number of page sizes
1340 <tr><td><tt>options
</tt> <span class='info'
> CUPS
1.2 </span></td><td>Option lookup array @private@
1342 <tr><td><tt>patches
</tt> </td><td>Patch commands to be sent to printer
1344 <tr><td><tt>pcfilename
</tt> <span class='info'
> CUPS
1.1.19 </span></td><td>PCFileName string
1346 <tr><td><tt>product
</tt> </td><td>Product name (from PS RIP/interpreter)
1348 <tr><td><tt>profiles
</tt> </td><td>sRGB color profiles
1350 <tr><td><tt>protocols
</tt> <span class='info'
> CUPS
1.1.19 </span></td><td>Protocols (BCP, TBCP) string
1352 <tr><td><tt>shortnickname
</tt> </td><td>Short version of nickname
1354 <tr><td><tt>sizes
</tt> </td><td>Page sizes
1356 <tr><td><tt>sorted_attrs
</tt> <span class='info'
> CUPS
1.2 </span></td><td>Attribute lookup array @private@
1358 <tr><td><tt>throughput
</tt> </td><td>Pages per minute
1360 <tr><td><tt>ttrasterizer
</tt> </td><td>Truetype rasterizer
1362 <tr><td><tt>variable_sizes
</tt> </td><td>1 = supports variable sizes,
0 = doesn't
1364 </tbody></table></div>
1366 <h3 class='title'
><a name='ppd_group_s'
>ppd_group_s
</a></h3>
1367 <h4>Description
</h4>
1371 struct ppd_group_s
<br>
1373 char text[PPD_MAX_TEXT - PPD_MAX_NAME];
<br>
1374 char name[PPD_MAX_NAME];
<br>
1375 int num_options;
<br>
1376 int num_subgroups;
<br>
1377 <a href='#ppd_option_t'
>ppd_option_t
</a> * options;
<br>
1378 struct
<a href='#ppd_group_s'
>ppd_group_s
</a> * subgroups;
<br>
1381 <div class='table'
><table align='center' border='
1' width='
80%' summary='Members'
>
1382 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1384 <tr><td><tt>PPD_MAX_NAME]
</tt> </td><td>Human-readable group name
1386 <tr><td><tt>name[PPD_MAX_NAME]
</tt> <span class='info'
> CUPS
1.1.18 </span></td><td>Group name
1388 <tr><td><tt>num_options
</tt> </td><td>Number of options
1390 <tr><td><tt>num_subgroups
</tt> </td><td>Number of sub-groups
1392 <tr><td><tt>options
</tt> </td><td>Options
1394 <tr><td><tt>subgroups
</tt> </td><td>Sub-groups (max depth =
1)
1396 </tbody></table></div>
1398 <h3 class='title'
><a name='ppd_option_s'
>ppd_option_s
</a></h3>
1399 <h4>Description
</h4>
1403 struct ppd_option_s
<br>
1405 <a href='#ppd_choice_t'
>ppd_choice_t
</a> * choices;
<br>
1406 char conflicted;
<br>
1407 char defchoice[PPD_MAX_NAME];
<br>
1408 char keyword[PPD_MAX_NAME];
<br>
1409 int num_choices;
<br>
1410 float order;
<br>
1411 <a href='#ppd_section_t'
>ppd_section_t
</a> section;
<br>
1412 char text[PPD_MAX_TEXT];
<br>
1413 <a href='#ppd_ui_t'
>ppd_ui_t
</a> ui;
<br>
1416 <div class='table'
><table align='center' border='
1' width='
80%' summary='Members'
>
1417 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1419 <tr><td><tt>choices
</tt> </td><td>Option choices
1421 <tr><td><tt>conflicted
</tt> </td><td>0 if no conflicts exist,
1 otherwise
1423 <tr><td><tt>defchoice[PPD_MAX_NAME]
</tt> </td><td>Default option choice
1425 <tr><td><tt>keyword[PPD_MAX_NAME]
</tt> </td><td>Option keyword name (
"PageSize
", etc.)
1427 <tr><td><tt>num_choices
</tt> </td><td>Number of option choices
1429 <tr><td><tt>order
</tt> </td><td>Order number
1431 <tr><td><tt>section
</tt> </td><td>Section for command
1433 <tr><td><tt>text[PPD_MAX_TEXT]
</tt> </td><td>Human-readable text
1435 <tr><td><tt>ui
</tt> </td><td>Type of UI option
1437 </tbody></table></div>
1439 <h3 class='title'
><a name='ppd_profile_s'
>ppd_profile_s
</a></h3>
1440 <h4>Description
</h4>
1441 <p>sRGB Color Profiles
1444 struct ppd_profile_s
<br>
1446 float density;
<br>
1447 float gamma;
<br>
1448 float matrix[
3][
3];
<br>
1449 char media_type[PPD_MAX_NAME];
<br>
1450 char resolution[PPD_MAX_NAME];
<br>
1453 <div class='table'
><table align='center' border='
1' width='
80%' summary='Members'
>
1454 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1456 <tr><td><tt>density
</tt> </td><td>Ink density to use
1458 <tr><td><tt>gamma
</tt> </td><td>Gamma correction to use
1460 <tr><td><tt>matrix[
3][
3]
</tt> </td><td>Transform matrix
1462 <tr><td><tt>media_type[PPD_MAX_NAME]
</tt> </td><td>Media type or
"-
"
1464 <tr><td><tt>resolution[PPD_MAX_NAME]
</tt> </td><td>Resolution or
"-
"
1466 </tbody></table></div>
1468 <h3 class='title'
><a name='ppd_size_s'
>ppd_size_s
</a></h3>
1469 <h4>Description
</h4>
1473 struct ppd_size_s
<br>
1475 float bottom;
<br>
1476 float left;
<br>
1477 float length;
<br>
1478 int marked;
<br>
1479 char name[PPD_MAX_NAME];
<br>
1480 float right;
<br>
1481 float top;
<br>
1482 float width;
<br>
1485 <div class='table'
><table align='center' border='
1' width='
80%' summary='Members'
>
1486 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1488 <tr><td><tt>bottom
</tt> </td><td>Bottom printable margin in points
1490 <tr><td><tt>left
</tt> </td><td>Left printable margin in points
1492 <tr><td><tt>length
</tt> </td><td>Length of media in points
1494 <tr><td><tt>marked
</tt> </td><td>Page size selected?
1496 <tr><td><tt>name[PPD_MAX_NAME]
</tt> </td><td>Media size option
1498 <tr><td><tt>right
</tt> </td><td>Right printable margin in points
1500 <tr><td><tt>top
</tt> </td><td>Top printable margin in points
1502 <tr><td><tt>width
</tt> </td><td>Width of media in points
1504 </tbody></table></div>
1506 <h2 class='title'
><a name='TYPES'
>Types
</a></h2>
1508 <li><a href='#ppd_attr_t'
><tt>ppd_attr_t
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
1509 <li><a href='#ppd_choice_t'
><tt>ppd_choice_t
</tt></a> </li>
1510 <li><a href='#ppd_const_t'
><tt>ppd_const_t
</tt></a> </li>
1511 <li><a href='#ppd_coption_t'
><tt>ppd_coption_t
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
1512 <li><a href='#ppd_cparam_t'
><tt>ppd_cparam_t
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
1513 <li><a href='#ppd_cplimit_t'
><tt>ppd_cplimit_t
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
1514 <li><a href='#ppd_cptype_t'
><tt>ppd_cptype_t
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
1515 <li><a href='#ppd_cpvalue_t'
><tt>ppd_cpvalue_t
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
1516 <li><a href='#ppd_emul_t'
><tt>ppd_emul_t
</tt></a> </li>
1517 <li><a href='#ppd_file_t'
><tt>ppd_file_t
</tt></a> </li>
1518 <li><a href='#ppd_group_t'
><tt>ppd_group_t
</tt></a> </li>
1519 <li><a href='#ppd_option_t'
><tt>ppd_option_t
</tt></a> </li>
1520 <li><a href='#ppd_profile_t'
><tt>ppd_profile_t
</tt></a> </li>
1521 <li><a href='#ppd_section_t'
><tt>ppd_section_t
</tt></a> </li>
1522 <li><a href='#ppd_size_t'
><tt>ppd_size_t
</tt></a> </li>
1523 <li><a href='#ppd_ui_t'
><tt>ppd_ui_t
</tt></a> </li>
1526 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='ppd_attr_t'
>ppd_attr_t
</a></h3>
1527 <h4>Description
</h4>
1528 <p>PPD Attribute Structure
1531 typedef struct
<a href='#ppd_attr_s'
>ppd_attr_s
</a> ppd_attr_t;
1534 <h3 class='title'
><a name='ppd_choice_t'
>ppd_choice_t
</a></h3>
1535 <h4>Description
</h4>
1539 typedef struct
<a href='#ppd_choice_s'
>ppd_choice_s
</a> ppd_choice_t;
1542 <h3 class='title'
><a name='ppd_const_t'
>ppd_const_t
</a></h3>
1543 <h4>Description
</h4>
1547 typedef struct ppd_const_t;
1550 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ppd_coption_t'
>ppd_coption_t
</a></h3>
1551 <h4>Description
</h4>
1555 typedef struct
<a href='#ppd_coption_s'
>ppd_coption_s
</a> ppd_coption_t;
1558 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ppd_cparam_t'
>ppd_cparam_t
</a></h3>
1559 <h4>Description
</h4>
1563 typedef struct
<a href='#ppd_cparam_s'
>ppd_cparam_s
</a> ppd_cparam_t;
1566 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ppd_cplimit_t'
>ppd_cplimit_t
</a></h3>
1567 <h4>Description
</h4>
1568 <p>Custom Parameter Limit
1571 typedef union
<a href='#ppd_cplimit_u'
>ppd_cplimit_u
</a> ppd_cplimit_t;
1574 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ppd_cptype_t'
>ppd_cptype_t
</a></h3>
1575 <h4>Description
</h4>
1576 <p>Custom Parameter Type
1579 typedef enum
<a href='#ppd_cptype_e'
>ppd_cptype_e
</a> ppd_cptype_t;
1582 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ppd_cpvalue_t'
>ppd_cpvalue_t
</a></h3>
1583 <h4>Description
</h4>
1584 <p>Custom Parameter Value
1587 typedef union
<a href='#ppd_cpvalue_u'
>ppd_cpvalue_u
</a> ppd_cpvalue_t;
1590 <h3 class='title'
><a name='ppd_emul_t'
>ppd_emul_t
</a></h3>
1591 <h4>Description
</h4>
1595 typedef struct
<a href='#ppd_emul_s'
>ppd_emul_s
</a> ppd_emul_t;
1598 <h3 class='title'
><a name='ppd_file_t'
>ppd_file_t
</a></h3>
1599 <h4>Description
</h4>
1603 typedef struct
<a href='#ppd_file_s'
>ppd_file_s
</a> ppd_file_t;
1606 <h3 class='title'
><a name='ppd_group_t'
>ppd_group_t
</a></h3>
1607 <h4>Description
</h4>
1611 typedef struct
<a href='#ppd_group_s'
>ppd_group_s
</a> ppd_group_t;
1614 <h3 class='title'
><a name='ppd_option_t'
>ppd_option_t
</a></h3>
1615 <h4>Description
</h4>
1619 typedef struct
<a href='#ppd_option_s'
>ppd_option_s
</a> ppd_option_t;
1622 <h3 class='title'
><a name='ppd_profile_t'
>ppd_profile_t
</a></h3>
1623 <h4>Description
</h4>
1624 <p>sRGB Color Profiles
1627 typedef struct
<a href='#ppd_profile_s'
>ppd_profile_s
</a> ppd_profile_t;
1630 <h3 class='title'
><a name='ppd_section_t'
>ppd_section_t
</a></h3>
1631 <h4>Description
</h4>
1632 <p>Order dependency sections
1635 typedef enum
<a href='#ppd_section_e'
>ppd_section_e
</a> ppd_section_t;
1638 <h3 class='title'
><a name='ppd_size_t'
>ppd_size_t
</a></h3>
1639 <h4>Description
</h4>
1643 typedef struct
<a href='#ppd_size_s'
>ppd_size_s
</a> ppd_size_t;
1646 <h3 class='title'
><a name='ppd_ui_t'
>ppd_ui_t
</a></h3>
1647 <h4>Description
</h4>
1651 typedef enum
<a href='#ppd_ui_e'
>ppd_ui_e
</a> ppd_ui_t;
1654 <h2 class='title'
><a name='UNIONS'
>Unions
</a></h2>
1656 <li><a href='#ppd_cplimit_u'
><tt>ppd_cplimit_u
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
1657 <li><a href='#ppd_cpvalue_u'
><tt>ppd_cpvalue_u
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
1660 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ppd_cplimit_u'
>ppd_cplimit_u
</a></h3>
1661 <h4>Description
</h4>
1662 <p>Custom Parameter Limit
1665 union ppd_cplimit_u
<br>
1667 float custom_curve;
<br>
1668 int custom_int;
<br>
1669 float custom_invcurve;
<br>
1670 int custom_passcode;
<br>
1671 int custom_password;
<br>
1672 float custom_points;
<br>
1673 float custom_real;
<br>
1674 int custom_string;
<br>
1677 <div class='table'
><table align='center' border='
1' width='
80%' summary='Members'
>
1678 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1680 <tr><td><tt>custom_curve
</tt> </td><td>Gamma value
1682 <tr><td><tt>custom_int
</tt> </td><td>Integer value
1684 <tr><td><tt>custom_invcurve
</tt> </td><td>Gamma value
1686 <tr><td><tt>custom_passcode
</tt> </td><td>Passcode length
1688 <tr><td><tt>custom_password
</tt> </td><td>Password length
1690 <tr><td><tt>custom_points
</tt> </td><td>Measurement value
1692 <tr><td><tt>custom_real
</tt> </td><td>Real value
1694 <tr><td><tt>custom_string
</tt> </td><td>String length
1696 </tbody></table></div>
1698 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ppd_cpvalue_u'
>ppd_cpvalue_u
</a></h3>
1699 <h4>Description
</h4>
1700 <p>Custom Parameter Value
1703 union ppd_cpvalue_u
<br>
1705 float custom_curve;
<br>
1706 int custom_int;
<br>
1707 float custom_invcurve;
<br>
1708 char * custom_passcode;
<br>
1709 char * custom_password;
<br>
1710 float custom_points;
<br>
1711 float custom_real;
<br>
1712 char * custom_string;
<br>
1715 <div class='table'
><table align='center' border='
1' width='
80%' summary='Members'
>
1716 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1718 <tr><td><tt>custom_curve
</tt> </td><td>Gamma value
1720 <tr><td><tt>custom_int
</tt> </td><td>Integer value
1722 <tr><td><tt>custom_invcurve
</tt> </td><td>Gamma value
1724 <tr><td><tt>custom_passcode
</tt> </td><td>Passcode value
1726 <tr><td><tt>custom_password
</tt> </td><td>Password value
1728 <tr><td><tt>custom_points
</tt> </td><td>Measurement value
1730 <tr><td><tt>custom_real
</tt> </td><td>Real value
1732 <tr><td><tt>custom_string
</tt> </td><td>String value
1734 </tbody></table></div>