]> 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$"
20
21 PPD API introduction for the Common UNIX Printing System (CUPS).
22
23 Copyright 1997-2005 by Easy Software Products.
24
25 These coded instructions, statements, and computer programs are the
26 property of Easy Software Products and are protected by Federal
27 copyright law. Distribution and use rights are outlined in the file
28 "LICENSE.txt" which should have been included with this file. If this
29 file is missing or damaged please contact Easy Software Products
30 at:
31
32 Attn: CUPS Licensing Information
33 Easy Software Products
34 44141 Airport View Drive, Suite 204
35 Hollywood, Maryland 20636 USA
36
37 Voice: (301) 373-9600
38 EMail: cups-info@cups.org
39 WWW: http://www.cups.org
40 -->
41
42 <h2 class='title'>Introduction</h2>
43
44 <p>The CUPS PPD API provides...</p>
45
46 <h2 class='title'>General Usage</h2>
47
48 <p>The <var>&lt;cups/ppd.h&gt;</var> header file must be included
49 to use the <tt>ppd</tt> functions.</p>
50
51 <p>Programs using these functions must be linked to the CUPS
52 library: <var>libcups.a</var>, <var>libcups.so.2</var>,
53 <var>libcups.2.dylib</var>, <var>libcups_s.a</var>, or
54 <var>libcups2.lib</var> depending on the platform. The following
55 command compiles <var>myprogram.c</var> using GCC and the CUPS
56 library:</p>
57
58 <pre class='command'>
59 <kbd>gcc -o myprogram myprogram.c -lcups</kbd>
60 </pre>
61
62 <h2 class='title'>Compatibility</h2>
63
64 <p>Unless otherwise specified, the PPD API functions require CUPS
65 1.1 or higher.</p>
66 <h2 class='title'>Contents</h2>
67 <ul>
68 <li><a href='#ENUMERATIONS'>Enumerations</a></li>
69 <li><a href='#FUNCTIONS'>Functions</a></li>
70 <li><a href='#STRUCTURES'>Structures</a></li>
71 <li><a href='#TYPES'>Types</a></li>
72 <li><a href='#UNIONS'>Unions</a></li>
73 </ul>
74 <!-- NEW PAGE -->
75 <h2 class='title'><a name='ENUMERATIONS'>Enumerations</a></h2>
76 <ul>
77 <li><a href='#ppd_cs_e'><tt>ppd_cs_e</tt></a> </li>
78 <li><a href='#ppd_ext_ui_e'><tt>ppd_ext_ui_e</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
79 <li><a href='#ppd_section_e'><tt>ppd_section_e</tt></a> </li>
80 <li><a href='#ppd_status_e'><tt>ppd_status_e</tt></a> </li>
81 <li><a href='#ppd_ui_e'><tt>ppd_ui_e</tt></a> </li>
82 </ul>
83 <!-- NEW PAGE -->
84 <h3 class='title'><a name='ppd_cs_e'>ppd_cs_e</a></h3>
85 <h4>Description</h4>
86 <p>Colorspaces</p>
87 <h4>Values</h4>
88 <div class='table'><table align='center' border='1' width='80%'>
89 <thead><tr><th>Name</th><th>Description</th></tr></thead>
90 <tbody>
91 <tr><td><tt>PPD_CS_CMY</tt> </td><td>CMY colorspace</td></tr>
92 <tr><td><tt>PPD_CS_CMYK</tt> </td><td>CMYK colorspace</td></tr>
93 <tr><td><tt>PPD_CS_GRAY</tt> </td><td>Grayscale colorspace</td></tr>
94 <tr><td><tt>PPD_CS_N</tt> </td><td>DeviceN colorspace</td></tr>
95 <tr><td><tt>PPD_CS_RGB</tt> </td><td>RGB colorspace</td></tr>
96 <tr><td><tt>PPD_CS_RGBK</tt> </td><td>RGBK (K = gray) colorspace</td></tr>
97 </tbody></table></div>
98 <!-- NEW PAGE -->
99 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppd_ext_ui_e'>ppd_ext_ui_e</a></h3>
100 <h4>Description</h4>
101 <p>Extended UI Types </p>
102 <h4>Values</h4>
103 <div class='table'><table align='center' border='1' width='80%'>
104 <thead><tr><th>Name</th><th>Description</th></tr></thead>
105 <tbody>
106 <tr><td><tt>PPD_UI_CUPS_CURVE</tt> </td><td>Specify start, end, and gamma numbers</td></tr>
107 <tr><td><tt>PPD_UI_CUPS_GAMMA</tt> </td><td>Specify a gamma number</td></tr>
108 <tr><td><tt>PPD_UI_CUPS_INTEGER</tt> </td><td>Specify an integer number</td></tr>
109 <tr><td><tt>PPD_UI_CUPS_INTEGER_ARRAY</tt> </td><td>Specify an array of integer numbers</td></tr>
110 <tr><td><tt>PPD_UI_CUPS_REAL</tt> </td><td>Specify a real number</td></tr>
111 <tr><td><tt>PPD_UI_CUPS_REAL_ARRAY</tt> </td><td>Specify an array of real numbers</td></tr>
112 <tr><td><tt>PPD_UI_CUPS_TEXT</tt> </td><td>Specify a string</td></tr>
113 <tr><td><tt>PPD_UI_CUPS_XY_ARRAY</tt> </td><td>Specify an array of X/Y real numbers</td></tr>
114 </tbody></table></div>
115 <!-- NEW PAGE -->
116 <h3 class='title'><a name='ppd_section_e'>ppd_section_e</a></h3>
117 <h4>Description</h4>
118 <p>Order dependency sections</p>
119 <h4>Values</h4>
120 <div class='table'><table align='center' border='1' width='80%'>
121 <thead><tr><th>Name</th><th>Description</th></tr></thead>
122 <tbody>
123 <tr><td><tt>PPD_ORDER_ANY</tt> </td><td>Option code can be anywhere in the file</td></tr>
124 <tr><td><tt>PPD_ORDER_DOCUMENT</tt> </td><td>... must be in the DocumentSetup section</td></tr>
125 <tr><td><tt>PPD_ORDER_EXIT</tt> </td><td>... must be sent prior to the document</td></tr>
126 <tr><td><tt>PPD_ORDER_JCL</tt> </td><td>... must be sent as a JCL command</td></tr>
127 <tr><td><tt>PPD_ORDER_PAGE</tt> </td><td>... must be in the PageSetup section</td></tr>
128 <tr><td><tt>PPD_ORDER_PROLOG</tt> </td><td>... must be in the Prolog section</td></tr>
129 </tbody></table></div>
130 <!-- NEW PAGE -->
131 <h3 class='title'><a name='ppd_status_e'>ppd_status_e</a></h3>
132 <h4>Description</h4>
133 <p>Types and structures...</p>
134 <h4>Values</h4>
135 <div class='table'><table align='center' border='1' width='80%'>
136 <thead><tr><th>Name</th><th>Description</th></tr></thead>
137 <tbody>
138 <tr><td><tt>PPD_ALLOC_ERROR</tt> </td><td>Memory allocation error</td></tr>
139 <tr><td><tt>PPD_BAD_OPEN_GROUP</tt> </td><td>Bad OpenGroup</td></tr>
140 <tr><td><tt>PPD_BAD_OPEN_UI</tt> </td><td>Bad OpenUI/JCLOpenUI</td></tr>
141 <tr><td><tt>PPD_BAD_ORDER_DEPENDENCY</tt> </td><td>Bad OrderDependency</td></tr>
142 <tr><td><tt>PPD_BAD_UI_CONSTRAINTS</tt> </td><td>Bad UIConstraints</td></tr>
143 <tr><td><tt>PPD_FILE_OPEN_ERROR</tt> </td><td>Unable to open PPD file</td></tr>
144 <tr><td><tt>PPD_ILLEGAL_CHARACTER</tt> </td><td>Illegal control character</td></tr>
145 <tr><td><tt>PPD_ILLEGAL_MAIN_KEYWORD</tt> </td><td>Illegal main keyword string</td></tr>
146 <tr><td><tt>PPD_ILLEGAL_OPTION_KEYWORD</tt> </td><td>Illegal option keyword string</td></tr>
147 <tr><td><tt>PPD_ILLEGAL_TRANSLATION</tt> </td><td>Illegal translation string</td></tr>
148 <tr><td><tt>PPD_ILLEGAL_WHITESPACE</tt> </td><td>Illegal whitespace character</td></tr>
149 <tr><td><tt>PPD_INTERNAL_ERROR</tt> </td><td>Internal error</td></tr>
150 <tr><td><tt>PPD_LINE_TOO_LONG</tt> </td><td>Line longer than 255 chars</td></tr>
151 <tr><td><tt>PPD_MISSING_ASTERISK</tt> </td><td>Missing asterisk in column 0</td></tr>
152 <tr><td><tt>PPD_MISSING_PPDADOBE4</tt> </td><td>Missing PPD-Adobe-4.x header</td></tr>
153 <tr><td><tt>PPD_MISSING_VALUE</tt> </td><td>Missing value string</td></tr>
154 <tr><td><tt>PPD_NESTED_OPEN_GROUP</tt> </td><td>OpenGroup without a CloseGroup first</td></tr>
155 <tr><td><tt>PPD_NESTED_OPEN_UI</tt> </td><td>OpenUI/JCLOpenUI without a CloseUI/JCLCloseUI first</td></tr>
156 <tr><td><tt>PPD_NULL_FILE</tt> </td><td>NULL PPD file pointer</td></tr>
157 <tr><td><tt>PPD_OK</tt> </td><td>OK</td></tr>
158 </tbody></table></div>
159 <!-- NEW PAGE -->
160 <h3 class='title'><a name='ppd_ui_e'>ppd_ui_e</a></h3>
161 <h4>Description</h4>
162 <p>UI Types</p>
163 <h4>Values</h4>
164 <div class='table'><table align='center' border='1' width='80%'>
165 <thead><tr><th>Name</th><th>Description</th></tr></thead>
166 <tbody>
167 <tr><td><tt>PPD_UI_BOOLEAN</tt> </td><td>True or False option</td></tr>
168 <tr><td><tt>PPD_UI_PICKMANY</tt> </td><td>Pick zero or more from a list</td></tr>
169 <tr><td><tt>PPD_UI_PICKONE</tt> </td><td>Pick one from a list</td></tr>
170 </tbody></table></div>
171 <!-- NEW PAGE -->
172 <h2 class='title'><a name='FUNCTIONS'>Functions</a></h2>
173 <ul>
174 <li><a href='#ppdClose'><tt>ppdClose()</tt></a> </li>
175 <li><a href='#ppdCollect'><tt>ppdCollect()</tt></a> </li>
176 <li><a href='#ppdConflicts'><tt>ppdConflicts()</tt></a> </li>
177 <li><a href='#ppdEmit'><tt>ppdEmit()</tt></a> </li>
178 <li><a href='#ppdEmitFd'><tt>ppdEmitFd()</tt></a> </li>
179 <li><a href='#ppdEmitJCL'><tt>ppdEmitJCL()</tt></a> </li>
180 <li><a href='#ppdEmitJCLEnd'><tt>ppdEmitJCLEnd()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
181 <li><a href='#ppdErrorString'><tt>ppdErrorString()</tt></a> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></li>
182 <li><a href='#ppdFindAttr'><tt>ppdFindAttr()</tt></a> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></li>
183 <li><a href='#ppdFindChoice'><tt>ppdFindChoice()</tt></a> </li>
184 <li><a href='#ppdFindMarkedChoice'><tt>ppdFindMarkedChoice()</tt></a> </li>
185 <li><a href='#ppdFindNextAttr'><tt>ppdFindNextAttr()</tt></a> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></li>
186 <li><a href='#ppdFindOption'><tt>ppdFindOption()</tt></a> </li>
187 <li><a href='#ppdIsMarked'><tt>ppdIsMarked()</tt></a> </li>
188 <li><a href='#ppdLastError'><tt>ppdLastError()</tt></a> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></li>
189 <li><a href='#ppdMarkDefaults'><tt>ppdMarkDefaults()</tt></a> </li>
190 <li><a href='#ppdMarkOption'><tt>ppdMarkOption()</tt></a> </li>
191 <li><a href='#ppdOpen'><tt>ppdOpen()</tt></a> </li>
192 <li><a href='#ppdOpen2'><tt>ppdOpen2()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
193 <li><a href='#ppdOpenFd'><tt>ppdOpenFd()</tt></a> </li>
194 <li><a href='#ppdOpenFile'><tt>ppdOpenFile()</tt></a> </li>
195 <li><a href='#ppdPageLength'><tt>ppdPageLength()</tt></a> </li>
196 <li><a href='#ppdPageSize'><tt>ppdPageSize()</tt></a> </li>
197 <li><a href='#ppdPageWidth'><tt>ppdPageWidth()</tt></a> </li>
198 <li><a href='#ppdSetConformance'><tt>ppdSetConformance()</tt></a> <span class='info'>&nbsp;CUPS 1.1.20&nbsp;</span></li>
199 </ul>
200 <!-- NEW PAGE -->
201 <h3 class='title'><a name='ppdClose'>ppdClose()</a></h3>
202 <h4>Description</h4>
203 <p>Free all memory used by the PPD file.</p>
204 <h4>Syntax</h4>
205 <pre>
206 void
207 ppdClose(
208 <a href='#ppd_file_t'>ppd_file_t</a> * ppd);
209 </pre>
210 <h4>Arguments</h4>
211 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
212 <thead><tr><th>Name</th><th>Description</th></tr></thead>
213 <tbody>
214 <tr><td><tt>ppd</tt></td><td>PPD file record</td></tr>
215 </tbody></table></div>
216 <h4>Returns</h4>
217 <p>Nothing.</p>
218 <!-- NEW PAGE -->
219 <h3 class='title'><a name='ppdCollect'>ppdCollect()</a></h3>
220 <h4>Description</h4>
221 <p>Collect all marked options that reside in the specified
222 section.</p>
223 <h4>Syntax</h4>
224 <pre>
225 int
226 ppdCollect(
227 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
228 <a href='#ppd_section_t'>ppd_section_t</a> section,
229 <a href='#ppd_choice_t'>ppd_choice_t</a> *** choices);
230 </pre>
231 <h4>Arguments</h4>
232 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
233 <thead><tr><th>Name</th><th>Description</th></tr></thead>
234 <tbody>
235 <tr><td><tt>ppd</tt></td><td>PPD file data</td></tr>
236 <tr><td><tt>section</tt></td><td>Section to collect</td></tr>
237 <tr><td><tt>choices</tt></td><td>Pointers to choices</td></tr>
238 </tbody></table></div>
239 <h4>Returns</h4>
240 <p>Number of options marked</p>
241 <!-- NEW PAGE -->
242 <h3 class='title'><a name='ppdConflicts'>ppdConflicts()</a></h3>
243 <h4>Description</h4>
244 <p>Check to see if there are any conflicts.</p>
245 <h4>Syntax</h4>
246 <pre>
247 int
248 ppdConflicts(
249 <a href='#ppd_file_t'>ppd_file_t</a> * ppd);
250 </pre>
251 <h4>Arguments</h4>
252 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
253 <thead><tr><th>Name</th><th>Description</th></tr></thead>
254 <tbody>
255 <tr><td><tt>ppd</tt></td><td>PPD to check</td></tr>
256 </tbody></table></div>
257 <h4>Returns</h4>
258 <p>Number of conflicts found</p>
259 <!-- NEW PAGE -->
260 <h3 class='title'><a name='ppdEmit'>ppdEmit()</a></h3>
261 <h4>Description</h4>
262 <p>Emit code for marked options to a file.</p>
263 <h4>Syntax</h4>
264 <pre>
265 int
266 ppdEmit(
267 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
268 FILE * fp,
269 <a href='#ppd_section_t'>ppd_section_t</a> section);
270 </pre>
271 <h4>Arguments</h4>
272 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
273 <thead><tr><th>Name</th><th>Description</th></tr></thead>
274 <tbody>
275 <tr><td><tt>ppd</tt></td><td>PPD file record</td></tr>
276 <tr><td><tt>fp</tt></td><td>File to write to</td></tr>
277 <tr><td><tt>section</tt></td><td>Section to write</td></tr>
278 </tbody></table></div>
279 <h4>Returns</h4>
280 <p>0 on success, -1 on failure</p>
281 <!-- NEW PAGE -->
282 <h3 class='title'><a name='ppdEmitFd'>ppdEmitFd()</a></h3>
283 <h4>Description</h4>
284 <p>Emit code for marked options to a file.</p>
285 <h4>Syntax</h4>
286 <pre>
287 int
288 ppdEmitFd(
289 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
290 int fd,
291 <a href='#ppd_section_t'>ppd_section_t</a> section);
292 </pre>
293 <h4>Arguments</h4>
294 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
295 <thead><tr><th>Name</th><th>Description</th></tr></thead>
296 <tbody>
297 <tr><td><tt>ppd</tt></td><td>PPD file record</td></tr>
298 <tr><td><tt>fd</tt></td><td>File to write to</td></tr>
299 <tr><td><tt>section</tt></td><td>Section to write</td></tr>
300 </tbody></table></div>
301 <h4>Returns</h4>
302 <p>0 on success, -1 on failure</p>
303 <!-- NEW PAGE -->
304 <h3 class='title'><a name='ppdEmitJCL'>ppdEmitJCL()</a></h3>
305 <h4>Description</h4>
306 <p>Emit code for JCL options to a file.</p>
307 <h4>Syntax</h4>
308 <pre>
309 int
310 ppdEmitJCL(
311 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
312 FILE * fp,
313 int job_id,
314 const char * user,
315 const char * title);
316 </pre>
317 <h4>Arguments</h4>
318 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
319 <thead><tr><th>Name</th><th>Description</th></tr></thead>
320 <tbody>
321 <tr><td><tt>ppd</tt></td><td>PPD file record</td></tr>
322 <tr><td><tt>fp</tt></td><td>File to write to</td></tr>
323 <tr><td><tt>job_id</tt></td><td>Job ID</td></tr>
324 <tr><td><tt>user</tt></td><td>Username</td></tr>
325 <tr><td><tt>title</tt></td><td>Title</td></tr>
326 </tbody></table></div>
327 <h4>Returns</h4>
328 <p>0 on success, -1 on failure</p>
329 <!-- NEW PAGE -->
330 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppdEmitJCLEnd'>ppdEmitJCLEnd()</a></h3>
331 <h4>Description</h4>
332 <p>Emit JCLEnd code to a file.
333
334 </p>
335 <h4>Syntax</h4>
336 <pre>
337 int
338 ppdEmitJCLEnd(
339 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
340 FILE * fp);
341 </pre>
342 <h4>Arguments</h4>
343 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
344 <thead><tr><th>Name</th><th>Description</th></tr></thead>
345 <tbody>
346 <tr><td><tt>ppd</tt></td><td>PPD file record</td></tr>
347 <tr><td><tt>fp</tt></td><td>File to write to</td></tr>
348 </tbody></table></div>
349 <h4>Returns</h4>
350 <p>0 on success, -1 on failure</p>
351 <!-- NEW PAGE -->
352 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span><a name='ppdErrorString'>ppdErrorString()</a></h3>
353 <h4>Description</h4>
354 <p>Returns the text assocated with a status.
355
356 </p>
357 <h4>Syntax</h4>
358 <pre>
359 const char *
360 ppdErrorString(
361 ppd_status_t status);
362 </pre>
363 <h4>Arguments</h4>
364 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
365 <thead><tr><th>Name</th><th>Description</th></tr></thead>
366 <tbody>
367 <tr><td><tt>status</tt></td><td>PPD status</td></tr>
368 </tbody></table></div>
369 <h4>Returns</h4>
370 <p>Status string</p>
371 <!-- NEW PAGE -->
372 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span><a name='ppdFindAttr'>ppdFindAttr()</a></h3>
373 <h4>Description</h4>
374 <p>Find the first matching attribute...
375
376 </p>
377 <h4>Syntax</h4>
378 <pre>
379 <a href='#ppd_attr_t'>ppd_attr_t</a> *
380 ppdFindAttr(
381 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
382 const char * name,
383 const char * spec);
384 </pre>
385 <h4>Arguments</h4>
386 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
387 <thead><tr><th>Name</th><th>Description</th></tr></thead>
388 <tbody>
389 <tr><td><tt>ppd</tt></td><td>PPD file data</td></tr>
390 <tr><td><tt>name</tt></td><td>Attribute name</td></tr>
391 <tr><td><tt>spec</tt></td><td>Specifier string or NULL</td></tr>
392 </tbody></table></div>
393 <h4>Returns</h4>
394 <p>Attribute or NULL if not found</p>
395 <!-- NEW PAGE -->
396 <h3 class='title'><a name='ppdFindChoice'>ppdFindChoice()</a></h3>
397 <h4>Description</h4>
398 <p>Return a pointer to an option choice.</p>
399 <h4>Syntax</h4>
400 <pre>
401 <a href='#ppd_choice_t'>ppd_choice_t</a> *
402 ppdFindChoice(
403 <a href='#ppd_option_t'>ppd_option_t</a> * o,
404 const char * choice);
405 </pre>
406 <h4>Arguments</h4>
407 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
408 <thead><tr><th>Name</th><th>Description</th></tr></thead>
409 <tbody>
410 <tr><td><tt>o</tt></td><td>Pointer to option</td></tr>
411 <tr><td><tt>choice</tt></td><td>Name of choice</td></tr>
412 </tbody></table></div>
413 <h4>Returns</h4>
414 <p>Choice pointer or NULL</p>
415 <!-- NEW PAGE -->
416 <h3 class='title'><a name='ppdFindMarkedChoice'>ppdFindMarkedChoice()</a></h3>
417 <h4>Description</h4>
418 <p>Return the marked choice for the specified option.</p>
419 <h4>Syntax</h4>
420 <pre>
421 <a href='#ppd_choice_t'>ppd_choice_t</a> *
422 ppdFindMarkedChoice(
423 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
424 const char * option);
425 </pre>
426 <h4>Arguments</h4>
427 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
428 <thead><tr><th>Name</th><th>Description</th></tr></thead>
429 <tbody>
430 <tr><td><tt>ppd</tt></td><td>PPD file</td></tr>
431 <tr><td><tt>option</tt></td><td>Keyword/option name</td></tr>
432 </tbody></table></div>
433 <h4>Returns</h4>
434 <p>Pointer to choice or NULL</p>
435 <!-- NEW PAGE -->
436 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span><a name='ppdFindNextAttr'>ppdFindNextAttr()</a></h3>
437 <h4>Description</h4>
438 <p>Find the next matching attribute...
439
440 </p>
441 <h4>Syntax</h4>
442 <pre>
443 <a href='#ppd_attr_t'>ppd_attr_t</a> *
444 ppdFindNextAttr(
445 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
446 const char * name,
447 const char * spec);
448 </pre>
449 <h4>Arguments</h4>
450 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
451 <thead><tr><th>Name</th><th>Description</th></tr></thead>
452 <tbody>
453 <tr><td><tt>ppd</tt></td><td>PPD file data</td></tr>
454 <tr><td><tt>name</tt></td><td>Attribute name</td></tr>
455 <tr><td><tt>spec</tt></td><td>Specifier string or NULL</td></tr>
456 </tbody></table></div>
457 <h4>Returns</h4>
458 <p>Attribute or NULL if not found</p>
459 <!-- NEW PAGE -->
460 <h3 class='title'><a name='ppdFindOption'>ppdFindOption()</a></h3>
461 <h4>Description</h4>
462 <p>Return a pointer to the specified option.</p>
463 <h4>Syntax</h4>
464 <pre>
465 <a href='#ppd_option_t'>ppd_option_t</a> *
466 ppdFindOption(
467 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
468 const char * option);
469 </pre>
470 <h4>Arguments</h4>
471 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
472 <thead><tr><th>Name</th><th>Description</th></tr></thead>
473 <tbody>
474 <tr><td><tt>ppd</tt></td><td>PPD file data</td></tr>
475 <tr><td><tt>option</tt></td><td>Option/Keyword name</td></tr>
476 </tbody></table></div>
477 <h4>Returns</h4>
478 <p>Pointer to option or NULL</p>
479 <!-- NEW PAGE -->
480 <h3 class='title'><a name='ppdIsMarked'>ppdIsMarked()</a></h3>
481 <h4>Description</h4>
482 <p>Check to see if an option is marked...</p>
483 <h4>Syntax</h4>
484 <pre>
485 int
486 ppdIsMarked(
487 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
488 const char * option,
489 const char * choice);
490 </pre>
491 <h4>Arguments</h4>
492 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
493 <thead><tr><th>Name</th><th>Description</th></tr></thead>
494 <tbody>
495 <tr><td><tt>ppd</tt></td><td>PPD file data</td></tr>
496 <tr><td><tt>option</tt></td><td>Option/Keyword name</td></tr>
497 <tr><td><tt>choice</tt></td><td>Choice name</td></tr>
498 </tbody></table></div>
499 <h4>Returns</h4>
500 <p>Non-zero if option is marked</p>
501 <!-- NEW PAGE -->
502 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span><a name='ppdLastError'>ppdLastError()</a></h3>
503 <h4>Description</h4>
504 <p>Return the status from the last ppdOpen*().
505
506 </p>
507 <h4>Syntax</h4>
508 <pre>
509 ppd_status_t
510 ppdLastError(
511 int * line);
512 </pre>
513 <h4>Arguments</h4>
514 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
515 <thead><tr><th>Name</th><th>Description</th></tr></thead>
516 <tbody>
517 <tr><td><tt>line</tt></td><td>Line number</td></tr>
518 </tbody></table></div>
519 <h4>Returns</h4>
520 <p>Status code</p>
521 <!-- NEW PAGE -->
522 <h3 class='title'><a name='ppdMarkDefaults'>ppdMarkDefaults()</a></h3>
523 <h4>Description</h4>
524 <p>Mark all default options in the PPD file.</p>
525 <h4>Syntax</h4>
526 <pre>
527 void
528 ppdMarkDefaults(
529 <a href='#ppd_file_t'>ppd_file_t</a> * ppd);
530 </pre>
531 <h4>Arguments</h4>
532 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
533 <thead><tr><th>Name</th><th>Description</th></tr></thead>
534 <tbody>
535 <tr><td><tt>ppd</tt></td><td>PPD file record</td></tr>
536 </tbody></table></div>
537 <h4>Returns</h4>
538 <p>Nothing.</p>
539 <!-- NEW PAGE -->
540 <h3 class='title'><a name='ppdMarkOption'>ppdMarkOption()</a></h3>
541 <h4>Description</h4>
542 <p>Mark an option in a PPD file.
543
544 Notes:
545
546 -1 is returned if the given option would conflict with any currently
547 selected option.</p>
548 <h4>Syntax</h4>
549 <pre>
550 int
551 ppdMarkOption(
552 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
553 const char * option,
554 const char * choice);
555 </pre>
556 <h4>Arguments</h4>
557 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
558 <thead><tr><th>Name</th><th>Description</th></tr></thead>
559 <tbody>
560 <tr><td><tt>ppd</tt></td><td>PPD file record</td></tr>
561 <tr><td><tt>option</tt></td><td>Keyword</td></tr>
562 <tr><td><tt>choice</tt></td><td>Option name</td></tr>
563 </tbody></table></div>
564 <h4>Returns</h4>
565 <p>Number of conflicts</p>
566 <!-- NEW PAGE -->
567 <h3 class='title'><a name='ppdOpen'>ppdOpen()</a></h3>
568 <h4>Description</h4>
569 <p>Read a PPD file into memory.</p>
570 <h4>Syntax</h4>
571 <pre>
572 <a href='#ppd_file_t'>ppd_file_t</a> *
573 ppdOpen(
574 FILE * fp);
575 </pre>
576 <h4>Arguments</h4>
577 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
578 <thead><tr><th>Name</th><th>Description</th></tr></thead>
579 <tbody>
580 <tr><td><tt>fp</tt></td><td>File to read from</td></tr>
581 </tbody></table></div>
582 <h4>Returns</h4>
583 <p>PPD file record</p>
584 <!-- NEW PAGE -->
585 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppdOpen2'>ppdOpen2()</a></h3>
586 <h4>Description</h4>
587 <p>Read a PPD file into memory.
588
589 </p>
590 <h4>Syntax</h4>
591 <pre>
592 <a href='#ppd_file_t'>ppd_file_t</a> *
593 ppdOpen2(
594 cups_file_t * fp);
595 </pre>
596 <h4>Arguments</h4>
597 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
598 <thead><tr><th>Name</th><th>Description</th></tr></thead>
599 <tbody>
600 <tr><td><tt>fp</tt></td><td>File to read from</td></tr>
601 </tbody></table></div>
602 <h4>Returns</h4>
603 <p>PPD file record</p>
604 <!-- NEW PAGE -->
605 <h3 class='title'><a name='ppdOpenFd'>ppdOpenFd()</a></h3>
606 <h4>Description</h4>
607 <p>Read a PPD file into memory.</p>
608 <h4>Syntax</h4>
609 <pre>
610 <a href='#ppd_file_t'>ppd_file_t</a> *
611 ppdOpenFd(
612 int fd);
613 </pre>
614 <h4>Arguments</h4>
615 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
616 <thead><tr><th>Name</th><th>Description</th></tr></thead>
617 <tbody>
618 <tr><td><tt>fd</tt></td><td>File to read from</td></tr>
619 </tbody></table></div>
620 <h4>Returns</h4>
621 <p>PPD file record</p>
622 <!-- NEW PAGE -->
623 <h3 class='title'><a name='ppdOpenFile'>ppdOpenFile()</a></h3>
624 <h4>Description</h4>
625 <p>Read a PPD file into memory.</p>
626 <h4>Syntax</h4>
627 <pre>
628 <a href='#ppd_file_t'>ppd_file_t</a> *
629 ppdOpenFile(
630 const char * filename);
631 </pre>
632 <h4>Arguments</h4>
633 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
634 <thead><tr><th>Name</th><th>Description</th></tr></thead>
635 <tbody>
636 <tr><td><tt>filename</tt></td><td>File to read from</td></tr>
637 </tbody></table></div>
638 <h4>Returns</h4>
639 <p>PPD file record</p>
640 <!-- NEW PAGE -->
641 <h3 class='title'><a name='ppdPageLength'>ppdPageLength()</a></h3>
642 <h4>Description</h4>
643 <p>Get the page length for the given size.</p>
644 <h4>Syntax</h4>
645 <pre>
646 float
647 ppdPageLength(
648 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
649 const char * name);
650 </pre>
651 <h4>Arguments</h4>
652 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
653 <thead><tr><th>Name</th><th>Description</th></tr></thead>
654 <tbody>
655 <tr><td><tt>ppd</tt></td><td>PPD file</td></tr>
656 <tr><td><tt>name</tt></td><td>Size name</td></tr>
657 </tbody></table></div>
658 <h4>Returns</h4>
659 <p>Length of page in points or 0.0</p>
660 <!-- NEW PAGE -->
661 <h3 class='title'><a name='ppdPageSize'>ppdPageSize()</a></h3>
662 <h4>Description</h4>
663 <p>Get the page size record for the given size.</p>
664 <h4>Syntax</h4>
665 <pre>
666 <a href='#ppd_size_t'>ppd_size_t</a> *
667 ppdPageSize(
668 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
669 const char * name);
670 </pre>
671 <h4>Arguments</h4>
672 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
673 <thead><tr><th>Name</th><th>Description</th></tr></thead>
674 <tbody>
675 <tr><td><tt>ppd</tt></td><td>PPD file record</td></tr>
676 <tr><td><tt>name</tt></td><td>Size name</td></tr>
677 </tbody></table></div>
678 <h4>Returns</h4>
679 <p>Size record for page or NULL</p>
680 <!-- NEW PAGE -->
681 <h3 class='title'><a name='ppdPageWidth'>ppdPageWidth()</a></h3>
682 <h4>Description</h4>
683 <p>Get the page width for the given size.</p>
684 <h4>Syntax</h4>
685 <pre>
686 float
687 ppdPageWidth(
688 <a href='#ppd_file_t'>ppd_file_t</a> * ppd,
689 const char * name);
690 </pre>
691 <h4>Arguments</h4>
692 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
693 <thead><tr><th>Name</th><th>Description</th></tr></thead>
694 <tbody>
695 <tr><td><tt>ppd</tt></td><td>PPD file record</td></tr>
696 <tr><td><tt>name</tt></td><td>Size name</td></tr>
697 </tbody></table></div>
698 <h4>Returns</h4>
699 <p>Width of page in points or 0.0</p>
700 <!-- NEW PAGE -->
701 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.20&nbsp;</span><a name='ppdSetConformance'>ppdSetConformance()</a></h3>
702 <h4>Description</h4>
703 <p>Set the conformance level for PPD files.
704
705 </p>
706 <h4>Syntax</h4>
707 <pre>
708 void
709 ppdSetConformance(
710 <a href='#ppd_conform_t'>ppd_conform_t</a> c);
711 </pre>
712 <h4>Arguments</h4>
713 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
714 <thead><tr><th>Name</th><th>Description</th></tr></thead>
715 <tbody>
716 <tr><td><tt>c</tt></td><td>Conformance level</td></tr>
717 </tbody></table></div>
718 <h4>Returns</h4>
719 <p>Nothing.</p>
720 <!-- NEW PAGE -->
721 <h2 class='title'><a name='STRUCTURES'>Structures</a></h2>
722 <ul>
723 <li><a href='#ppd_attr_str'><tt>ppd_attr_str</tt></a> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></li>
724 <li><a href='#ppd_choice_str'><tt>ppd_choice_str</tt></a> </li>
725 <li><a href='#ppd_emul_str'><tt>ppd_emul_str</tt></a> </li>
726 <li><a href='#ppd_ext_option_str'><tt>ppd_ext_option_str</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
727 <li><a href='#ppd_ext_param_str'><tt>ppd_ext_param_str</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
728 <li><a href='#ppd_file_str'><tt>ppd_file_str</tt></a> </li>
729 <li><a href='#ppd_group_str'><tt>ppd_group_str</tt></a> </li>
730 <li><a href='#ppd_option_str'><tt>ppd_option_str</tt></a> </li>
731 <li><a href='#ppd_profile_str'><tt>ppd_profile_str</tt></a> </li>
732 <li><a href='#ppd_size_str'><tt>ppd_size_str</tt></a> </li>
733 </ul>
734 <!-- NEW PAGE -->
735 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span><a name='ppd_attr_str'>ppd_attr_str</a></h3>
736 <h4>Description</h4>
737 <p>PPD Attribute Structure </p>
738 <h4>Definition</h4>
739 <pre>
740 struct ppd_attr_str
741 {
742 char name[PPD_MAX_NAME];
743 char spec[PPD_MAX_NAME];
744 char text[PPD_MAX_TEXT];
745 char * value;
746 };
747 </pre>
748 <h4>Members</h4>
749 <div class='table'><table align='center' border='1' width='80%'>
750 <thead><tr><th>Name</th><th>Description</th></tr></thead>
751 <tbody>
752 <tr><td><tt>name[PPD_MAX_NAME]</tt> </td><td>Name of attribute (cupsXYZ)</td></tr>
753 <tr><td><tt>spec[PPD_MAX_NAME]</tt> </td><td>Specifier string, if any</td></tr>
754 <tr><td><tt>text[PPD_MAX_TEXT]</tt> </td><td>Human-readable text, if any</td></tr>
755 <tr><td><tt>value</tt> </td><td>Value string</td></tr>
756 </tbody></table></div>
757 <!-- NEW PAGE -->
758 <h3 class='title'><a name='ppd_choice_str'>ppd_choice_str</a></h3>
759 <h4>Description</h4>
760 <p>Option choices</p>
761 <h4>Definition</h4>
762 <pre>
763 struct ppd_choice_str
764 {
765 char choice[PPD_MAX_NAME];
766 char * code;
767 char marked;
768 <a href='#ppd_option_t'>ppd_option_t</a> * option;
769 char text[PPD_MAX_TEXT];
770 };
771 </pre>
772 <h4>Members</h4>
773 <div class='table'><table align='center' border='1' width='80%'>
774 <thead><tr><th>Name</th><th>Description</th></tr></thead>
775 <tbody>
776 <tr><td><tt>choice[PPD_MAX_NAME]</tt> </td><td>Computer-readable option name</td></tr>
777 <tr><td><tt>code</tt> </td><td>Code to send for this option</td></tr>
778 <tr><td><tt>marked</tt> </td><td>0 if not selected, 1 otherwise</td></tr>
779 <tr><td><tt>option</tt> </td><td>Pointer to parent option structure</td></tr>
780 <tr><td><tt>text[PPD_MAX_TEXT]</tt> </td><td>Human-readable option name</td></tr>
781 </tbody></table></div>
782 <!-- NEW PAGE -->
783 <h3 class='title'><a name='ppd_emul_str'>ppd_emul_str</a></h3>
784 <h4>Description</h4>
785 <p>Emulators</p>
786 <h4>Definition</h4>
787 <pre>
788 struct ppd_emul_str
789 {
790 char name[PPD_MAX_NAME];
791 char * start;
792 char * stop;
793 };
794 </pre>
795 <h4>Members</h4>
796 <div class='table'><table align='center' border='1' width='80%'>
797 <thead><tr><th>Name</th><th>Description</th></tr></thead>
798 <tbody>
799 <tr><td><tt>name[PPD_MAX_NAME]</tt> </td><td>Emulator name</td></tr>
800 <tr><td><tt>start</tt> </td><td>Code to switch to this emulation</td></tr>
801 <tr><td><tt>stop</tt> </td><td>Code to stop this emulation</td></tr>
802 </tbody></table></div>
803 <!-- NEW PAGE -->
804 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppd_ext_option_str'>ppd_ext_option_str</a></h3>
805 <h4>Description</h4>
806 <p>Extended Options </p>
807 <h4>Definition</h4>
808 <pre>
809 struct ppd_ext_option_str
810 {
811 char * code;
812 char keyword[PPD_MAX_NAME];
813 int marked;
814 int num_params;
815 <a href='#ppd_option_t'>ppd_option_t</a> * option;
816 <a href='#ppd_ext_param_t'>ppd_ext_param_t</a> ** params;
817 };
818 </pre>
819 <h4>Members</h4>
820 <div class='table'><table align='center' border='1' width='80%'>
821 <thead><tr><th>Name</th><th>Description</th></tr></thead>
822 <tbody>
823 <tr><td><tt>code</tt> </td><td>Generic PS code for extended options</td></tr>
824 <tr><td><tt>keyword[PPD_MAX_NAME]</tt> </td><td>Name of option that is being extended...</td></tr>
825 <tr><td><tt>marked</tt> </td><td>Extended option is marked</td></tr>
826 <tr><td><tt>num_params</tt> </td><td>Number of parameters</td></tr>
827 <tr><td><tt>option</tt> </td><td>Option that is being extended...</td></tr>
828 <tr><td><tt>params</tt> </td><td>Parameters</td></tr>
829 </tbody></table></div>
830 <!-- NEW PAGE -->
831 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppd_ext_param_str'>ppd_ext_param_str</a></h3>
832 <h4>Description</h4>
833 <p>Extended Parameter </p>
834 <h4>Definition</h4>
835 <pre>
836 struct ppd_ext_param_str
837 {
838 <a href='#ppd_ext_value_t'>ppd_ext_value_t</a> * defval;
839 char keyword[PPD_MAX_NAME];
840 <a href='#ppd_ext_value_t'>ppd_ext_value_t</a> * maxval;
841 <a href='#ppd_ext_value_t'>ppd_ext_value_t</a> * minval;
842 char text[PPD_MAX_TEXT];
843 <a href='#ppd_ext_value_t'>ppd_ext_value_t</a> * value;
844 };
845 </pre>
846 <h4>Members</h4>
847 <div class='table'><table align='center' border='1' width='80%'>
848 <thead><tr><th>Name</th><th>Description</th></tr></thead>
849 <tbody>
850 <tr><td><tt>defval</tt> </td><td>Default values</td></tr>
851 <tr><td><tt>keyword[PPD_MAX_NAME]</tt> </td><td>Parameter name</td></tr>
852 <tr><td><tt>maxval</tt> </td><td>Maximum numeric values</td></tr>
853 <tr><td><tt>minval</tt> </td><td>Minimum numeric values</td></tr>
854 <tr><td><tt>text[PPD_MAX_TEXT]</tt> </td><td>Human-readable text</td></tr>
855 <tr><td><tt>value</tt> </td><td>Current values</td></tr>
856 </tbody></table></div>
857 <!-- NEW PAGE -->
858 <h3 class='title'><a name='ppd_file_str'>ppd_file_str</a></h3>
859 <h4>Description</h4>
860 <p>Files</p>
861 <h4>Definition</h4>
862 <pre>
863 struct ppd_file_str
864 {
865 int accurate_screens;
866 <a href='#ppd_attr_t'>ppd_attr_t</a> ** attrs;
867 int color_device;
868 ppd_cs_t colorspace;
869 <a href='#ppd_const_t'>ppd_const_t</a> * consts;
870 int contone_only;
871 int cur_attr;
872 float custom_margins[4];
873 float custom_max[2];
874 float custom_min[2];
875 <a href='#ppd_emul_t'>ppd_emul_t</a> * emulations;
876 <a href='#ppd_ext_option_t'>ppd_ext_option_t</a> ** extended;
877 char ** filters;
878 int flip_duplex;
879 char ** fonts;
880 <a href='#ppd_group_t'>ppd_group_t</a> * groups;
881 char * jcl_begin;
882 char * jcl_end;
883 char * jcl_ps;
884 int landscape;
885 char * lang_encoding;
886 char * lang_version;
887 int language_level;
888 int manual_copies;
889 char * manufacturer;
890 int model_number;
891 char * modelname;
892 char * nickname;
893 int num_attrs;
894 int num_consts;
895 int num_emulations;
896 int num_extended;
897 int num_filters;
898 int num_fonts;
899 int num_groups;
900 int num_profiles;
901 int num_sizes;
902 char * patches;
903 char * pcfilename;
904 char * product;
905 <a href='#ppd_profile_t'>ppd_profile_t</a> * profiles;
906 char * protocols;
907 char * shortnickname;
908 <a href='#ppd_size_t'>ppd_size_t</a> * sizes;
909 int throughput;
910 char * ttrasterizer;
911 int variable_sizes;
912 };
913 </pre>
914 <h4>Members</h4>
915 <div class='table'><table align='center' border='1' width='80%'>
916 <thead><tr><th>Name</th><th>Description</th></tr></thead>
917 <tbody>
918 <tr><td><tt>accurate_screens</tt> </td><td>1 = supports accurate screens, 0 = not</td></tr>
919 <tr><td><tt>attrs</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>Attributes </td></tr>
920 <tr><td><tt>color_device</tt> </td><td>1 = color device, 0 = grayscale</td></tr>
921 <tr><td><tt>colorspace</tt> </td><td>Default colorspace</td></tr>
922 <tr><td><tt>consts</tt> </td><td>UI/Non-UI constraints</td></tr>
923 <tr><td><tt>contone_only</tt> </td><td>1 = continuous tone only, 0 = not</td></tr>
924 <tr><td><tt>cur_attr</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>Current attribute </td></tr>
925 <tr><td><tt>custom_margins[4]</tt> </td><td>Margins around page</td></tr>
926 <tr><td><tt>custom_max[2]</tt> </td><td>Maximum variable page size</td></tr>
927 <tr><td><tt>custom_min[2]</tt> </td><td>Minimum variable page size</td></tr>
928 <tr><td><tt>emulations</tt> </td><td>Emulations and the code to invoke them</td></tr>
929 <tr><td><tt>extended</tt> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></td><td>Extended options </td></tr>
930 <tr><td><tt>filters</tt> </td><td>Filter strings...</td></tr>
931 <tr><td><tt>flip_duplex</tt> <span class='info'>&nbsp;CUPS 1.1&nbsp;</span></td><td>1 = Flip page for back sides </td></tr>
932 <tr><td><tt>fonts</tt> </td><td>Pre-loaded fonts</td></tr>
933 <tr><td><tt>groups</tt> </td><td>UI groups</td></tr>
934 <tr><td><tt>jcl_begin</tt> </td><td>Start JCL commands</td></tr>
935 <tr><td><tt>jcl_end</tt> </td><td>End JCL commands</td></tr>
936 <tr><td><tt>jcl_ps</tt> </td><td>Enter PostScript interpreter</td></tr>
937 <tr><td><tt>landscape</tt> </td><td>-90 or 90</td></tr>
938 <tr><td><tt>lang_encoding</tt> </td><td>Language encoding</td></tr>
939 <tr><td><tt>lang_version</tt> </td><td>Language version (English, Spanish, etc.)</td></tr>
940 <tr><td><tt>language_level</tt> </td><td>Language level of device</td></tr>
941 <tr><td><tt>manual_copies</tt> </td><td>1 = Copies done manually, 0 = hardware</td></tr>
942 <tr><td><tt>manufacturer</tt> </td><td>Manufacturer name</td></tr>
943 <tr><td><tt>model_number</tt> </td><td>Device-specific model number</td></tr>
944 <tr><td><tt>modelname</tt> </td><td>Model name (general)</td></tr>
945 <tr><td><tt>nickname</tt> </td><td>Nickname (specific)</td></tr>
946 <tr><td><tt>num_attrs</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>Number of attributes </td></tr>
947 <tr><td><tt>num_consts</tt> </td><td>Number of UI/Non-UI constraints</td></tr>
948 <tr><td><tt>num_emulations</tt> </td><td>Number of emulations supported</td></tr>
949 <tr><td><tt>num_extended</tt> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></td><td>Number of extended options </td></tr>
950 <tr><td><tt>num_filters</tt> </td><td>Number of filters</td></tr>
951 <tr><td><tt>num_fonts</tt> </td><td>Number of pre-loaded fonts</td></tr>
952 <tr><td><tt>num_groups</tt> </td><td>Number of UI groups</td></tr>
953 <tr><td><tt>num_profiles</tt> </td><td>Number of sRGB color profiles</td></tr>
954 <tr><td><tt>num_sizes</tt> </td><td>Number of page sizes</td></tr>
955 <tr><td><tt>patches</tt> </td><td>Patch commands to be sent to printer</td></tr>
956 <tr><td><tt>pcfilename</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>PCFileName string </td></tr>
957 <tr><td><tt>product</tt> </td><td>Product name (from PS RIP/interpreter)</td></tr>
958 <tr><td><tt>profiles</tt> </td><td>sRGB color profiles</td></tr>
959 <tr><td><tt>protocols</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>Protocols (BCP, TBCP) string </td></tr>
960 <tr><td><tt>shortnickname</tt> </td><td>Short version of nickname</td></tr>
961 <tr><td><tt>sizes</tt> </td><td>Page sizes</td></tr>
962 <tr><td><tt>throughput</tt> </td><td>Pages per minute</td></tr>
963 <tr><td><tt>ttrasterizer</tt> </td><td>Truetype rasterizer</td></tr>
964 <tr><td><tt>variable_sizes</tt> </td><td>1 = supports variable sizes, 0 = doesn't</td></tr>
965 </tbody></table></div>
966 <!-- NEW PAGE -->
967 <h3 class='title'><a name='ppd_group_str'>ppd_group_str</a></h3>
968 <h4>Description</h4>
969 <p>Groups</p>
970 <h4>Definition</h4>
971 <pre>
972 struct ppd_group_str
973 {
974 char text[PPD_MAX_TEXT - PPD_MAX_NAME];
975 char name[PPD_MAX_NAME];
976 int num_options;
977 int num_subgroups;
978 <a href='#ppd_option_t'>ppd_option_t</a> * options;
979 struct <a href='#ppd_group_str'>ppd_group_str</a> * subgroups;
980 };
981 </pre>
982 <h4>Members</h4>
983 <div class='table'><table align='center' border='1' width='80%'>
984 <thead><tr><th>Name</th><th>Description</th></tr></thead>
985 <tbody>
986 <tr><td><tt>PPD_MAX_NAME]</tt> </td><td>Human-readable group name</td></tr>
987 <tr><td><tt>name[PPD_MAX_NAME]</tt> <span class='info'>&nbsp;CUPS 1.1.18&nbsp;</span></td><td>Group name </td></tr>
988 <tr><td><tt>num_options</tt> </td><td>Number of options</td></tr>
989 <tr><td><tt>num_subgroups</tt> </td><td>Number of sub-groups</td></tr>
990 <tr><td><tt>options</tt> </td><td>Options</td></tr>
991 <tr><td><tt>subgroups</tt> </td><td>Sub-groups (max depth = 1)</td></tr>
992 </tbody></table></div>
993 <!-- NEW PAGE -->
994 <h3 class='title'><a name='ppd_option_str'>ppd_option_str</a></h3>
995 <h4>Description</h4>
996 <p>Options</p>
997 <h4>Definition</h4>
998 <pre>
999 struct ppd_option_str
1000 {
1001 <a href='#ppd_choice_t'>ppd_choice_t</a> * choices;
1002 char conflicted;
1003 char defchoice[PPD_MAX_NAME];
1004 char keyword[PPD_MAX_NAME];
1005 int num_choices;
1006 float order;
1007 <a href='#ppd_section_t'>ppd_section_t</a> section;
1008 char text[PPD_MAX_TEXT];
1009 <a href='#ppd_ui_t'>ppd_ui_t</a> ui;
1010 };
1011 </pre>
1012 <h4>Members</h4>
1013 <div class='table'><table align='center' border='1' width='80%'>
1014 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1015 <tbody>
1016 <tr><td><tt>choices</tt> </td><td>Option choices</td></tr>
1017 <tr><td><tt>conflicted</tt> </td><td>0 if no conflicts exist, 1 otherwise</td></tr>
1018 <tr><td><tt>defchoice[PPD_MAX_NAME]</tt> </td><td>Default option choice</td></tr>
1019 <tr><td><tt>keyword[PPD_MAX_NAME]</tt> </td><td>Option keyword name (&quot;PageSize&quot;, etc.)</td></tr>
1020 <tr><td><tt>num_choices</tt> </td><td>Number of option choices</td></tr>
1021 <tr><td><tt>order</tt> </td><td>Order number</td></tr>
1022 <tr><td><tt>section</tt> </td><td>Section for command</td></tr>
1023 <tr><td><tt>text[PPD_MAX_TEXT]</tt> </td><td>Human-readable text</td></tr>
1024 <tr><td><tt>ui</tt> </td><td>Type of UI option</td></tr>
1025 </tbody></table></div>
1026 <!-- NEW PAGE -->
1027 <h3 class='title'><a name='ppd_profile_str'>ppd_profile_str</a></h3>
1028 <h4>Description</h4>
1029 <p>sRGB Color Profiles</p>
1030 <h4>Definition</h4>
1031 <pre>
1032 struct ppd_profile_str
1033 {
1034 float density;
1035 float gamma;
1036 float matrix[3][3];
1037 char media_type[PPD_MAX_NAME];
1038 char resolution[PPD_MAX_NAME];
1039 };
1040 </pre>
1041 <h4>Members</h4>
1042 <div class='table'><table align='center' border='1' width='80%'>
1043 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1044 <tbody>
1045 <tr><td><tt>density</tt> </td><td>Ink density to use</td></tr>
1046 <tr><td><tt>gamma</tt> </td><td>Gamma correction to use</td></tr>
1047 <tr><td><tt>matrix[3][3]</tt> </td><td>Transform matrix</td></tr>
1048 <tr><td><tt>media_type[PPD_MAX_NAME]</tt> </td><td>Media type or &quot;-&quot;</td></tr>
1049 <tr><td><tt>resolution[PPD_MAX_NAME]</tt> </td><td>Resolution or &quot;-&quot;</td></tr>
1050 </tbody></table></div>
1051 <!-- NEW PAGE -->
1052 <h3 class='title'><a name='ppd_size_str'>ppd_size_str</a></h3>
1053 <h4>Description</h4>
1054 <p>Page Sizes</p>
1055 <h4>Definition</h4>
1056 <pre>
1057 struct ppd_size_str
1058 {
1059 float bottom;
1060 float left;
1061 float length;
1062 int marked;
1063 char name[PPD_MAX_NAME];
1064 float right;
1065 float top;
1066 float width;
1067 };
1068 </pre>
1069 <h4>Members</h4>
1070 <div class='table'><table align='center' border='1' width='80%'>
1071 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1072 <tbody>
1073 <tr><td><tt>bottom</tt> </td><td>Bottom printable margin in points</td></tr>
1074 <tr><td><tt>left</tt> </td><td>Left printable margin in points</td></tr>
1075 <tr><td><tt>length</tt> </td><td>Length of media in points</td></tr>
1076 <tr><td><tt>marked</tt> </td><td>Page size selected?</td></tr>
1077 <tr><td><tt>name[PPD_MAX_NAME]</tt> </td><td>Media size option</td></tr>
1078 <tr><td><tt>right</tt> </td><td>Right printable margin in points</td></tr>
1079 <tr><td><tt>top</tt> </td><td>Top printable margin in points</td></tr>
1080 <tr><td><tt>width</tt> </td><td>Width of media in points</td></tr>
1081 </tbody></table></div>
1082 <!-- NEW PAGE -->
1083 <h2 class='title'><a name='TYPES'>Types</a></h2>
1084 <ul>
1085 <li><a href='#ppd_attr_t'><tt>ppd_attr_t</tt></a> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></li>
1086 <li><a href='#ppd_choice_t'><tt>ppd_choice_t</tt></a> </li>
1087 <li><a href='#ppd_const_t'><tt>ppd_const_t</tt></a> </li>
1088 <li><a href='#ppd_emul_t'><tt>ppd_emul_t</tt></a> </li>
1089 <li><a href='#ppd_ext_option_t'><tt>ppd_ext_option_t</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
1090 <li><a href='#ppd_ext_param_t'><tt>ppd_ext_param_t</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
1091 <li><a href='#ppd_ext_ui_t'><tt>ppd_ext_ui_t</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
1092 <li><a href='#ppd_ext_value_t'><tt>ppd_ext_value_t</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
1093 <li><a href='#ppd_file_t'><tt>ppd_file_t</tt></a> </li>
1094 <li><a href='#ppd_group_t'><tt>ppd_group_t</tt></a> </li>
1095 <li><a href='#ppd_option_t'><tt>ppd_option_t</tt></a> </li>
1096 <li><a href='#ppd_profile_t'><tt>ppd_profile_t</tt></a> </li>
1097 <li><a href='#ppd_section_t'><tt>ppd_section_t</tt></a> </li>
1098 <li><a href='#ppd_size_t'><tt>ppd_size_t</tt></a> </li>
1099 <li><a href='#ppd_ui_t'><tt>ppd_ui_t</tt></a> </li>
1100 </ul>
1101 <!-- NEW PAGE -->
1102 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span><a name='ppd_attr_t'>ppd_attr_t</a></h3>
1103 <h4>Description</h4>
1104 <p>PPD Attribute Structure </p>
1105 <h4>Definition</h4>
1106 <pre>
1107 typedef struct <a href='#ppd_attr_str'>ppd_attr_str</a> ppd_attr_t;
1108 </pre>
1109 <!-- NEW PAGE -->
1110 <h3 class='title'><a name='ppd_choice_t'>ppd_choice_t</a></h3>
1111 <h4>Description</h4>
1112 <p>Option choices</p>
1113 <h4>Definition</h4>
1114 <pre>
1115 typedef struct <a href='#ppd_choice_str'>ppd_choice_str</a> ppd_choice_t;
1116 </pre>
1117 <!-- NEW PAGE -->
1118 <h3 class='title'><a name='ppd_const_t'>ppd_const_t</a></h3>
1119 <h4>Description</h4>
1120 <p>Constraints</p>
1121 <h4>Definition</h4>
1122 <pre>
1123 typedef struct ppd_const_t;
1124 </pre>
1125 <!-- NEW PAGE -->
1126 <h3 class='title'><a name='ppd_emul_t'>ppd_emul_t</a></h3>
1127 <h4>Description</h4>
1128 <p>Emulators</p>
1129 <h4>Definition</h4>
1130 <pre>
1131 typedef struct <a href='#ppd_emul_str'>ppd_emul_str</a> ppd_emul_t;
1132 </pre>
1133 <!-- NEW PAGE -->
1134 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppd_ext_option_t'>ppd_ext_option_t</a></h3>
1135 <h4>Description</h4>
1136 <p>Extended Options </p>
1137 <h4>Definition</h4>
1138 <pre>
1139 typedef struct <a href='#ppd_ext_option_str'>ppd_ext_option_str</a> ppd_ext_option_t;
1140 </pre>
1141 <!-- NEW PAGE -->
1142 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppd_ext_param_t'>ppd_ext_param_t</a></h3>
1143 <h4>Description</h4>
1144 <p>Extended Parameter </p>
1145 <h4>Definition</h4>
1146 <pre>
1147 typedef struct <a href='#ppd_ext_param_str'>ppd_ext_param_str</a> ppd_ext_param_t;
1148 </pre>
1149 <!-- NEW PAGE -->
1150 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppd_ext_ui_t'>ppd_ext_ui_t</a></h3>
1151 <h4>Description</h4>
1152 <p>Extended UI Types </p>
1153 <h4>Definition</h4>
1154 <pre>
1155 typedef enum <a href='#ppd_ext_ui_e'>ppd_ext_ui_e</a> ppd_ext_ui_t;
1156 </pre>
1157 <!-- NEW PAGE -->
1158 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppd_ext_value_t'>ppd_ext_value_t</a></h3>
1159 <h4>Description</h4>
1160 <p>Extended Values </p>
1161 <h4>Definition</h4>
1162 <pre>
1163 typedef union <a href='#ppd_ext_value_u'>ppd_ext_value_u</a> ppd_ext_value_t;
1164 </pre>
1165 <!-- NEW PAGE -->
1166 <h3 class='title'><a name='ppd_file_t'>ppd_file_t</a></h3>
1167 <h4>Description</h4>
1168 <p>Files</p>
1169 <h4>Definition</h4>
1170 <pre>
1171 typedef struct <a href='#ppd_file_str'>ppd_file_str</a> ppd_file_t;
1172 </pre>
1173 <!-- NEW PAGE -->
1174 <h3 class='title'><a name='ppd_group_t'>ppd_group_t</a></h3>
1175 <h4>Description</h4>
1176 <p>Groups</p>
1177 <h4>Definition</h4>
1178 <pre>
1179 typedef struct <a href='#ppd_group_str'>ppd_group_str</a> ppd_group_t;
1180 </pre>
1181 <!-- NEW PAGE -->
1182 <h3 class='title'><a name='ppd_option_t'>ppd_option_t</a></h3>
1183 <h4>Description</h4>
1184 <p>Options</p>
1185 <h4>Definition</h4>
1186 <pre>
1187 typedef struct <a href='#ppd_option_str'>ppd_option_str</a> ppd_option_t;
1188 </pre>
1189 <!-- NEW PAGE -->
1190 <h3 class='title'><a name='ppd_profile_t'>ppd_profile_t</a></h3>
1191 <h4>Description</h4>
1192 <p>sRGB Color Profiles</p>
1193 <h4>Definition</h4>
1194 <pre>
1195 typedef struct <a href='#ppd_profile_str'>ppd_profile_str</a> ppd_profile_t;
1196 </pre>
1197 <!-- NEW PAGE -->
1198 <h3 class='title'><a name='ppd_section_t'>ppd_section_t</a></h3>
1199 <h4>Description</h4>
1200 <p>Order dependency sections</p>
1201 <h4>Definition</h4>
1202 <pre>
1203 typedef enum <a href='#ppd_section_e'>ppd_section_e</a> ppd_section_t;
1204 </pre>
1205 <!-- NEW PAGE -->
1206 <h3 class='title'><a name='ppd_size_t'>ppd_size_t</a></h3>
1207 <h4>Description</h4>
1208 <p>Page Sizes</p>
1209 <h4>Definition</h4>
1210 <pre>
1211 typedef struct <a href='#ppd_size_str'>ppd_size_str</a> ppd_size_t;
1212 </pre>
1213 <!-- NEW PAGE -->
1214 <h3 class='title'><a name='ppd_ui_t'>ppd_ui_t</a></h3>
1215 <h4>Description</h4>
1216 <p>UI Types</p>
1217 <h4>Definition</h4>
1218 <pre>
1219 typedef enum <a href='#ppd_ui_e'>ppd_ui_e</a> ppd_ui_t;
1220 </pre>
1221 <!-- NEW PAGE -->
1222 <h2 class='title'><a name='UNIONS'>Unions</a></h2>
1223 <ul>
1224 <li><a href='#ppd_ext_value_u'><tt>ppd_ext_value_u</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
1225 </ul>
1226 <!-- NEW PAGE -->
1227 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppd_ext_value_u'>ppd_ext_value_u</a></h3>
1228 <h4>Description</h4>
1229 <p>Extended Values </p>
1230 <h4>Definition</h4>
1231 <pre>
1232 union ppd_ext_value_u
1233 {
1234 float gamma;
1235 int integer;
1236 float real;
1237 char * text;
1238 };
1239 </pre>
1240 <h4>Members</h4>
1241 <div class='table'><table align='center' border='1' width='80%'>
1242 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1243 <tbody>
1244 <tr><td><tt>gamma</tt> </td><td>Gamma value</td></tr>
1245 <tr><td><tt>integer</tt> </td><td>Integer value</td></tr>
1246 <tr><td><tt>real</tt> </td><td>Real value</td></tr>
1247 <tr><td><tt>text</tt> </td><td>Text value</td></tr>
1248 </tbody></table></div>
1249 </body>
1250 </html>