]> git.ipfire.org Git - thirdparty/cups.git/blob - doc/help/api-ppd.html
Load cups into easysw/current.
[thirdparty/cups.git] / doc / help / api-ppd.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
2 <html>
3 <!-- SECTION: Programming -->
4 <head>
5 <title>PPD API</title>
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; }
15 --></style>
16 </head>
17 <body>
18 <!--
19 "$Id: api-ppd.shtml 6649 2007-07-11 21:46:42Z mike $"
20
21 PPD API introduction for the Common UNIX Printing System (CUPS).
22
23 Copyright 2007 by Apple Inc.
24 Copyright 1997-2006 by Easy Software Products, all rights reserved.
25
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/".
31 -->
32
33 <h2 class='title'>Introduction</h2>
34
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
39 output.</p>
40
41 <h2 class='title'>General Usage</h2>
42
43 <p>The <var>&lt;cups/ppd.h&gt;</var> header file must be included
44 to use the <tt>ppd</tt> functions.</p>
45
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
51 library:</p>
52
53 <pre class='command'>
54 <kbd>gcc -o myprogram myprogram.c -lcups</kbd>
55 </pre>
56
57 <h2 class='title'>Compatibility</h2>
58
59 <p>Unless otherwise specified, the PPD API functions require CUPS
60 1.1 or higher.</p>
61 <h2 class='title'>Contents</h2>
62 <ul>
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>
68 </ul>
69 <!-- NEW PAGE -->
70 <h2 class='title'><a name='ENUMERATIONS'>Enumerations</a></h2>
71 <ul>
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'>&nbsp;CUPS 1.2&nbsp;</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>
78 </ul>
79 <!-- NEW PAGE -->
80 <h3 class='title'><a name='ppd_conform_e'>ppd_conform_e</a></h3>
81 <h4>Description</h4>
82 <p>
83 <h4>Values</h4>
84 <div class='table'><table align='center' border='1' width='80%' summary='Values'>
85 <thead><tr><th>Name</th><th>Description</th></tr></thead>
86 <tbody>
87 <tr><td><tt>PPD_CONFORM_RELAXED</tt> </td><td>Relax whitespace and control char
88 </td></tr>
89 <tr><td><tt>PPD_CONFORM_STRICT</tt> </td><td>Require strict conformance
90 </td></tr>
91 </tbody></table></div>
92 <!-- NEW PAGE -->
93 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppd_cptype_e'>ppd_cptype_e</a></h3>
94 <h4>Description</h4>
95 <p>Custom Parameter Type
96 <h4>Values</h4>
97 <div class='table'><table align='center' border='1' width='80%' summary='Values'>
98 <thead><tr><th>Name</th><th>Description</th></tr></thead>
99 <tbody>
100 <tr><td><tt>PPD_CUSTOM_CURVE</tt> </td><td>Curve value for f(x) = x^value
101 </td></tr>
102 <tr><td><tt>PPD_CUSTOM_INT</tt> </td><td>Integer number value
103 </td></tr>
104 <tr><td><tt>PPD_CUSTOM_INVCURVE</tt> </td><td>Curve value for f(x) = x^(1/value)
105 </td></tr>
106 <tr><td><tt>PPD_CUSTOM_PASSCODE</tt> </td><td>String of (hidden) numbers
107 </td></tr>
108 <tr><td><tt>PPD_CUSTOM_PASSWORD</tt> </td><td>String of (hidden) characters
109 </td></tr>
110 <tr><td><tt>PPD_CUSTOM_POINTS</tt> </td><td>Measurement value in points
111 </td></tr>
112 <tr><td><tt>PPD_CUSTOM_REAL</tt> </td><td>Real number value
113 </td></tr>
114 <tr><td><tt>PPD_CUSTOM_STRING</tt> </td><td>String of characters
115 </td></tr>
116 </tbody></table></div>
117 <!-- NEW PAGE -->
118 <h3 class='title'><a name='ppd_cs_e'>ppd_cs_e</a></h3>
119 <h4>Description</h4>
120 <p>Colorspaces
121 <h4>Values</h4>
122 <div class='table'><table align='center' border='1' width='80%' summary='Values'>
123 <thead><tr><th>Name</th><th>Description</th></tr></thead>
124 <tbody>
125 <tr><td><tt>PPD_CS_CMY</tt> </td><td>CMY colorspace
126 </td></tr>
127 <tr><td><tt>PPD_CS_CMYK</tt> </td><td>CMYK colorspace
128 </td></tr>
129 <tr><td><tt>PPD_CS_GRAY</tt> </td><td>Grayscale colorspace
130 </td></tr>
131 <tr><td><tt>PPD_CS_N</tt> </td><td>DeviceN colorspace
132 </td></tr>
133 <tr><td><tt>PPD_CS_RGB</tt> </td><td>RGB colorspace
134 </td></tr>
135 <tr><td><tt>PPD_CS_RGBK</tt> </td><td>RGBK (K = gray) colorspace
136 </td></tr>
137 </tbody></table></div>
138 <!-- NEW PAGE -->
139 <h3 class='title'><a name='ppd_section_e'>ppd_section_e</a></h3>
140 <h4>Description</h4>
141 <p>Order dependency sections
142 <h4>Values</h4>
143 <div class='table'><table align='center' border='1' width='80%' summary='Values'>
144 <thead><tr><th>Name</th><th>Description</th></tr></thead>
145 <tbody>
146 <tr><td><tt>PPD_ORDER_ANY</tt> </td><td>Option code can be anywhere in the file
147 </td></tr>
148 <tr><td><tt>PPD_ORDER_DOCUMENT</tt> </td><td>... must be in the DocumentSetup section
149 </td></tr>
150 <tr><td><tt>PPD_ORDER_EXIT</tt> </td><td>... must be sent prior to the document
151 </td></tr>
152 <tr><td><tt>PPD_ORDER_JCL</tt> </td><td>... must be sent as a JCL command
153 </td></tr>
154 <tr><td><tt>PPD_ORDER_PAGE</tt> </td><td>... must be in the PageSetup section
155 </td></tr>
156 <tr><td><tt>PPD_ORDER_PROLOG</tt> </td><td>... must be in the Prolog section
157 </td></tr>
158 </tbody></table></div>
159 <!-- NEW PAGE -->
160 <h3 class='title'><a name='ppd_status_e'>ppd_status_e</a></h3>
161 <h4>Description</h4>
162 <p>Types and structures...
163 <h4>Values</h4>
164 <div class='table'><table align='center' border='1' width='80%' summary='Values'>
165 <thead><tr><th>Name</th><th>Description</th></tr></thead>
166 <tbody>
167 <tr><td><tt>PPD_ALLOC_ERROR</tt> </td><td>Memory allocation error
168 </td></tr>
169 <tr><td><tt>PPD_BAD_CUSTOM_PARAM</tt> </td><td>Bad custom parameter
170 </td></tr>
171 <tr><td><tt>PPD_BAD_OPEN_GROUP</tt> </td><td>Bad OpenGroup
172 </td></tr>
173 <tr><td><tt>PPD_BAD_OPEN_UI</tt> </td><td>Bad OpenUI/JCLOpenUI
174 </td></tr>
175 <tr><td><tt>PPD_BAD_ORDER_DEPENDENCY</tt> </td><td>Bad OrderDependency
176 </td></tr>
177 <tr><td><tt>PPD_BAD_UI_CONSTRAINTS</tt> </td><td>Bad UIConstraints
178 </td></tr>
179 <tr><td><tt>PPD_FILE_OPEN_ERROR</tt> </td><td>Unable to open PPD file
180 </td></tr>
181 <tr><td><tt>PPD_ILLEGAL_CHARACTER</tt> </td><td>Illegal control character
182 </td></tr>
183 <tr><td><tt>PPD_ILLEGAL_MAIN_KEYWORD</tt> </td><td>Illegal main keyword string
184 </td></tr>
185 <tr><td><tt>PPD_ILLEGAL_OPTION_KEYWORD</tt> </td><td>Illegal option keyword string
186 </td></tr>
187 <tr><td><tt>PPD_ILLEGAL_TRANSLATION</tt> </td><td>Illegal translation string
188 </td></tr>
189 <tr><td><tt>PPD_ILLEGAL_WHITESPACE</tt> </td><td>Illegal whitespace character
190 </td></tr>
191 <tr><td><tt>PPD_INTERNAL_ERROR</tt> </td><td>Internal error
192 </td></tr>
193 <tr><td><tt>PPD_LINE_TOO_LONG</tt> </td><td>Line longer than 255 chars
194 </td></tr>
195 <tr><td><tt>PPD_MISSING_ASTERISK</tt> </td><td>Missing asterisk in column 0
196 </td></tr>
197 <tr><td><tt>PPD_MISSING_PPDADOBE4</tt> </td><td>Missing PPD-Adobe-4.x header
198 </td></tr>
199 <tr><td><tt>PPD_MISSING_VALUE</tt> </td><td>Missing value string
200 </td></tr>
201 <tr><td><tt>PPD_NESTED_OPEN_GROUP</tt> </td><td>OpenGroup without a CloseGroup first
202 </td></tr>
203 <tr><td><tt>PPD_NESTED_OPEN_UI</tt> </td><td>OpenUI/JCLOpenUI without a CloseUI/JCLCloseUI first
204 </td></tr>
205 <tr><td><tt>PPD_NULL_FILE</tt> </td><td>NULL PPD file pointer
206 </td></tr>
207 <tr><td><tt>PPD_OK</tt> </td><td>OK
208 </td></tr>
209 </tbody></table></div>
210 <!-- NEW PAGE -->
211 <h3 class='title'><a name='ppd_ui_e'>ppd_ui_e</a></h3>
212 <h4>Description</h4>
213 <p>UI Types
214 <h4>Values</h4>
215 <div class='table'><table align='center' border='1' width='80%' summary='Values'>
216 <thead><tr><th>Name</th><th>Description</th></tr></thead>
217 <tbody>
218 <tr><td><tt>PPD_UI_BOOLEAN</tt> </td><td>True or False option
219 </td></tr>
220 <tr><td><tt>PPD_UI_PICKMANY</tt> </td><td>Pick zero or more from a list
221 </td></tr>
222 <tr><td><tt>PPD_UI_PICKONE</tt> </td><td>Pick one from a list
223 </td></tr>
224 </tbody></table></div>
225 <!-- NEW PAGE -->
226 <h2 class='title'><a name='FUNCTIONS'>Functions</a></h2>
227 <ul>
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'>&nbsp;CUPS 1.2&nbsp;</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'>&nbsp;CUPS 1.2&nbsp;</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'>&nbsp;CUPS 1.2&nbsp;</span></li>
237 <li><a href='#ppdEmitString'><tt>ppdEmitString()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
238 <li><a href='#ppdErrorString'><tt>ppdErrorString()</tt></a> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></li>
239 <li><a href='#ppdFindAttr'><tt>ppdFindAttr()</tt></a> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></li>
240 <li><a href='#ppdFindChoice'><tt>ppdFindChoice()</tt></a> </li>
241 <li><a href='#ppdFindCustomOption'><tt>ppdFindCustomOption()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
242 <li><a href='#ppdFindCustomParam'><tt>ppdFindCustomParam()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
243 <li><a href='#ppdFindMarkedChoice'><tt>ppdFindMarkedChoice()</tt></a> </li>
244 <li><a href='#ppdFindNextAttr'><tt>ppdFindNextAttr()</tt></a> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></li>
245 <li><a href='#ppdFindOption'><tt>ppdFindOption()</tt></a> </li>
246 <li><a href='#ppdFirstCustomParam'><tt>ppdFirstCustomParam()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
247 <li><a href='#ppdFirstOption'><tt>ppdFirstOption()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
248 <li><a href='#ppdIsMarked'><tt>ppdIsMarked()</tt></a> </li>
249 <li><a href='#ppdLastError'><tt>ppdLastError()</tt></a> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></li>
250 <li><a href='#ppdLocalize'><tt>ppdLocalize()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
251 <li><a href='#ppdLocalizeIPPReason'><tt>ppdLocalizeIPPReason()</tt></a> <span class='info'>&nbsp;CUPS 1.3&nbsp;</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'>&nbsp;CUPS 1.2&nbsp;</span></li>
255 <li><a href='#ppdNextOption'><tt>ppdNextOption()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
256 <li><a href='#ppdOpen'><tt>ppdOpen()</tt></a> </li>
257 <li><a href='#ppdOpen2'><tt>ppdOpen2()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</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'>&nbsp;CUPS 1.1.20&nbsp;</span></li>
264 </ul>
265 <!-- NEW PAGE -->
266 <h3 class='title'><a name='ppdClose'>ppdClose()</a></h3>
267 <h4>Description</h4>
268 <p>Free all memory used by the PPD file.
269 <h4>Syntax</h4>
270 <p><tt>
271 void<br>
272 ppdClose(
273 <a href='#ppd_file_t'>ppd_file_t</a> * ppd);
274 </tt></p>
275 <h4>Arguments</h4>
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>
278 <tbody>
279 <tr><td><tt>ppd</tt></td><td>PPD file record</td></tr>
280 </tbody></table></div>
281 <h4>Returns</h4>
282 <p>Nothing.</p>
283 <!-- NEW PAGE -->
284 <h3 class='title'><a name='ppdCollect'>ppdCollect()</a></h3>
285 <h4>Description</h4>
286 <p>Collect all marked options that reside in the specified
287 section.
288 <h4>Syntax</h4>
289 <p><tt>
290 int<br>
291 ppdCollect(
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);
295 </tt></p>
296 <h4>Arguments</h4>
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>
299 <tbody>
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>
304 <h4>Returns</h4>
305 <p>Number of options marked</p>
306 <!-- NEW PAGE -->
307 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppdCollect2'>ppdCollect2()</a></h3>
308 <h4>Description</h4>
309 <p>Collect all marked options that reside in the
310 specified section and minimum order.
311
312
313 <h4>Syntax</h4>
314 <p><tt>
315 int<br>
316 ppdCollect2(
317 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
318 <a href='#ppd_section_t'>ppd_section_t</a> section,
319 float min_order,
320 <a href='#ppd_choice_t'>ppd_choice_t</a> *** choices);
321 </tt></p>
322 <h4>Arguments</h4>
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>
325 <tbody>
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>
331 <h4>Returns</h4>
332 <p>Number of options marked</p>
333 <!-- NEW PAGE -->
334 <h3 class='title'><a name='ppdConflicts'>ppdConflicts()</a></h3>
335 <h4>Description</h4>
336 <p>Check to see if there are any conflicts.
337 <h4>Syntax</h4>
338 <p><tt>
339 int<br>
340 ppdConflicts(
341 <a href='#ppd_file_t'>ppd_file_t</a> * ppd);
342 </tt></p>
343 <h4>Arguments</h4>
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>
346 <tbody>
347 <tr><td><tt>ppd</tt></td><td>PPD to check</td></tr>
348 </tbody></table></div>
349 <h4>Returns</h4>
350 <p>Number of conflicts found</p>
351 <!-- NEW PAGE -->
352 <h3 class='title'><a name='ppdEmit'>ppdEmit()</a></h3>
353 <h4>Description</h4>
354 <p>Emit code for marked options to a file.
355 <h4>Syntax</h4>
356 <p><tt>
357 int<br>
358 ppdEmit(
359 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
360 FILE * fp,
361 <a href='#ppd_section_t'>ppd_section_t</a> section);
362 </tt></p>
363 <h4>Arguments</h4>
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>
366 <tbody>
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>
371 <h4>Returns</h4>
372 <p>0 on success, -1 on failure</p>
373 <!-- NEW PAGE -->
374 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppdEmitAfterOrder'>ppdEmitAfterOrder()</a></h3>
375 <h4>Description</h4>
376 <p>Emit a subset of the code for marked options to a file.
377 <p>When &quot;limit&quot; is non-zero, this function only emits options whose
378 OrderDependency value is greater than or equal to &quot;min_order&quot;.
379 <p>When &quot;limit&quot; is zero, this function is identical to ppdEmit().
380
381
382 <h4>Syntax</h4>
383 <p><tt>
384 int<br>
385 ppdEmitAfterOrder(
386 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
387 FILE * fp,
388 <a href='#ppd_section_t'>ppd_section_t</a> section,
389 int limit,
390 float min_order);
391 </tt></p>
392 <h4>Arguments</h4>
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>
395 <tbody>
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>
402 <h4>Returns</h4>
403 <p>0 on success, -1 on failure</p>
404 <!-- NEW PAGE -->
405 <h3 class='title'><a name='ppdEmitFd'>ppdEmitFd()</a></h3>
406 <h4>Description</h4>
407 <p>Emit code for marked options to a file.
408 <h4>Syntax</h4>
409 <p><tt>
410 int<br>
411 ppdEmitFd(
412 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
413 int fd,
414 <a href='#ppd_section_t'>ppd_section_t</a> section);
415 </tt></p>
416 <h4>Arguments</h4>
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>
419 <tbody>
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>
424 <h4>Returns</h4>
425 <p>0 on success, -1 on failure</p>
426 <!-- NEW PAGE -->
427 <h3 class='title'><a name='ppdEmitJCL'>ppdEmitJCL()</a></h3>
428 <h4>Description</h4>
429 <p>Emit code for JCL options to a file.
430 <h4>Syntax</h4>
431 <p><tt>
432 int<br>
433 ppdEmitJCL(
434 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
435 FILE * fp,
436 int job_id,
437 const char * user,
438 const char * title);
439 </tt></p>
440 <h4>Arguments</h4>
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>
443 <tbody>
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>
450 <h4>Returns</h4>
451 <p>0 on success, -1 on failure</p>
452 <!-- NEW PAGE -->
453 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppdEmitJCLEnd'>ppdEmitJCLEnd()</a></h3>
454 <h4>Description</h4>
455 <p>Emit JCLEnd code to a file.
456
457
458 <h4>Syntax</h4>
459 <p><tt>
460 int<br>
461 ppdEmitJCLEnd(
462 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
463 FILE * fp);
464 </tt></p>
465 <h4>Arguments</h4>
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>
468 <tbody>
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>
472 <h4>Returns</h4>
473 <p>0 on success, -1 on failure</p>
474 <!-- NEW PAGE -->
475 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppdEmitString'>ppdEmitString()</a></h3>
476 <h4>Description</h4>
477 <p>Get a string containing the code for marked options.
478 <p>When &quot;min_order&quot; is greater than zero, this function only includes options
479 whose OrderDependency value is greater than or equal to &quot;min_order&quot;.
480 Otherwise, all options in the specified section are included in the
481 returned string.
482 <p>The return string is allocated on the heap and should be freed using
483 free() when you are done with it.
484
485
486 <h4>Syntax</h4>
487 <p><tt>
488 char *<br>
489 ppdEmitString(
490 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
491 <a href='#ppd_section_t'>ppd_section_t</a> section,
492 float min_order);
493 </tt></p>
494 <h4>Arguments</h4>
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>
497 <tbody>
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>
502 <h4>Returns</h4>
503 <p>String containing option code</p>
504 <!-- NEW PAGE -->
505 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span><a name='ppdErrorString'>ppdErrorString()</a></h3>
506 <h4>Description</h4>
507 <p>Returns the text assocated with a status.
508
509
510 <h4>Syntax</h4>
511 <p><tt>
512 const char *<br>
513 ppdErrorString(
514 ppd_status_t status);
515 </tt></p>
516 <h4>Arguments</h4>
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>
519 <tbody>
520 <tr><td><tt>status</tt></td><td>PPD status</td></tr>
521 </tbody></table></div>
522 <h4>Returns</h4>
523 <p>Status string</p>
524 <!-- NEW PAGE -->
525 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span><a name='ppdFindAttr'>ppdFindAttr()</a></h3>
526 <h4>Description</h4>
527 <p>Find the first matching attribute...
528
529
530 <h4>Syntax</h4>
531 <p><tt>
532 <a href='#ppd_attr_t'>ppd_attr_t</a> *<br>
533 ppdFindAttr(
534 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
535 const char * name,
536 const char * spec);
537 </tt></p>
538 <h4>Arguments</h4>
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>
541 <tbody>
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>
546 <h4>Returns</h4>
547 <p>Attribute or NULL if not found</p>
548 <!-- NEW PAGE -->
549 <h3 class='title'><a name='ppdFindChoice'>ppdFindChoice()</a></h3>
550 <h4>Description</h4>
551 <p>Return a pointer to an option choice.
552 <h4>Syntax</h4>
553 <p><tt>
554 <a href='#ppd_choice_t'>ppd_choice_t</a> *<br>
555 ppdFindChoice(
556 <a href='#ppd_option_t'>ppd_option_t</a> * o,
557 const char * choice);
558 </tt></p>
559 <h4>Arguments</h4>
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>
562 <tbody>
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>
566 <h4>Returns</h4>
567 <p>Choice pointer or NULL</p>
568 <!-- NEW PAGE -->
569 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppdFindCustomOption'>ppdFindCustomOption()</a></h3>
570 <h4>Description</h4>
571 <p>Find a custom option.
572
573
574 <h4>Syntax</h4>
575 <p><tt>
576 <a href='#ppd_coption_t'>ppd_coption_t</a> *<br>
577 ppdFindCustomOption(
578 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
579 const char * keyword);
580 </tt></p>
581 <h4>Arguments</h4>
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>
584 <tbody>
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>
588 <h4>Returns</h4>
589 <p>Custom option or NULL</p>
590 <!-- NEW PAGE -->
591 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppdFindCustomParam'>ppdFindCustomParam()</a></h3>
592 <h4>Description</h4>
593 <p>Find a parameter for a custom option.
594
595
596 <h4>Syntax</h4>
597 <p><tt>
598 <a href='#ppd_cparam_t'>ppd_cparam_t</a> *<br>
599 ppdFindCustomParam(
600 <a href='#ppd_coption_t'>ppd_coption_t</a> * opt,
601 const char * name);
602 </tt></p>
603 <h4>Arguments</h4>
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>
606 <tbody>
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>
610 <h4>Returns</h4>
611 <p>Custom parameter or NULL</p>
612 <!-- NEW PAGE -->
613 <h3 class='title'><a name='ppdFindMarkedChoice'>ppdFindMarkedChoice()</a></h3>
614 <h4>Description</h4>
615 <p>Return the marked choice for the specified option.
616 <h4>Syntax</h4>
617 <p><tt>
618 <a href='#ppd_choice_t'>ppd_choice_t</a> *<br>
619 ppdFindMarkedChoice(
620 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
621 const char * option);
622 </tt></p>
623 <h4>Arguments</h4>
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>
626 <tbody>
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>
630 <h4>Returns</h4>
631 <p>Pointer to choice or NULL</p>
632 <!-- NEW PAGE -->
633 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span><a name='ppdFindNextAttr'>ppdFindNextAttr()</a></h3>
634 <h4>Description</h4>
635 <p>Find the next matching attribute...
636
637
638 <h4>Syntax</h4>
639 <p><tt>
640 <a href='#ppd_attr_t'>ppd_attr_t</a> *<br>
641 ppdFindNextAttr(
642 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
643 const char * name,
644 const char * spec);
645 </tt></p>
646 <h4>Arguments</h4>
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>
649 <tbody>
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>
654 <h4>Returns</h4>
655 <p>Attribute or NULL if not found</p>
656 <!-- NEW PAGE -->
657 <h3 class='title'><a name='ppdFindOption'>ppdFindOption()</a></h3>
658 <h4>Description</h4>
659 <p>Return a pointer to the specified option.
660 <h4>Syntax</h4>
661 <p><tt>
662 <a href='#ppd_option_t'>ppd_option_t</a> *<br>
663 ppdFindOption(
664 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
665 const char * option);
666 </tt></p>
667 <h4>Arguments</h4>
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>
670 <tbody>
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>
674 <h4>Returns</h4>
675 <p>Pointer to option or NULL</p>
676 <!-- NEW PAGE -->
677 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppdFirstCustomParam'>ppdFirstCustomParam()</a></h3>
678 <h4>Description</h4>
679 <p>Return the first parameter for a custom option.
680
681
682 <h4>Syntax</h4>
683 <p><tt>
684 <a href='#ppd_cparam_t'>ppd_cparam_t</a> *<br>
685 ppdFirstCustomParam(
686 <a href='#ppd_coption_t'>ppd_coption_t</a> * opt);
687 </tt></p>
688 <h4>Arguments</h4>
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>
691 <tbody>
692 <tr><td><tt>opt</tt></td><td>Custom option</td></tr>
693 </tbody></table></div>
694 <h4>Returns</h4>
695 <p>Custom parameter or NULL</p>
696 <!-- NEW PAGE -->
697 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppdFirstOption'>ppdFirstOption()</a></h3>
698 <h4>Description</h4>
699 <p>Return the first option in the PPD file.
700 <p>Options are returned from all groups in sorted order.
701
702
703 <h4>Syntax</h4>
704 <p><tt>
705 <a href='#ppd_option_t'>ppd_option_t</a> *<br>
706 ppdFirstOption(
707 <a href='#ppd_file_t'>ppd_file_t</a> * ppd);
708 </tt></p>
709 <h4>Arguments</h4>
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>
712 <tbody>
713 <tr><td><tt>ppd</tt></td><td>PPD file</td></tr>
714 </tbody></table></div>
715 <h4>Returns</h4>
716 <p>First option or NULL</p>
717 <!-- NEW PAGE -->
718 <h3 class='title'><a name='ppdIsMarked'>ppdIsMarked()</a></h3>
719 <h4>Description</h4>
720 <p>Check to see if an option is marked...
721 <h4>Syntax</h4>
722 <p><tt>
723 int<br>
724 ppdIsMarked(
725 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
726 const char * option,
727 const char * choice);
728 </tt></p>
729 <h4>Arguments</h4>
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>
732 <tbody>
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>
737 <h4>Returns</h4>
738 <p>Non-zero if option is marked</p>
739 <!-- NEW PAGE -->
740 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span><a name='ppdLastError'>ppdLastError()</a></h3>
741 <h4>Description</h4>
742 <p>Return the status from the last ppdOpen*().
743
744
745 <h4>Syntax</h4>
746 <p><tt>
747 ppd_status_t<br>
748 ppdLastError(
749 int * line);
750 </tt></p>
751 <h4>Arguments</h4>
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>
754 <tbody>
755 <tr><td><tt>line</tt></td><td>Line number</td></tr>
756 </tbody></table></div>
757 <h4>Returns</h4>
758 <p>Status code</p>
759 <!-- NEW PAGE -->
760 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppdLocalize'>ppdLocalize()</a></h3>
761 <h4>Description</h4>
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.
766
767
768 <h4>Syntax</h4>
769 <p><tt>
770 int<br>
771 ppdLocalize(
772 <a href='#ppd_file_t'>ppd_file_t</a> * ppd);
773 </tt></p>
774 <h4>Arguments</h4>
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>
777 <tbody>
778 <tr><td><tt>ppd</tt></td><td>PPD file</td></tr>
779 </tbody></table></div>
780 <h4>Returns</h4>
781 <p>0 on success, -1 on error</p>
782 <!-- NEW PAGE -->
783 <h3 class='title'><span class='info'>&nbsp;CUPS 1.3&nbsp;</span><a name='ppdLocalizeIPPReason'>ppdLocalizeIPPReason()</a></h3>
784 <h4>Description</h4>
785 <p>Get the localized version of a cupsIPPReason
786 attribute.
787 <p>This function uses the current locale to find the corresponding reason
788 text or URI from the attribute value. If &quot;scheme&quot; is NULL or &quot;text&quot;,
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.
792
793
794 <h4>Syntax</h4>
795 <p><tt>
796 const char *<br>
797 ppdLocalizeIPPReason(
798 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
799 const char * reason,
800 const char * scheme,
801 char * buffer,
802 size_t bufsize);
803 </tt></p>
804 <h4>Arguments</h4>
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>
807 <tbody>
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>
814 <h4>Returns</h4>
815 <p>Value or NULL if not found</p>
816 <!-- NEW PAGE -->
817 <h3 class='title'><a name='ppdMarkDefaults'>ppdMarkDefaults()</a></h3>
818 <h4>Description</h4>
819 <p>Mark all default options in the PPD file.
820 <h4>Syntax</h4>
821 <p><tt>
822 void<br>
823 ppdMarkDefaults(
824 <a href='#ppd_file_t'>ppd_file_t</a> * ppd);
825 </tt></p>
826 <h4>Arguments</h4>
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>
829 <tbody>
830 <tr><td><tt>ppd</tt></td><td>PPD file record</td></tr>
831 </tbody></table></div>
832 <h4>Returns</h4>
833 <p>Nothing.</p>
834 <!-- NEW PAGE -->
835 <h3 class='title'><a name='ppdMarkOption'>ppdMarkOption()</a></h3>
836 <h4>Description</h4>
837 <p>Mark an option in a PPD file.
838 <p>Notes:
839 <p>-1 is returned if the given option would conflict with any currently
840 selected option.
841 <h4>Syntax</h4>
842 <p><tt>
843 int<br>
844 ppdMarkOption(
845 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
846 const char * option,
847 const char * choice);
848 </tt></p>
849 <h4>Arguments</h4>
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>
852 <tbody>
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>
857 <h4>Returns</h4>
858 <p>Number of conflicts</p>
859 <!-- NEW PAGE -->
860 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppdNextCustomParam'>ppdNextCustomParam()</a></h3>
861 <h4>Description</h4>
862 <p>Return the next parameter for a custom option.
863
864
865 <h4>Syntax</h4>
866 <p><tt>
867 <a href='#ppd_cparam_t'>ppd_cparam_t</a> *<br>
868 ppdNextCustomParam(
869 <a href='#ppd_coption_t'>ppd_coption_t</a> * opt);
870 </tt></p>
871 <h4>Arguments</h4>
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>
874 <tbody>
875 <tr><td><tt>opt</tt></td><td>Custom option</td></tr>
876 </tbody></table></div>
877 <h4>Returns</h4>
878 <p>Custom parameter or NULL</p>
879 <!-- NEW PAGE -->
880 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppdNextOption'>ppdNextOption()</a></h3>
881 <h4>Description</h4>
882 <p>Return the next option in the PPD file.
883 <p>Options are returned from all groups in sorted order.
884
885
886 <h4>Syntax</h4>
887 <p><tt>
888 <a href='#ppd_option_t'>ppd_option_t</a> *<br>
889 ppdNextOption(
890 <a href='#ppd_file_t'>ppd_file_t</a> * ppd);
891 </tt></p>
892 <h4>Arguments</h4>
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>
895 <tbody>
896 <tr><td><tt>ppd</tt></td><td>PPD file</td></tr>
897 </tbody></table></div>
898 <h4>Returns</h4>
899 <p>Next option or NULL</p>
900 <!-- NEW PAGE -->
901 <h3 class='title'><a name='ppdOpen'>ppdOpen()</a></h3>
902 <h4>Description</h4>
903 <p>Read a PPD file into memory.
904 <h4>Syntax</h4>
905 <p><tt>
906 <a href='#ppd_file_t'>ppd_file_t</a> *<br>
907 ppdOpen(
908 FILE * fp);
909 </tt></p>
910 <h4>Arguments</h4>
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>
913 <tbody>
914 <tr><td><tt>fp</tt></td><td>File to read from</td></tr>
915 </tbody></table></div>
916 <h4>Returns</h4>
917 <p>PPD file record</p>
918 <!-- NEW PAGE -->
919 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppdOpen2'>ppdOpen2()</a></h3>
920 <h4>Description</h4>
921 <p>Read a PPD file into memory.
922
923
924 <h4>Syntax</h4>
925 <p><tt>
926 <a href='#ppd_file_t'>ppd_file_t</a> *<br>
927 ppdOpen2(
928 cups_file_t * fp);
929 </tt></p>
930 <h4>Arguments</h4>
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>
933 <tbody>
934 <tr><td><tt>fp</tt></td><td>File to read from</td></tr>
935 </tbody></table></div>
936 <h4>Returns</h4>
937 <p>PPD file record</p>
938 <!-- NEW PAGE -->
939 <h3 class='title'><a name='ppdOpenFd'>ppdOpenFd()</a></h3>
940 <h4>Description</h4>
941 <p>Read a PPD file into memory.
942 <h4>Syntax</h4>
943 <p><tt>
944 <a href='#ppd_file_t'>ppd_file_t</a> *<br>
945 ppdOpenFd(
946 int fd);
947 </tt></p>
948 <h4>Arguments</h4>
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>
951 <tbody>
952 <tr><td><tt>fd</tt></td><td>File to read from</td></tr>
953 </tbody></table></div>
954 <h4>Returns</h4>
955 <p>PPD file record</p>
956 <!-- NEW PAGE -->
957 <h3 class='title'><a name='ppdOpenFile'>ppdOpenFile()</a></h3>
958 <h4>Description</h4>
959 <p>Read a PPD file into memory.
960 <h4>Syntax</h4>
961 <p><tt>
962 <a href='#ppd_file_t'>ppd_file_t</a> *<br>
963 ppdOpenFile(
964 const char * filename);
965 </tt></p>
966 <h4>Arguments</h4>
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>
969 <tbody>
970 <tr><td><tt>filename</tt></td><td>File to read from</td></tr>
971 </tbody></table></div>
972 <h4>Returns</h4>
973 <p>PPD file record</p>
974 <!-- NEW PAGE -->
975 <h3 class='title'><a name='ppdPageLength'>ppdPageLength()</a></h3>
976 <h4>Description</h4>
977 <p>Get the page length for the given size.
978 <h4>Syntax</h4>
979 <p><tt>
980 float<br>
981 ppdPageLength(
982 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
983 const char * name);
984 </tt></p>
985 <h4>Arguments</h4>
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>
988 <tbody>
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>
992 <h4>Returns</h4>
993 <p>Length of page in points or 0.0</p>
994 <!-- NEW PAGE -->
995 <h3 class='title'><a name='ppdPageSize'>ppdPageSize()</a></h3>
996 <h4>Description</h4>
997 <p>Get the page size record for the given size.
998 <h4>Syntax</h4>
999 <p><tt>
1000 <a href='#ppd_size_t'>ppd_size_t</a> *<br>
1001 ppdPageSize(
1002 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
1003 const char * name);
1004 </tt></p>
1005 <h4>Arguments</h4>
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>
1008 <tbody>
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>
1012 <h4>Returns</h4>
1013 <p>Size record for page or NULL</p>
1014 <!-- NEW PAGE -->
1015 <h3 class='title'><a name='ppdPageWidth'>ppdPageWidth()</a></h3>
1016 <h4>Description</h4>
1017 <p>Get the page width for the given size.
1018 <h4>Syntax</h4>
1019 <p><tt>
1020 float<br>
1021 ppdPageWidth(
1022 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
1023 const char * name);
1024 </tt></p>
1025 <h4>Arguments</h4>
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>
1028 <tbody>
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>
1032 <h4>Returns</h4>
1033 <p>Width of page in points or 0.0</p>
1034 <!-- NEW PAGE -->
1035 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.20&nbsp;</span><a name='ppdSetConformance'>ppdSetConformance()</a></h3>
1036 <h4>Description</h4>
1037 <p>Set the conformance level for PPD files.
1038
1039
1040 <h4>Syntax</h4>
1041 <p><tt>
1042 void<br>
1043 ppdSetConformance(
1044 <a href='#ppd_conform_t'>ppd_conform_t</a> c);
1045 </tt></p>
1046 <h4>Arguments</h4>
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>
1049 <tbody>
1050 <tr><td><tt>c</tt></td><td>Conformance level</td></tr>
1051 </tbody></table></div>
1052 <h4>Returns</h4>
1053 <p>Nothing.</p>
1054 <!-- NEW PAGE -->
1055 <h2 class='title'><a name='STRUCTURES'>Structures</a></h2>
1056 <ul>
1057 <li><a href='#ppd_attr_s'><tt>ppd_attr_s</tt></a> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</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'>&nbsp;CUPS 1.2&nbsp;</span></li>
1060 <li><a href='#ppd_cparam_s'><tt>ppd_cparam_s</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</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>
1067 </ul>
1068 <!-- NEW PAGE -->
1069 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span><a name='ppd_attr_s'>ppd_attr_s</a></h3>
1070 <h4>Description</h4>
1071 <p>PPD Attribute Structure
1072 <h4>Definition</h4>
1073 <p><tt>
1074 struct ppd_attr_s<br>
1075 {<br>
1076 &nbsp;&nbsp;char name[PPD_MAX_NAME];<br>
1077 &nbsp;&nbsp;char spec[PPD_MAX_NAME];<br>
1078 &nbsp;&nbsp;char text[PPD_MAX_TEXT];<br>
1079 &nbsp;&nbsp;char * value;<br>
1080 };</tt></p>
1081 <h4>Members</h4>
1082 <div class='table'><table align='center' border='1' width='80%' summary='Members'>
1083 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1084 <tbody>
1085 <tr><td><tt>name[PPD_MAX_NAME]</tt> </td><td>Name of attribute (cupsXYZ)
1086 </td></tr>
1087 <tr><td><tt>spec[PPD_MAX_NAME]</tt> </td><td>Specifier string, if any
1088 </td></tr>
1089 <tr><td><tt>text[PPD_MAX_TEXT]</tt> </td><td>Human-readable text, if any
1090 </td></tr>
1091 <tr><td><tt>value</tt> </td><td>Value string
1092 </td></tr>
1093 </tbody></table></div>
1094 <!-- NEW PAGE -->
1095 <h3 class='title'><a name='ppd_choice_s'>ppd_choice_s</a></h3>
1096 <h4>Description</h4>
1097 <p>Option choices
1098 <h4>Definition</h4>
1099 <p><tt>
1100 struct ppd_choice_s<br>
1101 {<br>
1102 &nbsp;&nbsp;char choice[PPD_MAX_NAME];<br>
1103 &nbsp;&nbsp;char * code;<br>
1104 &nbsp;&nbsp;char marked;<br>
1105 &nbsp;&nbsp;<a href='#ppd_option_t'>ppd_option_t</a> * option;<br>
1106 &nbsp;&nbsp;char text[PPD_MAX_TEXT];<br>
1107 };</tt></p>
1108 <h4>Members</h4>
1109 <div class='table'><table align='center' border='1' width='80%' summary='Members'>
1110 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1111 <tbody>
1112 <tr><td><tt>choice[PPD_MAX_NAME]</tt> </td><td>Computer-readable option name
1113 </td></tr>
1114 <tr><td><tt>code</tt> </td><td>Code to send for this option
1115 </td></tr>
1116 <tr><td><tt>marked</tt> </td><td>0 if not selected, 1 otherwise
1117 </td></tr>
1118 <tr><td><tt>option</tt> </td><td>Pointer to parent option structure
1119 </td></tr>
1120 <tr><td><tt>text[PPD_MAX_TEXT]</tt> </td><td>Human-readable option name
1121 </td></tr>
1122 </tbody></table></div>
1123 <!-- NEW PAGE -->
1124 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppd_coption_s'>ppd_coption_s</a></h3>
1125 <h4>Description</h4>
1126 <p>Custom Option
1127 <h4>Definition</h4>
1128 <p><tt>
1129 struct ppd_coption_s<br>
1130 {<br>
1131 &nbsp;&nbsp;char keyword[PPD_MAX_NAME];<br>
1132 &nbsp;&nbsp;int marked;<br>
1133 &nbsp;&nbsp;<a href='#ppd_option_t'>ppd_option_t</a> * option;<br>
1134 &nbsp;&nbsp;cups_array_t * params;<br>
1135 };</tt></p>
1136 <h4>Members</h4>
1137 <div class='table'><table align='center' border='1' width='80%' summary='Members'>
1138 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1139 <tbody>
1140 <tr><td><tt>keyword[PPD_MAX_NAME]</tt> </td><td>Name of option that is being extended...
1141 </td></tr>
1142 <tr><td><tt>marked</tt> </td><td>Extended option is marked
1143 </td></tr>
1144 <tr><td><tt>option</tt> </td><td>Option that is being extended...
1145 </td></tr>
1146 <tr><td><tt>params</tt> </td><td>Parameters
1147 </td></tr>
1148 </tbody></table></div>
1149 <!-- NEW PAGE -->
1150 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppd_cparam_s'>ppd_cparam_s</a></h3>
1151 <h4>Description</h4>
1152 <p>Custom Parameter
1153 <h4>Definition</h4>
1154 <p><tt>
1155 struct ppd_cparam_s<br>
1156 {<br>
1157 &nbsp;&nbsp;<a href='#ppd_cpvalue_t'>ppd_cpvalue_t</a> current;<br>
1158 &nbsp;&nbsp;<a href='#ppd_cplimit_t'>ppd_cplimit_t</a> minimum, maximum;<br>
1159 &nbsp;&nbsp;char name[PPD_MAX_NAME];<br>
1160 &nbsp;&nbsp;int order;<br>
1161 &nbsp;&nbsp;char text[PPD_MAX_TEXT];<br>
1162 &nbsp;&nbsp;<a href='#ppd_cptype_t'>ppd_cptype_t</a> type;<br>
1163 };</tt></p>
1164 <h4>Members</h4>
1165 <div class='table'><table align='center' border='1' width='80%' summary='Members'>
1166 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1167 <tbody>
1168 <tr><td><tt>current</tt> </td><td>Current value
1169 </td></tr>
1170 <tr><td><tt>maximum</tt> </td><td>Maximum value
1171 </td></tr>
1172 <tr><td><tt>name[PPD_MAX_NAME]</tt> </td><td>Parameter name
1173 </td></tr>
1174 <tr><td><tt>order</tt> </td><td>Order (0 to N)
1175 </td></tr>
1176 <tr><td><tt>text[PPD_MAX_TEXT]</tt> </td><td>Human-readable text
1177 </td></tr>
1178 <tr><td><tt>type</tt> </td><td>Parameter type
1179 </td></tr>
1180 </tbody></table></div>
1181 <!-- NEW PAGE -->
1182 <h3 class='title'><a name='ppd_emul_s'>ppd_emul_s</a></h3>
1183 <h4>Description</h4>
1184 <p>Emulators
1185 <h4>Definition</h4>
1186 <p><tt>
1187 struct ppd_emul_s<br>
1188 {<br>
1189 &nbsp;&nbsp;char name[PPD_MAX_NAME];<br>
1190 &nbsp;&nbsp;char * start;<br>
1191 &nbsp;&nbsp;char * stop;<br>
1192 };</tt></p>
1193 <h4>Members</h4>
1194 <div class='table'><table align='center' border='1' width='80%' summary='Members'>
1195 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1196 <tbody>
1197 <tr><td><tt>name[PPD_MAX_NAME]</tt> </td><td>Emulator name
1198 </td></tr>
1199 <tr><td><tt>start</tt> </td><td>Code to switch to this emulation
1200 </td></tr>
1201 <tr><td><tt>stop</tt> </td><td>Code to stop this emulation
1202 </td></tr>
1203 </tbody></table></div>
1204 <!-- NEW PAGE -->
1205 <h3 class='title'><a name='ppd_file_s'>ppd_file_s</a></h3>
1206 <h4>Description</h4>
1207 <p>PPD File
1208 <h4>Definition</h4>
1209 <p><tt>
1210 struct ppd_file_s<br>
1211 {<br>
1212 &nbsp;&nbsp;int accurate_screens;<br>
1213 &nbsp;&nbsp;<a href='#ppd_attr_t'>ppd_attr_t</a> ** attrs;<br>
1214 &nbsp;&nbsp;int color_device;<br>
1215 &nbsp;&nbsp;ppd_cs_t colorspace;<br>
1216 &nbsp;&nbsp;<a href='#ppd_const_t'>ppd_const_t</a> * consts;<br>
1217 &nbsp;&nbsp;int contone_only;<br>
1218 &nbsp;&nbsp;cups_array_t * coptions;<br>
1219 &nbsp;&nbsp;int cur_attr;<br>
1220 &nbsp;&nbsp;float custom_margins[4];<br>
1221 &nbsp;&nbsp;float custom_max[2];<br>
1222 &nbsp;&nbsp;float custom_min[2];<br>
1223 &nbsp;&nbsp;<a href='#ppd_emul_t'>ppd_emul_t</a> * emulations;<br>
1224 &nbsp;&nbsp;char ** filters;<br>
1225 &nbsp;&nbsp;int flip_duplex;<br>
1226 &nbsp;&nbsp;char ** fonts;<br>
1227 &nbsp;&nbsp;<a href='#ppd_group_t'>ppd_group_t</a> * groups;<br>
1228 &nbsp;&nbsp;char * jcl_begin;<br>
1229 &nbsp;&nbsp;char * jcl_end;<br>
1230 &nbsp;&nbsp;char * jcl_ps;<br>
1231 &nbsp;&nbsp;int landscape;<br>
1232 &nbsp;&nbsp;char * lang_encoding;<br>
1233 &nbsp;&nbsp;char * lang_version;<br>
1234 &nbsp;&nbsp;int language_level;<br>
1235 &nbsp;&nbsp;int manual_copies;<br>
1236 &nbsp;&nbsp;char * manufacturer;<br>
1237 &nbsp;&nbsp;cups_array_t * marked;<br>
1238 &nbsp;&nbsp;int model_number;<br>
1239 &nbsp;&nbsp;char * modelname;<br>
1240 &nbsp;&nbsp;char * nickname;<br>
1241 &nbsp;&nbsp;int num_attrs;<br>
1242 &nbsp;&nbsp;int num_consts;<br>
1243 &nbsp;&nbsp;int num_emulations;<br>
1244 &nbsp;&nbsp;int num_filters;<br>
1245 &nbsp;&nbsp;int num_fonts;<br>
1246 &nbsp;&nbsp;int num_groups;<br>
1247 &nbsp;&nbsp;int num_profiles;<br>
1248 &nbsp;&nbsp;int num_sizes;<br>
1249 &nbsp;&nbsp;cups_array_t * options;<br>
1250 &nbsp;&nbsp;char * patches;<br>
1251 &nbsp;&nbsp;char * pcfilename;<br>
1252 &nbsp;&nbsp;char * product;<br>
1253 &nbsp;&nbsp;<a href='#ppd_profile_t'>ppd_profile_t</a> * profiles;<br>
1254 &nbsp;&nbsp;char * protocols;<br>
1255 &nbsp;&nbsp;char * shortnickname;<br>
1256 &nbsp;&nbsp;<a href='#ppd_size_t'>ppd_size_t</a> * sizes;<br>
1257 &nbsp;&nbsp;cups_array_t * sorted_attrs;<br>
1258 &nbsp;&nbsp;int throughput;<br>
1259 &nbsp;&nbsp;char * ttrasterizer;<br>
1260 &nbsp;&nbsp;int variable_sizes;<br>
1261 };</tt></p>
1262 <h4>Members</h4>
1263 <div class='table'><table align='center' border='1' width='80%' summary='Members'>
1264 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1265 <tbody>
1266 <tr><td><tt>accurate_screens</tt> </td><td>1 = supports accurate screens, 0 = not
1267 </td></tr>
1268 <tr><td><tt>attrs</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>Attributes @private@
1269 </td></tr>
1270 <tr><td><tt>color_device</tt> </td><td>1 = color device, 0 = grayscale
1271 </td></tr>
1272 <tr><td><tt>colorspace</tt> </td><td>Default colorspace
1273 </td></tr>
1274 <tr><td><tt>consts</tt> </td><td>UI/Non-UI constraints
1275 </td></tr>
1276 <tr><td><tt>contone_only</tt> </td><td>1 = continuous tone only, 0 = not
1277 </td></tr>
1278 <tr><td><tt>coptions</tt> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></td><td>Custom options array @private@
1279 </td></tr>
1280 <tr><td><tt>cur_attr</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>Current attribute @private@
1281 </td></tr>
1282 <tr><td><tt>custom_margins[4]</tt> </td><td>Margins around page
1283 </td></tr>
1284 <tr><td><tt>custom_max[2]</tt> </td><td>Maximum variable page size
1285 </td></tr>
1286 <tr><td><tt>custom_min[2]</tt> </td><td>Minimum variable page size
1287 </td></tr>
1288 <tr><td><tt>emulations</tt> </td><td>Emulations and the code to invoke them
1289 </td></tr>
1290 <tr><td><tt>filters</tt> </td><td>Filter strings...
1291 </td></tr>
1292 <tr><td><tt>flip_duplex</tt> <span class='info'>&nbsp;DEPRECATED&nbsp;</span></td><td>1 = Flip page for back sides
1293 </td></tr>
1294 <tr><td><tt>fonts</tt> </td><td>Pre-loaded fonts
1295 </td></tr>
1296 <tr><td><tt>groups</tt> </td><td>UI groups
1297 </td></tr>
1298 <tr><td><tt>jcl_begin</tt> </td><td>Start JCL commands
1299 </td></tr>
1300 <tr><td><tt>jcl_end</tt> </td><td>End JCL commands
1301 </td></tr>
1302 <tr><td><tt>jcl_ps</tt> </td><td>Enter PostScript interpreter
1303 </td></tr>
1304 <tr><td><tt>landscape</tt> </td><td>-90 or 90
1305 </td></tr>
1306 <tr><td><tt>lang_encoding</tt> </td><td>Language encoding
1307 </td></tr>
1308 <tr><td><tt>lang_version</tt> </td><td>Language version (English, Spanish, etc.)
1309 </td></tr>
1310 <tr><td><tt>language_level</tt> </td><td>Language level of device
1311 </td></tr>
1312 <tr><td><tt>manual_copies</tt> </td><td>1 = Copies done manually, 0 = hardware
1313 </td></tr>
1314 <tr><td><tt>manufacturer</tt> </td><td>Manufacturer name
1315 </td></tr>
1316 <tr><td><tt>marked</tt> <span class='info'>&nbsp;CUPS 1.3&nbsp;</span></td><td>Marked choices @private@
1317 </td></tr>
1318 <tr><td><tt>model_number</tt> </td><td>Device-specific model number
1319 </td></tr>
1320 <tr><td><tt>modelname</tt> </td><td>Model name (general)
1321 </td></tr>
1322 <tr><td><tt>nickname</tt> </td><td>Nickname (specific)
1323 </td></tr>
1324 <tr><td><tt>num_attrs</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>Number of attributes @private@
1325 </td></tr>
1326 <tr><td><tt>num_consts</tt> </td><td>Number of UI/Non-UI constraints
1327 </td></tr>
1328 <tr><td><tt>num_emulations</tt> </td><td>Number of emulations supported
1329 </td></tr>
1330 <tr><td><tt>num_filters</tt> </td><td>Number of filters
1331 </td></tr>
1332 <tr><td><tt>num_fonts</tt> </td><td>Number of pre-loaded fonts
1333 </td></tr>
1334 <tr><td><tt>num_groups</tt> </td><td>Number of UI groups
1335 </td></tr>
1336 <tr><td><tt>num_profiles</tt> </td><td>Number of sRGB color profiles
1337 </td></tr>
1338 <tr><td><tt>num_sizes</tt> </td><td>Number of page sizes
1339 </td></tr>
1340 <tr><td><tt>options</tt> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></td><td>Option lookup array @private@
1341 </td></tr>
1342 <tr><td><tt>patches</tt> </td><td>Patch commands to be sent to printer
1343 </td></tr>
1344 <tr><td><tt>pcfilename</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>PCFileName string
1345 </td></tr>
1346 <tr><td><tt>product</tt> </td><td>Product name (from PS RIP/interpreter)
1347 </td></tr>
1348 <tr><td><tt>profiles</tt> </td><td>sRGB color profiles
1349 </td></tr>
1350 <tr><td><tt>protocols</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>Protocols (BCP, TBCP) string
1351 </td></tr>
1352 <tr><td><tt>shortnickname</tt> </td><td>Short version of nickname
1353 </td></tr>
1354 <tr><td><tt>sizes</tt> </td><td>Page sizes
1355 </td></tr>
1356 <tr><td><tt>sorted_attrs</tt> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></td><td>Attribute lookup array @private@
1357 </td></tr>
1358 <tr><td><tt>throughput</tt> </td><td>Pages per minute
1359 </td></tr>
1360 <tr><td><tt>ttrasterizer</tt> </td><td>Truetype rasterizer
1361 </td></tr>
1362 <tr><td><tt>variable_sizes</tt> </td><td>1 = supports variable sizes, 0 = doesn't
1363 </td></tr>
1364 </tbody></table></div>
1365 <!-- NEW PAGE -->
1366 <h3 class='title'><a name='ppd_group_s'>ppd_group_s</a></h3>
1367 <h4>Description</h4>
1368 <p>Groups
1369 <h4>Definition</h4>
1370 <p><tt>
1371 struct ppd_group_s<br>
1372 {<br>
1373 &nbsp;&nbsp;char text[PPD_MAX_TEXT - PPD_MAX_NAME];<br>
1374 &nbsp;&nbsp;char name[PPD_MAX_NAME];<br>
1375 &nbsp;&nbsp;int num_options;<br>
1376 &nbsp;&nbsp;int num_subgroups;<br>
1377 &nbsp;&nbsp;<a href='#ppd_option_t'>ppd_option_t</a> * options;<br>
1378 &nbsp;&nbsp;struct <a href='#ppd_group_s'>ppd_group_s</a> * subgroups;<br>
1379 };</tt></p>
1380 <h4>Members</h4>
1381 <div class='table'><table align='center' border='1' width='80%' summary='Members'>
1382 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1383 <tbody>
1384 <tr><td><tt>PPD_MAX_NAME]</tt> </td><td>Human-readable group name
1385 </td></tr>
1386 <tr><td><tt>name[PPD_MAX_NAME]</tt> <span class='info'>&nbsp;CUPS 1.1.18&nbsp;</span></td><td>Group name
1387 </td></tr>
1388 <tr><td><tt>num_options</tt> </td><td>Number of options
1389 </td></tr>
1390 <tr><td><tt>num_subgroups</tt> </td><td>Number of sub-groups
1391 </td></tr>
1392 <tr><td><tt>options</tt> </td><td>Options
1393 </td></tr>
1394 <tr><td><tt>subgroups</tt> </td><td>Sub-groups (max depth = 1)
1395 </td></tr>
1396 </tbody></table></div>
1397 <!-- NEW PAGE -->
1398 <h3 class='title'><a name='ppd_option_s'>ppd_option_s</a></h3>
1399 <h4>Description</h4>
1400 <p>Options
1401 <h4>Definition</h4>
1402 <p><tt>
1403 struct ppd_option_s<br>
1404 {<br>
1405 &nbsp;&nbsp;<a href='#ppd_choice_t'>ppd_choice_t</a> * choices;<br>
1406 &nbsp;&nbsp;char conflicted;<br>
1407 &nbsp;&nbsp;char defchoice[PPD_MAX_NAME];<br>
1408 &nbsp;&nbsp;char keyword[PPD_MAX_NAME];<br>
1409 &nbsp;&nbsp;int num_choices;<br>
1410 &nbsp;&nbsp;float order;<br>
1411 &nbsp;&nbsp;<a href='#ppd_section_t'>ppd_section_t</a> section;<br>
1412 &nbsp;&nbsp;char text[PPD_MAX_TEXT];<br>
1413 &nbsp;&nbsp;<a href='#ppd_ui_t'>ppd_ui_t</a> ui;<br>
1414 };</tt></p>
1415 <h4>Members</h4>
1416 <div class='table'><table align='center' border='1' width='80%' summary='Members'>
1417 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1418 <tbody>
1419 <tr><td><tt>choices</tt> </td><td>Option choices
1420 </td></tr>
1421 <tr><td><tt>conflicted</tt> </td><td>0 if no conflicts exist, 1 otherwise
1422 </td></tr>
1423 <tr><td><tt>defchoice[PPD_MAX_NAME]</tt> </td><td>Default option choice
1424 </td></tr>
1425 <tr><td><tt>keyword[PPD_MAX_NAME]</tt> </td><td>Option keyword name (&quot;PageSize&quot;, etc.)
1426 </td></tr>
1427 <tr><td><tt>num_choices</tt> </td><td>Number of option choices
1428 </td></tr>
1429 <tr><td><tt>order</tt> </td><td>Order number
1430 </td></tr>
1431 <tr><td><tt>section</tt> </td><td>Section for command
1432 </td></tr>
1433 <tr><td><tt>text[PPD_MAX_TEXT]</tt> </td><td>Human-readable text
1434 </td></tr>
1435 <tr><td><tt>ui</tt> </td><td>Type of UI option
1436 </td></tr>
1437 </tbody></table></div>
1438 <!-- NEW PAGE -->
1439 <h3 class='title'><a name='ppd_profile_s'>ppd_profile_s</a></h3>
1440 <h4>Description</h4>
1441 <p>sRGB Color Profiles
1442 <h4>Definition</h4>
1443 <p><tt>
1444 struct ppd_profile_s<br>
1445 {<br>
1446 &nbsp;&nbsp;float density;<br>
1447 &nbsp;&nbsp;float gamma;<br>
1448 &nbsp;&nbsp;float matrix[3][3];<br>
1449 &nbsp;&nbsp;char media_type[PPD_MAX_NAME];<br>
1450 &nbsp;&nbsp;char resolution[PPD_MAX_NAME];<br>
1451 };</tt></p>
1452 <h4>Members</h4>
1453 <div class='table'><table align='center' border='1' width='80%' summary='Members'>
1454 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1455 <tbody>
1456 <tr><td><tt>density</tt> </td><td>Ink density to use
1457 </td></tr>
1458 <tr><td><tt>gamma</tt> </td><td>Gamma correction to use
1459 </td></tr>
1460 <tr><td><tt>matrix[3][3]</tt> </td><td>Transform matrix
1461 </td></tr>
1462 <tr><td><tt>media_type[PPD_MAX_NAME]</tt> </td><td>Media type or &quot;-&quot;
1463 </td></tr>
1464 <tr><td><tt>resolution[PPD_MAX_NAME]</tt> </td><td>Resolution or &quot;-&quot;
1465 </td></tr>
1466 </tbody></table></div>
1467 <!-- NEW PAGE -->
1468 <h3 class='title'><a name='ppd_size_s'>ppd_size_s</a></h3>
1469 <h4>Description</h4>
1470 <p>Page Sizes
1471 <h4>Definition</h4>
1472 <p><tt>
1473 struct ppd_size_s<br>
1474 {<br>
1475 &nbsp;&nbsp;float bottom;<br>
1476 &nbsp;&nbsp;float left;<br>
1477 &nbsp;&nbsp;float length;<br>
1478 &nbsp;&nbsp;int marked;<br>
1479 &nbsp;&nbsp;char name[PPD_MAX_NAME];<br>
1480 &nbsp;&nbsp;float right;<br>
1481 &nbsp;&nbsp;float top;<br>
1482 &nbsp;&nbsp;float width;<br>
1483 };</tt></p>
1484 <h4>Members</h4>
1485 <div class='table'><table align='center' border='1' width='80%' summary='Members'>
1486 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1487 <tbody>
1488 <tr><td><tt>bottom</tt> </td><td>Bottom printable margin in points
1489 </td></tr>
1490 <tr><td><tt>left</tt> </td><td>Left printable margin in points
1491 </td></tr>
1492 <tr><td><tt>length</tt> </td><td>Length of media in points
1493 </td></tr>
1494 <tr><td><tt>marked</tt> </td><td>Page size selected?
1495 </td></tr>
1496 <tr><td><tt>name[PPD_MAX_NAME]</tt> </td><td>Media size option
1497 </td></tr>
1498 <tr><td><tt>right</tt> </td><td>Right printable margin in points
1499 </td></tr>
1500 <tr><td><tt>top</tt> </td><td>Top printable margin in points
1501 </td></tr>
1502 <tr><td><tt>width</tt> </td><td>Width of media in points
1503 </td></tr>
1504 </tbody></table></div>
1505 <!-- NEW PAGE -->
1506 <h2 class='title'><a name='TYPES'>Types</a></h2>
1507 <ul>
1508 <li><a href='#ppd_attr_t'><tt>ppd_attr_t</tt></a> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</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'>&nbsp;CUPS 1.2&nbsp;</span></li>
1512 <li><a href='#ppd_cparam_t'><tt>ppd_cparam_t</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
1513 <li><a href='#ppd_cplimit_t'><tt>ppd_cplimit_t</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
1514 <li><a href='#ppd_cptype_t'><tt>ppd_cptype_t</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
1515 <li><a href='#ppd_cpvalue_t'><tt>ppd_cpvalue_t</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</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>
1524 </ul>
1525 <!-- NEW PAGE -->
1526 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span><a name='ppd_attr_t'>ppd_attr_t</a></h3>
1527 <h4>Description</h4>
1528 <p>PPD Attribute Structure
1529 <h4>Definition</h4>
1530 <p><tt>
1531 typedef struct <a href='#ppd_attr_s'>ppd_attr_s</a> ppd_attr_t;
1532 </tt></p>
1533 <!-- NEW PAGE -->
1534 <h3 class='title'><a name='ppd_choice_t'>ppd_choice_t</a></h3>
1535 <h4>Description</h4>
1536 <p>Option choices
1537 <h4>Definition</h4>
1538 <p><tt>
1539 typedef struct <a href='#ppd_choice_s'>ppd_choice_s</a> ppd_choice_t;
1540 </tt></p>
1541 <!-- NEW PAGE -->
1542 <h3 class='title'><a name='ppd_const_t'>ppd_const_t</a></h3>
1543 <h4>Description</h4>
1544 <p>Constraints
1545 <h4>Definition</h4>
1546 <p><tt>
1547 typedef struct ppd_const_t;
1548 </tt></p>
1549 <!-- NEW PAGE -->
1550 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppd_coption_t'>ppd_coption_t</a></h3>
1551 <h4>Description</h4>
1552 <p>Custom Option
1553 <h4>Definition</h4>
1554 <p><tt>
1555 typedef struct <a href='#ppd_coption_s'>ppd_coption_s</a> ppd_coption_t;
1556 </tt></p>
1557 <!-- NEW PAGE -->
1558 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppd_cparam_t'>ppd_cparam_t</a></h3>
1559 <h4>Description</h4>
1560 <p>Custom Parameter
1561 <h4>Definition</h4>
1562 <p><tt>
1563 typedef struct <a href='#ppd_cparam_s'>ppd_cparam_s</a> ppd_cparam_t;
1564 </tt></p>
1565 <!-- NEW PAGE -->
1566 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppd_cplimit_t'>ppd_cplimit_t</a></h3>
1567 <h4>Description</h4>
1568 <p>Custom Parameter Limit
1569 <h4>Definition</h4>
1570 <p><tt>
1571 typedef union <a href='#ppd_cplimit_u'>ppd_cplimit_u</a> ppd_cplimit_t;
1572 </tt></p>
1573 <!-- NEW PAGE -->
1574 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppd_cptype_t'>ppd_cptype_t</a></h3>
1575 <h4>Description</h4>
1576 <p>Custom Parameter Type
1577 <h4>Definition</h4>
1578 <p><tt>
1579 typedef enum <a href='#ppd_cptype_e'>ppd_cptype_e</a> ppd_cptype_t;
1580 </tt></p>
1581 <!-- NEW PAGE -->
1582 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppd_cpvalue_t'>ppd_cpvalue_t</a></h3>
1583 <h4>Description</h4>
1584 <p>Custom Parameter Value
1585 <h4>Definition</h4>
1586 <p><tt>
1587 typedef union <a href='#ppd_cpvalue_u'>ppd_cpvalue_u</a> ppd_cpvalue_t;
1588 </tt></p>
1589 <!-- NEW PAGE -->
1590 <h3 class='title'><a name='ppd_emul_t'>ppd_emul_t</a></h3>
1591 <h4>Description</h4>
1592 <p>Emulators
1593 <h4>Definition</h4>
1594 <p><tt>
1595 typedef struct <a href='#ppd_emul_s'>ppd_emul_s</a> ppd_emul_t;
1596 </tt></p>
1597 <!-- NEW PAGE -->
1598 <h3 class='title'><a name='ppd_file_t'>ppd_file_t</a></h3>
1599 <h4>Description</h4>
1600 <p>PPD File
1601 <h4>Definition</h4>
1602 <p><tt>
1603 typedef struct <a href='#ppd_file_s'>ppd_file_s</a> ppd_file_t;
1604 </tt></p>
1605 <!-- NEW PAGE -->
1606 <h3 class='title'><a name='ppd_group_t'>ppd_group_t</a></h3>
1607 <h4>Description</h4>
1608 <p>Groups
1609 <h4>Definition</h4>
1610 <p><tt>
1611 typedef struct <a href='#ppd_group_s'>ppd_group_s</a> ppd_group_t;
1612 </tt></p>
1613 <!-- NEW PAGE -->
1614 <h3 class='title'><a name='ppd_option_t'>ppd_option_t</a></h3>
1615 <h4>Description</h4>
1616 <p>Options
1617 <h4>Definition</h4>
1618 <p><tt>
1619 typedef struct <a href='#ppd_option_s'>ppd_option_s</a> ppd_option_t;
1620 </tt></p>
1621 <!-- NEW PAGE -->
1622 <h3 class='title'><a name='ppd_profile_t'>ppd_profile_t</a></h3>
1623 <h4>Description</h4>
1624 <p>sRGB Color Profiles
1625 <h4>Definition</h4>
1626 <p><tt>
1627 typedef struct <a href='#ppd_profile_s'>ppd_profile_s</a> ppd_profile_t;
1628 </tt></p>
1629 <!-- NEW PAGE -->
1630 <h3 class='title'><a name='ppd_section_t'>ppd_section_t</a></h3>
1631 <h4>Description</h4>
1632 <p>Order dependency sections
1633 <h4>Definition</h4>
1634 <p><tt>
1635 typedef enum <a href='#ppd_section_e'>ppd_section_e</a> ppd_section_t;
1636 </tt></p>
1637 <!-- NEW PAGE -->
1638 <h3 class='title'><a name='ppd_size_t'>ppd_size_t</a></h3>
1639 <h4>Description</h4>
1640 <p>Page Sizes
1641 <h4>Definition</h4>
1642 <p><tt>
1643 typedef struct <a href='#ppd_size_s'>ppd_size_s</a> ppd_size_t;
1644 </tt></p>
1645 <!-- NEW PAGE -->
1646 <h3 class='title'><a name='ppd_ui_t'>ppd_ui_t</a></h3>
1647 <h4>Description</h4>
1648 <p>UI Types
1649 <h4>Definition</h4>
1650 <p><tt>
1651 typedef enum <a href='#ppd_ui_e'>ppd_ui_e</a> ppd_ui_t;
1652 </tt></p>
1653 <!-- NEW PAGE -->
1654 <h2 class='title'><a name='UNIONS'>Unions</a></h2>
1655 <ul>
1656 <li><a href='#ppd_cplimit_u'><tt>ppd_cplimit_u</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
1657 <li><a href='#ppd_cpvalue_u'><tt>ppd_cpvalue_u</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
1658 </ul>
1659 <!-- NEW PAGE -->
1660 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppd_cplimit_u'>ppd_cplimit_u</a></h3>
1661 <h4>Description</h4>
1662 <p>Custom Parameter Limit
1663 <h4>Definition</h4>
1664 <p><tt>
1665 union ppd_cplimit_u<br>
1666 {<br>
1667 &nbsp;&nbsp;float custom_curve;<br>
1668 &nbsp;&nbsp;int custom_int;<br>
1669 &nbsp;&nbsp;float custom_invcurve;<br>
1670 &nbsp;&nbsp;int custom_passcode;<br>
1671 &nbsp;&nbsp;int custom_password;<br>
1672 &nbsp;&nbsp;float custom_points;<br>
1673 &nbsp;&nbsp;float custom_real;<br>
1674 &nbsp;&nbsp;int custom_string;<br>
1675 };</tt></p>
1676 <h4>Members</h4>
1677 <div class='table'><table align='center' border='1' width='80%' summary='Members'>
1678 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1679 <tbody>
1680 <tr><td><tt>custom_curve</tt> </td><td>Gamma value
1681 </td></tr>
1682 <tr><td><tt>custom_int</tt> </td><td>Integer value
1683 </td></tr>
1684 <tr><td><tt>custom_invcurve</tt> </td><td>Gamma value
1685 </td></tr>
1686 <tr><td><tt>custom_passcode</tt> </td><td>Passcode length
1687 </td></tr>
1688 <tr><td><tt>custom_password</tt> </td><td>Password length
1689 </td></tr>
1690 <tr><td><tt>custom_points</tt> </td><td>Measurement value
1691 </td></tr>
1692 <tr><td><tt>custom_real</tt> </td><td>Real value
1693 </td></tr>
1694 <tr><td><tt>custom_string</tt> </td><td>String length
1695 </td></tr>
1696 </tbody></table></div>
1697 <!-- NEW PAGE -->
1698 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppd_cpvalue_u'>ppd_cpvalue_u</a></h3>
1699 <h4>Description</h4>
1700 <p>Custom Parameter Value
1701 <h4>Definition</h4>
1702 <p><tt>
1703 union ppd_cpvalue_u<br>
1704 {<br>
1705 &nbsp;&nbsp;float custom_curve;<br>
1706 &nbsp;&nbsp;int custom_int;<br>
1707 &nbsp;&nbsp;float custom_invcurve;<br>
1708 &nbsp;&nbsp;char * custom_passcode;<br>
1709 &nbsp;&nbsp;char * custom_password;<br>
1710 &nbsp;&nbsp;float custom_points;<br>
1711 &nbsp;&nbsp;float custom_real;<br>
1712 &nbsp;&nbsp;char * custom_string;<br>
1713 };</tt></p>
1714 <h4>Members</h4>
1715 <div class='table'><table align='center' border='1' width='80%' summary='Members'>
1716 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1717 <tbody>
1718 <tr><td><tt>custom_curve</tt> </td><td>Gamma value
1719 </td></tr>
1720 <tr><td><tt>custom_int</tt> </td><td>Integer value
1721 </td></tr>
1722 <tr><td><tt>custom_invcurve</tt> </td><td>Gamma value
1723 </td></tr>
1724 <tr><td><tt>custom_passcode</tt> </td><td>Passcode value
1725 </td></tr>
1726 <tr><td><tt>custom_password</tt> </td><td>Password value
1727 </td></tr>
1728 <tr><td><tt>custom_points</tt> </td><td>Measurement value
1729 </td></tr>
1730 <tr><td><tt>custom_real</tt> </td><td>Real value
1731 </td></tr>
1732 <tr><td><tt>custom_string</tt> </td><td>String value
1733 </td></tr>
1734 </tbody></table></div>
1735 </body>
1736 </html>