1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
3 <!-- SECTION: Programming -->
6 <meta name=
"keywords" content=
"Programming">
7 <meta name=
"creator" content=
"Mini-XML v2.5">
8 <style type=
"text/css"><!--
10 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
13 H1, H2, H3, H4, H5, H6, P, TD, TH {
14 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
18 font-family: monaco, courier, monospace;
23 font-family: monaco, courier, monospace;
32 border: dotted thin #999999;
37 PRE.command EM, PRE.example EM {
38 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
42 font-family: monaco, courier, monospace;
53 border: solid thin #999999;
59 text-decoration: none;
62 A:link:hover, A:visited:hover, A:active {
63 text-decoration: underline;
71 border: solid thin #999999;
72 border-collapse: collapse;
88 border: solid thin #cccccc;
95 border-bottom: solid thin #999999;
104 caption-side: bottom;
124 border: thin solid #000000;
132 H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
138 border-bottom: solid 2pt #000000;
156 font-family: monaco, courier, monospace;
165 border: solid thin #999999;
166 border-collapse: collapse;
171 DIV.summary TABLE TD, DIV.summary TABLE TH {
172 border: solid thin #999999;
178 DIV.summary TABLE THEAD TH {
182 /* API documentation styles... */
189 div.body h3, div.body h4, div.body h5 {
190 margin-bottom: 0.5em;
193 .class, .enumeration, .function, .struct, .typedef, .union {
194 border-bottom: solid thin #999999;
201 code, p.code, pre, ul.code li {
202 font-family: monaco, courier, monospace;
205 ul.code, ul.contents, ul.subcontents {
206 list-style-type: none;
216 ul.contents li ul.code, ul.contents li ul.subcontents {
229 margin-bottom: 0.5em;
232 /* This is just for the HTML files generated with the framedhelp target */
235 border: solid thin black;
244 div.contents ul.contents {
247 div.contents ul.subcontents li {
256 "$Id: api-ppd.header 7616 2008-05-28 00:34:13Z mike $"
258 PPD API header for the Common UNIX Printing System (CUPS).
260 Copyright 2008 by Apple Inc.
262 These coded instructions, statements, and computer programs are the
263 property of Apple Inc. and are protected by Federal copyright
264 law. Distribution and use rights are outlined in the file "LICENSE.txt"
265 which should have been included with this file. If this file is
266 file is missing or damaged, see the license at "http://www.cups.org/".
269 <h1 class=
"title">PPD API
</h1>
271 <div class='summary'
><table summary='General Information'
>
285 <td>Programming:
<a href='api-overview.html' target='_top'
>Introduction to CUPS Programming
</a><br>
286 Programming:
<a href='api-cups.html' target='_top'
>CUPS API
</a><br>
287 Specifications:
<a href='spec-ppd.html' target='_top'
>CUPS PPD Extensions
</a></td>
291 <h2 class=
"title">Contents
</h2>
292 <ul class=
"contents">
294 <li><a href=
"#OVERVIEW">Overview
</a><ul class=
"subcontents">
295 <li><a href=
"#LOADING">Loading a PPD File
</a></li>
296 <li><a href=
"#OPTIONS_AND_GROUPS">Options and Groups
</a></li>
297 <li><a href=
"#CONSTRAINTS">Constraints
</a></li>
298 <li><a href=
"#PAGE_SIZES">Page Sizes
</a></li>
299 <li><a href=
"#ATTRIBUTES">Attributes
</a></li>
301 <li><a href=
"#FUNCTIONS">Functions
</a><ul class=
"code">
302 <li><a href=
"#cupsMarkOptions" title=
"Mark command-line options in a PPD file.">cupsMarkOptions
</a></li>
303 <li><a href=
"#ppdClose" title=
"Free all memory used by the PPD file.">ppdClose
</a></li>
304 <li><a href=
"#ppdCollect" title=
"Collect all marked options that reside in the specified
305 section.">ppdCollect
</a></li>
306 <li><a href=
"#ppdCollect2" title=
"Collect all marked options that reside in the
307 specified section and minimum order.">ppdCollect2
</a></li>
308 <li><a href=
"#ppdConflicts" title=
"Check to see if there are any conflicts among the
309 marked option choices.">ppdConflicts
</a></li>
310 <li><a href=
"#ppdEmit" title=
"Emit code for marked options to a file.">ppdEmit
</a></li>
311 <li><a href=
"#ppdEmitAfterOrder" title=
"Emit a subset of the code for marked options to a file.">ppdEmitAfterOrder
</a></li>
312 <li><a href=
"#ppdEmitFd" title=
"Emit code for marked options to a file.">ppdEmitFd
</a></li>
313 <li><a href=
"#ppdEmitJCL" title=
"Emit code for JCL options to a file.">ppdEmitJCL
</a></li>
314 <li><a href=
"#ppdEmitJCLEnd" title=
"Emit JCLEnd code to a file.">ppdEmitJCLEnd
</a></li>
315 <li><a href=
"#ppdEmitString" title=
"Get a string containing the code for marked options.">ppdEmitString
</a></li>
316 <li><a href=
"#ppdErrorString" title=
"Returns the text assocated with a status.">ppdErrorString
</a></li>
317 <li><a href=
"#ppdFindAttr" title=
"Find the first matching attribute.">ppdFindAttr
</a></li>
318 <li><a href=
"#ppdFindChoice" title=
"Return a pointer to an option choice.">ppdFindChoice
</a></li>
319 <li><a href=
"#ppdFindCustomOption" title=
"Find a custom option.">ppdFindCustomOption
</a></li>
320 <li><a href=
"#ppdFindCustomParam" title=
"Find a parameter for a custom option.">ppdFindCustomParam
</a></li>
321 <li><a href=
"#ppdFindMarkedChoice" title=
"Return the marked choice for the specified option.">ppdFindMarkedChoice
</a></li>
322 <li><a href=
"#ppdFindNextAttr" title=
"Find the next matching attribute.">ppdFindNextAttr
</a></li>
323 <li><a href=
"#ppdFindOption" title=
"Return a pointer to the specified option.">ppdFindOption
</a></li>
324 <li><a href=
"#ppdFirstCustomParam" title=
"Return the first parameter for a custom option.">ppdFirstCustomParam
</a></li>
325 <li><a href=
"#ppdFirstOption" title=
"Return the first option in the PPD file.">ppdFirstOption
</a></li>
326 <li><a href=
"#ppdIsMarked" title=
"Check to see if an option is marked.">ppdIsMarked
</a></li>
327 <li><a href=
"#ppdLastError" title=
"Return the status from the last ppdOpen*().">ppdLastError
</a></li>
328 <li><a href=
"#ppdLocalize" title=
"Localize the PPD file to the current locale.">ppdLocalize
</a></li>
329 <li><a href=
"#ppdLocalizeAttr" title=
"Localize an attribute.">ppdLocalizeAttr
</a></li>
330 <li><a href=
"#ppdLocalizeIPPReason" title=
"Get the localized version of a cupsIPPReason
331 attribute.">ppdLocalizeIPPReason
</a></li>
332 <li><a href=
"#ppdLocalizeMarkerName" title=
"Get the localized version of a marker-names
333 attribute value.">ppdLocalizeMarkerName
</a></li>
334 <li><a href=
"#ppdMarkDefaults" title=
"Mark all default options in the PPD file.">ppdMarkDefaults
</a></li>
335 <li><a href=
"#ppdMarkOption" title=
"Mark an option in a PPD file.">ppdMarkOption
</a></li>
336 <li><a href=
"#ppdNextCustomParam" title=
"Return the next parameter for a custom option.">ppdNextCustomParam
</a></li>
337 <li><a href=
"#ppdNextOption" title=
"Return the next option in the PPD file.">ppdNextOption
</a></li>
338 <li><a href=
"#ppdOpen" title=
"Read a PPD file into memory.">ppdOpen
</a></li>
339 <li><a href=
"#ppdOpen2" title=
"Read a PPD file into memory.">ppdOpen2
</a></li>
340 <li><a href=
"#ppdOpenFd" title=
"Read a PPD file into memory.">ppdOpenFd
</a></li>
341 <li><a href=
"#ppdOpenFile" title=
"Read a PPD file into memory.">ppdOpenFile
</a></li>
342 <li><a href=
"#ppdPageLength" title=
"Get the page length for the given size.">ppdPageLength
</a></li>
343 <li><a href=
"#ppdPageSize" title=
"Get the page size record for the given size.">ppdPageSize
</a></li>
344 <li><a href=
"#ppdPageWidth" title=
"Get the page width for the given size.">ppdPageWidth
</a></li>
345 <li><a href=
"#ppdSetConformance" title=
"Set the conformance level for PPD files.">ppdSetConformance
</a></li>
347 <li><a href=
"#TYPES">Data Types
</a><ul class=
"code">
348 <li><a href=
"#ppd_attr_t" title=
"PPD Attribute Structure ">ppd_attr_t
</a></li>
349 <li><a href=
"#ppd_choice_t" title=
"Option choices">ppd_choice_t
</a></li>
350 <li><a href=
"#ppd_conform_t" title=
"Conformance Levels ">ppd_conform_t
</a></li>
351 <li><a href=
"#ppd_const_t" title=
"Constraints">ppd_const_t
</a></li>
352 <li><a href=
"#ppd_coption_t" title=
"Custom Option ">ppd_coption_t
</a></li>
353 <li><a href=
"#ppd_cparam_t" title=
"Custom Parameter ">ppd_cparam_t
</a></li>
354 <li><a href=
"#ppd_cplimit_t" title=
"Custom Parameter Limit ">ppd_cplimit_t
</a></li>
355 <li><a href=
"#ppd_cptype_t" title=
"Custom Parameter Type ">ppd_cptype_t
</a></li>
356 <li><a href=
"#ppd_cpvalue_t" title=
"Custom Parameter Value ">ppd_cpvalue_t
</a></li>
357 <li><a href=
"#ppd_cs_t" title=
"Colorspaces">ppd_cs_t
</a></li>
358 <li><a href=
"#ppd_emul_t" title=
"Emulators">ppd_emul_t
</a></li>
359 <li><a href=
"#ppd_file_t" title=
"PPD File">ppd_file_t
</a></li>
360 <li><a href=
"#ppd_group_t" title=
"Groups">ppd_group_t
</a></li>
361 <li><a href=
"#ppd_option_t" title=
"Options">ppd_option_t
</a></li>
362 <li><a href=
"#ppd_profile_t" title=
"sRGB Color Profiles">ppd_profile_t
</a></li>
363 <li><a href=
"#ppd_section_t" title=
"Order dependency sections">ppd_section_t
</a></li>
364 <li><a href=
"#ppd_size_t" title=
"Page Sizes">ppd_size_t
</a></li>
365 <li><a href=
"#ppd_status_t" title=
"Types and structures...">ppd_status_t
</a></li>
366 <li><a href=
"#ppd_ui_t" title=
"UI Types">ppd_ui_t
</a></li>
368 <li><a href=
"#STRUCTURES">Structures
</a><ul class=
"code">
369 <li><a href=
"#ppd_attr_s" title=
"PPD Attribute Structure ">ppd_attr_s
</a></li>
370 <li><a href=
"#ppd_choice_s" title=
"Option choices">ppd_choice_s
</a></li>
371 <li><a href=
"#ppd_const_s" title=
"Constraints">ppd_const_s
</a></li>
372 <li><a href=
"#ppd_coption_s" title=
"Custom Option ">ppd_coption_s
</a></li>
373 <li><a href=
"#ppd_cparam_s" title=
"Custom Parameter ">ppd_cparam_s
</a></li>
374 <li><a href=
"#ppd_emul_s" title=
"Emulators">ppd_emul_s
</a></li>
375 <li><a href=
"#ppd_file_s" title=
"PPD File">ppd_file_s
</a></li>
376 <li><a href=
"#ppd_group_s" title=
"Groups">ppd_group_s
</a></li>
377 <li><a href=
"#ppd_option_s" title=
"Options">ppd_option_s
</a></li>
378 <li><a href=
"#ppd_profile_s" title=
"sRGB Color Profiles">ppd_profile_s
</a></li>
379 <li><a href=
"#ppd_size_s" title=
"Page Sizes">ppd_size_s
</a></li>
381 <li><a href=
"#UNIONS">Unions
</a><ul class=
"code">
382 <li><a href=
"#ppd_cplimit_u" title=
"Custom Parameter Limit ">ppd_cplimit_u
</a></li>
383 <li><a href=
"#ppd_cpvalue_u" title=
"Custom Parameter Value ">ppd_cpvalue_u
</a></li>
385 <li><a href=
"#ENUMERATIONS">Constants
</a><ul class=
"code">
386 <li><a href=
"#ppd_conform_e" title=
"">ppd_conform_e
</a></li>
387 <li><a href=
"#ppd_cptype_e" title=
"Custom Parameter Type ">ppd_cptype_e
</a></li>
388 <li><a href=
"#ppd_cs_e" title=
"Colorspaces">ppd_cs_e
</a></li>
389 <li><a href=
"#ppd_section_e" title=
"Order dependency sections">ppd_section_e
</a></li>
390 <li><a href=
"#ppd_status_e" title=
"Types and structures...">ppd_status_e
</a></li>
391 <li><a href=
"#ppd_ui_e" title=
"UI Types">ppd_ui_e
</a></li>
395 "$Id: api-ppd.shtml 7616 2008-05-28 00:34:13Z mike $"
397 PPD API introduction for the Common UNIX Printing System (CUPS).
399 Copyright 2007-2008 by Apple Inc.
400 Copyright 1997-2006 by Easy Software Products, all rights reserved.
402 These coded instructions, statements, and computer programs are the
403 property of Apple Inc. and are protected by Federal copyright
404 law. Distribution and use rights are outlined in the file "LICENSE.txt"
405 which should have been included with this file. If this file is
406 file is missing or damaged, see the license at "http://www.cups.org/".
409 <h2 class='title'
><a name='OVERVIEW'
>Overview
</a></h2>
411 <p>The CUPS PPD API provides read-only access the data in PostScript Printer
412 Description (
"PPD") files which are used for all printers with a driver. With
413 it you can obtain the data necessary to display printer options to users, mark
414 option choices and check for conflicting choices, and output marked choices in
415 PostScript output. The
<a href=
"#ppd_file_t"><code>ppd_file_t
</code></a>
416 structure contains all of the information in a PPD file.
</p>
418 <blockquote><b>Note:
</b>
420 <p>The CUPS PPD API uses the terms
"option" and
"choice" instead of the Adobe
421 terms
"MainKeyword" and
"OptionKeyword" to refer to specific printer options and
422 features. CUPS also treats option (
"MainKeyword") and choice (
"OptionKeyword")
423 values as case-insensitive strings, so option
"InputSlot" and choice
"Upper"
424 are equivalent to
"inputslot" and
"upper", respectively.
</p>
427 <h3><a name=
"LOADING">Loading a PPD File
</a></h3>
429 <p>The
<a href=
"#ppdOpenFile"><code>ppdOpenFile
</code></a> function
"opens" a
430 PPD file and loads it into memory. For example, the following code opens the
431 current printer's PPD file in a CUPS filter:
</p>
433 <pre class=
"example">
434 #include
<cups/ppd.h
>
436 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd =
<a href=
"#ppdOpenFile">ppdOpenFile
</a>(getenv(
"PPD"));
439 <p>The return value is a pointer to a new
440 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure or
<code>NULL
</code>
441 if the PPD file does not exist or cannot be loaded. The
442 <a href=
"#ppdClose"><code>ppdClose
</code></a> function frees the memory used
443 by the structure:
</p>
445 <pre class=
"example">
446 #include
<cups/ppd.h
>
448 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
450 <a href=
"#ppdClose">ppdClose
</a>(ppd);
453 <p>Once closed, pointers to the
<a href=
"#ppd_file_t"><code>ppd_file_t
</code></a>
454 structure and any data in it will no longer be valid.
</p>
456 <h3><a name=
"OPTIONS_AND_GROUPS">Options and Groups
</a></h3>
458 <p>PPD files support multiple options, which are stored in arrays of
459 <a href=
"#ppd_option_t"><code>ppd_option_t
</code></a> and
460 <a href=
"#ppd_choice_t"><code>ppd_choice_t
</code></a> structures.
</p>
462 <p>Each option in turn is associated with a group stored in a
463 <a href=
"#ppd_group_t"><code>ppd_group_t
</code></a> structure. Groups can be
464 specified in the PPD file; if an option is not associated with a group
465 then it is put in an automatically-generated
"General" group. Groups can also
466 have sub-groups, however CUPS currently ignores sub-groups because of past
467 abuses of this functionality.
</p>
469 <p>Option choices are selected by marking them using one of three functions. The
470 first is
<a href=
"#ppdMarkDefaults"><code>ppdMarkDefaults
</code></a> which
471 selects all of the default options in the PPD file:
</p>
473 <pre class=
"example">
474 #include
<cups/ppd.h
>
476 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
478 <a href=
"#ppdMarkDefaults">ppdMarkDefaults
</a>(ppd);
481 <p>The second is
<a href=
"#ppdMarkOption"><code>ppdMarkOption
</code></a>
482 which selects a single option choice in the PPD file. For example, the following
483 code selects the upper paper tray:
</p>
485 <pre class=
"example">
486 #include
<cups/ppd.h
>
488 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
490 <a href=
"#ppdMarkOption">ppdMarkOption
</a>(ppd,
"InputSlot",
"Upper");
493 <p>The last function is
494 <a href=
"#cupsMarkOptions"><code>cupsMarkOptions
</code></a> which selects
495 multiple option choices in the PPD file from an array of CUPS options, mapping
496 IPP attributes like
"media" and
"sides" to their corresponding PPD options. You
497 typically use this function in a print filter with
498 <code>cupsParseOptions
</code> and
499 <a href=
"#ppdMarkDefaults"><code>ppdMarkDefaults
</code></a> to select all of
500 the option choices needed for the job, for example:
</p>
502 <pre class=
"example">
503 #include
<cups/ppd.h
>
505 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd =
<a href=
"#ppdOpenFile">ppdOpenFile
</a>(getenv(
"PPD"));
506 cups_option_t *options = NULL;
507 int num_options = cupsParseOptions(argv[
5],
0,
&options);
509 <a href=
"#ppdMarkDefaults">ppdMarkDefaults
</a>(ppd);
510 <a href=
"#cupsMarkOptions">cupsMarkOptions
</a>(ppd, num_options, options);
511 cupsFreeOptions(num_options, options);
514 <h3><a name=
"CONSTRAINTS">Constraints
</a></h3>
516 <p>PPD files support specification of conflict conditions, called
517 constraints, between different options. Constraints are stored in an array of
518 <a href=
"#ppd_const_t"><code>ppd_const_t
</code></a> structures which specify
519 the options and choices that conflict with each other. The
520 <a href=
"#ppdConflicts"><code>ppdConflicts
</code></a> function tells you
521 how many of the selected options are incompatible. Since constraints are
522 normally specified in pairs, the returned value is typically an even number.
</p>
524 <h3><a name=
"PAGE_SIZES">Page Sizes
</a></h3>
526 <p>Page sizes are special options which have physical dimensions and margins
527 associated with them. The size information is stored in
528 <a href=
"#ppd_size_t"><code>ppd_size_t
</code></a> structures and is available
529 by looking up the named size with the
530 <a href=
"#ppdPageSize"><code>ppdPageSize
</code></a> function. The page size and
531 margins are returned in units called points; there are
72 points per inch. If
532 you pass
<code>NULL
</code> for the size, the currently selected size is
535 <pre class=
"example">
536 #include
<cups/ppd.h
>
538 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
539 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd, NULL);
542 <p>Besides the standard page sizes listed in a PPD file, some printers
543 support variable or custom page sizes. Custom page sizes are supported if the
544 <code>variables_sizes
</code> member of the
545 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure is non-zero.
546 The
<code>custom_min
</code>,
<code>custom_max
</code>, and
547 <code>custom_margins
</code> members of the
548 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure define the limits
549 of the printable area. To get the resulting media size, use a page size string
550 of the form
"Custom.<I>width</I>x<I>length</I>", where
"width" and
"length" are
551 in points. Custom page size names can also be specified in inches
552 (
"Custom.<i>width</i>x<i>height</i>in"), centimeters
553 (
"Custom.<i>width</i>x<i>height</i>cm"), or millimeters
554 (
"Custom.<i>width</i>x<i>height</i>mm"):
</p>
556 <pre class=
"example">
557 #include
<cups/ppd.h
>
559 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
561 /* Get an
576x720 point custom page size */
562 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.576x720");
564 /* Get an
8x10 inch custom page size */
565 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.8x10in");
567 /* Get a
100x200 millimeter custom page size */
568 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.100x200mm");
570 /* Get a
12.7x34.5 centimeter custom page size */
571 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.12.7x34.5cm");
574 <p>If the PPD does not support variable page sizes, the
575 <a href=
"#ppdPageSize"><code>ppdPageSize
</code></a> function will return
576 <code>NULL
</code>.
</p>
578 <h3><a name=
"ATTRIBUTES">Attributes
</a></h3>
580 <p>Every PPD file is composed of one or more attributes. Most of these
581 attributes are used to define groups, options, choices, and page sizes,
582 however several informational attributes may be present which you can access
583 in your program or filter. Attributes normally look like one of the following
584 examples in a PPD file:
</p>
586 <pre class=
"example">
589 *name spec/text:
"value"
592 <p>The
<a href=
"#ppdFindAttr"><code>ppdFindAttr
</code></a> and
593 <a href=
"#ppdFindNextAttr"><code>ppdFindNextAttr
</code></a> functions find the
594 first and next instances, respectively, of the named attribute with the given
595 "spec" string and return a
<a href=
"#ppd_attr_t"><code>ppd_attr_t
</code></a>
596 structure. If you provide a NULL specifier string, all attributes with the
597 given name will be returned. For example, the following code lists all of the
598 <code>Product
</code> attributes in a PPD file:
</p>
600 <pre class=
"example">
601 #include
<cups/ppd.h
>
603 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
604 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *attr;
606 for (attr =
<a href=
"#ppdFindAttr">ppdFindAttr
</a>(ppd,
"Product", NULL);
608 attr =
<a href=
"#ppdFindNextAttr">ppdFindNextAttr
</a>(ppd,
"Product", NULL))
611 <h2 class=
"title"><a name=
"FUNCTIONS">Functions
</a></h2>
612 <h3 class=
"function"><a name=
"cupsMarkOptions">cupsMarkOptions
</a></h3>
613 <p class=
"description">Mark command-line options in a PPD file.
</p>
615 int cupsMarkOptions (
<br>
616 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
617 int num_options,
<br>
618 cups_option_t *options
<br>
620 <h4 class=
"parameters">Parameters
</h4>
623 <dd class=
"description">PPD file
</dd>
625 <dd class=
"description">Number of options
</dd>
627 <dd class=
"description">Options
</dd>
629 <h4 class=
"returnvalue">Return Value
</h4>
630 <p class=
"description">1 if conflicting
</p>
631 <h4 class=
"discussion">Discussion
</h4>
632 <p class=
"discussion">This function maps the IPP
"finishings
",
"media
",
"mirror
",
633 "multiple-document-handling
",
"output-bin
",
"printer-resolution
", and
634 "sides
" attributes to their corresponding PPD options and choices.
</p>
635 <h3 class=
"function"><a name=
"ppdClose">ppdClose
</a></h3>
636 <p class=
"description">Free all memory used by the PPD file.
</p>
639 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
641 <h4 class=
"parameters">Parameters
</h4>
644 <dd class=
"description">PPD file record
</dd>
646 <h3 class=
"function"><a name=
"ppdCollect">ppdCollect
</a></h3>
647 <p class=
"description">Collect all marked options that reside in the specified
651 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
652 <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br>
653 <a href=
"#ppd_choice_t">ppd_choice_t
</a> ***choices
<br>
655 <h4 class=
"parameters">Parameters
</h4>
658 <dd class=
"description">PPD file data
</dd>
660 <dd class=
"description">Section to collect
</dd>
662 <dd class=
"description">Pointers to choices
</dd>
664 <h4 class=
"returnvalue">Return Value
</h4>
665 <p class=
"description">Number of options marked
</p>
666 <h4 class=
"discussion">Discussion
</h4>
667 <p class=
"discussion">The choices array should be freed using
<code>free
</code> when you are
668 finished with it.
</p>
669 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdCollect2">ppdCollect2
</a></h3>
670 <p class=
"description">Collect all marked options that reside in the
671 specified section and minimum order.
</p>
673 int ppdCollect2 (
<br>
674 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
675 <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br>
676 float min_order,
<br>
677 <a href=
"#ppd_choice_t">ppd_choice_t
</a> ***choices
<br>
679 <h4 class=
"parameters">Parameters
</h4>
682 <dd class=
"description">PPD file data
</dd>
684 <dd class=
"description">Section to collect
</dd>
686 <dd class=
"description">Minimum OrderDependency value
</dd>
688 <dd class=
"description">Pointers to choices
</dd>
690 <h4 class=
"returnvalue">Return Value
</h4>
691 <p class=
"description">Number of options marked
</p>
692 <h4 class=
"discussion">Discussion
</h4>
693 <p class=
"discussion">The choices array should be freed using
<code>free
</code> when you are
697 <h3 class=
"function"><a name=
"ppdConflicts">ppdConflicts
</a></h3>
698 <p class=
"description">Check to see if there are any conflicts among the
699 marked option choices.
</p>
701 int ppdConflicts (
<br>
702 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
704 <h4 class=
"parameters">Parameters
</h4>
707 <dd class=
"description">PPD to check
</dd>
709 <h4 class=
"returnvalue">Return Value
</h4>
710 <p class=
"description">Number of conflicts found
</p>
711 <h4 class=
"discussion">Discussion
</h4>
712 <p class=
"discussion">The returned value is the same as returned by
<a href=
"#ppdMarkOption"><code>ppdMarkOption
</code></a>.
</p>
713 <h3 class=
"function"><a name=
"ppdEmit">ppdEmit
</a></h3>
714 <p class=
"description">Emit code for marked options to a file.
</p>
717 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
718 FILE *fp,
<br>
719 <a href=
"#ppd_section_t">ppd_section_t
</a> section
<br>
721 <h4 class=
"parameters">Parameters
</h4>
724 <dd class=
"description">PPD file record
</dd>
726 <dd class=
"description">File to write to
</dd>
728 <dd class=
"description">Section to write
</dd>
730 <h4 class=
"returnvalue">Return Value
</h4>
731 <p class=
"description">0 on success, -
1 on failure
</p>
732 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdEmitAfterOrder">ppdEmitAfterOrder
</a></h3>
733 <p class=
"description">Emit a subset of the code for marked options to a file.
</p>
735 int ppdEmitAfterOrder (
<br>
736 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
737 FILE *fp,
<br>
738 <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br>
739 int limit,
<br>
740 float min_order
<br>
742 <h4 class=
"parameters">Parameters
</h4>
745 <dd class=
"description">PPD file record
</dd>
747 <dd class=
"description">File to write to
</dd>
749 <dd class=
"description">Section to write
</dd>
751 <dd class=
"description">Non-zero to use min_order
</dd>
753 <dd class=
"description">Lowest OrderDependency
</dd>
755 <h4 class=
"returnvalue">Return Value
</h4>
756 <p class=
"description">0 on success, -
1 on failure
</p>
757 <h4 class=
"discussion">Discussion
</h4>
758 <p class=
"discussion">When
"limit
" is non-zero, this function only emits options whose
759 OrderDependency value is greater than or equal to
"min_order
".
<br>
761 When
"limit
" is zero, this function is identical to ppdEmit().
764 <h3 class=
"function"><a name=
"ppdEmitFd">ppdEmitFd
</a></h3>
765 <p class=
"description">Emit code for marked options to a file.
</p>
768 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
769 int fd,
<br>
770 <a href=
"#ppd_section_t">ppd_section_t
</a> section
<br>
772 <h4 class=
"parameters">Parameters
</h4>
775 <dd class=
"description">PPD file record
</dd>
777 <dd class=
"description">File to write to
</dd>
779 <dd class=
"description">Section to write
</dd>
781 <h4 class=
"returnvalue">Return Value
</h4>
782 <p class=
"description">0 on success, -
1 on failure
</p>
783 <h3 class=
"function"><a name=
"ppdEmitJCL">ppdEmitJCL
</a></h3>
784 <p class=
"description">Emit code for JCL options to a file.
</p>
787 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
788 FILE *fp,
<br>
789 int job_id,
<br>
790 const char *user,
<br>
791 const char *title
<br>
793 <h4 class=
"parameters">Parameters
</h4>
796 <dd class=
"description">PPD file record
</dd>
798 <dd class=
"description">File to write to
</dd>
800 <dd class=
"description">Job ID
</dd>
802 <dd class=
"description">Username
</dd>
804 <dd class=
"description">Title
</dd>
806 <h4 class=
"returnvalue">Return Value
</h4>
807 <p class=
"description">0 on success, -
1 on failure
</p>
808 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdEmitJCLEnd">ppdEmitJCLEnd
</a></h3>
809 <p class=
"description">Emit JCLEnd code to a file.
</p>
811 int ppdEmitJCLEnd (
<br>
812 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
813 FILE *fp
<br>
815 <h4 class=
"parameters">Parameters
</h4>
818 <dd class=
"description">PPD file record
</dd>
820 <dd class=
"description">File to write to
</dd>
822 <h4 class=
"returnvalue">Return Value
</h4>
823 <p class=
"description">0 on success, -
1 on failure
</p>
824 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdEmitString">ppdEmitString
</a></h3>
825 <p class=
"description">Get a string containing the code for marked options.
</p>
827 char *ppdEmitString (
<br>
828 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
829 <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br>
830 float min_order
<br>
832 <h4 class=
"parameters">Parameters
</h4>
835 <dd class=
"description">PPD file record
</dd>
837 <dd class=
"description">Section to write
</dd>
839 <dd class=
"description">Lowest OrderDependency
</dd>
841 <h4 class=
"returnvalue">Return Value
</h4>
842 <p class=
"description">String containing option code or
<code>NULL
</code> if there is no option code
</p>
843 <h4 class=
"discussion">Discussion
</h4>
844 <p class=
"discussion">When
"min_order
" is greater than zero, this function only includes options
845 whose OrderDependency value is greater than or equal to
"min_order
".
846 Otherwise, all options in the specified section are included in the
849 The return string is allocated on the heap and should be freed using
850 <code>free
</code> when you are done with it.
853 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppdErrorString">ppdErrorString
</a></h3>
854 <p class=
"description">Returns the text assocated with a status.
</p>
856 const char *ppdErrorString (
<br>
857 <a href=
"#ppd_status_t">ppd_status_t
</a> status
<br>
859 <h4 class=
"parameters">Parameters
</h4>
862 <dd class=
"description">PPD status
</dd>
864 <h4 class=
"returnvalue">Return Value
</h4>
865 <p class=
"description">Status string
</p>
866 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppdFindAttr">ppdFindAttr
</a></h3>
867 <p class=
"description">Find the first matching attribute.
</p>
869 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *ppdFindAttr (
<br>
870 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
871 const char *name,
<br>
872 const char *spec
<br>
874 <h4 class=
"parameters">Parameters
</h4>
877 <dd class=
"description">PPD file data
</dd>
879 <dd class=
"description">Attribute name
</dd>
881 <dd class=
"description">Specifier string or
<code>NULL
</code></dd>
883 <h4 class=
"returnvalue">Return Value
</h4>
884 <p class=
"description">Attribute or
<code>NULL
</code> if not found
</p>
885 <h3 class=
"function"><a name=
"ppdFindChoice">ppdFindChoice
</a></h3>
886 <p class=
"description">Return a pointer to an option choice.
</p>
888 <a href=
"#ppd_choice_t">ppd_choice_t
</a> *ppdFindChoice (
<br>
889 <a href=
"#ppd_option_t">ppd_option_t
</a> *o,
<br>
890 const char *choice
<br>
892 <h4 class=
"parameters">Parameters
</h4>
895 <dd class=
"description">Pointer to option
</dd>
897 <dd class=
"description">Name of choice
</dd>
899 <h4 class=
"returnvalue">Return Value
</h4>
900 <p class=
"description">Choice pointer or
<code>NULL
</code></p>
901 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdFindCustomOption">ppdFindCustomOption
</a></h3>
902 <p class=
"description">Find a custom option.
</p>
904 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *ppdFindCustomOption (
<br>
905 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
906 const char *keyword
<br>
908 <h4 class=
"parameters">Parameters
</h4>
911 <dd class=
"description">PPD file
</dd>
913 <dd class=
"description">Custom option name
</dd>
915 <h4 class=
"returnvalue">Return Value
</h4>
916 <p class=
"description">Custom option or NULL
</p>
917 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdFindCustomParam">ppdFindCustomParam
</a></h3>
918 <p class=
"description">Find a parameter for a custom option.
</p>
920 <a href=
"#ppd_cparam_t">ppd_cparam_t
</a> *ppdFindCustomParam (
<br>
921 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *opt,
<br>
922 const char *name
<br>
924 <h4 class=
"parameters">Parameters
</h4>
927 <dd class=
"description">Custom option
</dd>
929 <dd class=
"description">Parameter name
</dd>
931 <h4 class=
"returnvalue">Return Value
</h4>
932 <p class=
"description">Custom parameter or NULL
</p>
933 <h3 class=
"function"><a name=
"ppdFindMarkedChoice">ppdFindMarkedChoice
</a></h3>
934 <p class=
"description">Return the marked choice for the specified option.
</p>
936 <a href=
"#ppd_choice_t">ppd_choice_t
</a> *ppdFindMarkedChoice (
<br>
937 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
938 const char *option
<br>
940 <h4 class=
"parameters">Parameters
</h4>
943 <dd class=
"description">PPD file
</dd>
945 <dd class=
"description">Keyword/option name
</dd>
947 <h4 class=
"returnvalue">Return Value
</h4>
948 <p class=
"description">Pointer to choice or
<code>NULL
</code></p>
949 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppdFindNextAttr">ppdFindNextAttr
</a></h3>
950 <p class=
"description">Find the next matching attribute.
</p>
952 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *ppdFindNextAttr (
<br>
953 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
954 const char *name,
<br>
955 const char *spec
<br>
957 <h4 class=
"parameters">Parameters
</h4>
960 <dd class=
"description">PPD file data
</dd>
962 <dd class=
"description">Attribute name
</dd>
964 <dd class=
"description">Specifier string or
<code>NULL
</code></dd>
966 <h4 class=
"returnvalue">Return Value
</h4>
967 <p class=
"description">Attribute or
<code>NULL
</code> if not found
</p>
968 <h3 class=
"function"><a name=
"ppdFindOption">ppdFindOption
</a></h3>
969 <p class=
"description">Return a pointer to the specified option.
</p>
971 <a href=
"#ppd_option_t">ppd_option_t
</a> *ppdFindOption (
<br>
972 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
973 const char *option
<br>
975 <h4 class=
"parameters">Parameters
</h4>
978 <dd class=
"description">PPD file data
</dd>
980 <dd class=
"description">Option/Keyword name
</dd>
982 <h4 class=
"returnvalue">Return Value
</h4>
983 <p class=
"description">Pointer to option or
<code>NULL
</code></p>
984 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdFirstCustomParam">ppdFirstCustomParam
</a></h3>
985 <p class=
"description">Return the first parameter for a custom option.
</p>
987 <a href=
"#ppd_cparam_t">ppd_cparam_t
</a> *ppdFirstCustomParam (
<br>
988 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *opt
<br>
990 <h4 class=
"parameters">Parameters
</h4>
993 <dd class=
"description">Custom option
</dd>
995 <h4 class=
"returnvalue">Return Value
</h4>
996 <p class=
"description">Custom parameter or NULL
</p>
997 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdFirstOption">ppdFirstOption
</a></h3>
998 <p class=
"description">Return the first option in the PPD file.
</p>
1000 <a href=
"#ppd_option_t">ppd_option_t
</a> *ppdFirstOption (
<br>
1001 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
1003 <h4 class=
"parameters">Parameters
</h4>
1006 <dd class=
"description">PPD file
</dd>
1008 <h4 class=
"returnvalue">Return Value
</h4>
1009 <p class=
"description">First option or
<code>NULL
</code></p>
1010 <h4 class=
"discussion">Discussion
</h4>
1011 <p class=
"discussion">Options are returned from all groups in ascending alphanumeric order.
1014 <h3 class=
"function"><a name=
"ppdIsMarked">ppdIsMarked
</a></h3>
1015 <p class=
"description">Check to see if an option is marked.
</p>
1017 int ppdIsMarked (
<br>
1018 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1019 const char *option,
<br>
1020 const char *choice
<br>
1022 <h4 class=
"parameters">Parameters
</h4>
1025 <dd class=
"description">PPD file data
</dd>
1027 <dd class=
"description">Option/Keyword name
</dd>
1029 <dd class=
"description">Choice name
</dd>
1031 <h4 class=
"returnvalue">Return Value
</h4>
1032 <p class=
"description">Non-zero if option is marked
</p>
1033 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppdLastError">ppdLastError
</a></h3>
1034 <p class=
"description">Return the status from the last ppdOpen*().
</p>
1036 <a href=
"#ppd_status_t">ppd_status_t
</a> ppdLastError (
<br>
1037 int *line
<br>
1039 <h4 class=
"parameters">Parameters
</h4>
1042 <dd class=
"description">Line number
</dd>
1044 <h4 class=
"returnvalue">Return Value
</h4>
1045 <p class=
"description">Status code
</p>
1046 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdLocalize">ppdLocalize
</a></h3>
1047 <p class=
"description">Localize the PPD file to the current locale.
</p>
1049 int ppdLocalize (
<br>
1050 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
1052 <h4 class=
"parameters">Parameters
</h4>
1055 <dd class=
"description">PPD file
</dd>
1057 <h4 class=
"returnvalue">Return Value
</h4>
1058 <p class=
"description">0 on success, -
1 on error
</p>
1059 <h4 class=
"discussion">Discussion
</h4>
1060 <p class=
"discussion">All groups, options, and choices are localized, as are ICC profile
1061 descriptions, printer presets, and custom option parameters. Each
1062 localized string uses the UTF-
8 character encoding.
1065 <h3 class=
"function"><a name=
"ppdLocalizeAttr">ppdLocalizeAttr
</a></h3>
1066 <p class=
"description">Localize an attribute.
</p>
1068 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *ppdLocalizeAttr (
<br>
1069 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1070 const char *keyword,
<br>
1071 const char *spec
<br>
1073 <h4 class=
"parameters">Parameters
</h4>
1076 <dd class=
"description">PPD file
</dd>
1078 <dd class=
"description">Main keyword
</dd>
1080 <dd class=
"description">Option keyword or
<code>NULL
</code> for none
</dd>
1082 <h4 class=
"returnvalue">Return Value
</h4>
1083 <p class=
"description">Localized attribute or
<code>NULL
</code> if none exists
</p>
1084 <h4 class=
"discussion">Discussion
</h4>
1085 <p class=
"discussion">This function uses the current locale to find the localized attribute for
1086 the given main and option keywords. If no localized version of the
1087 attribute exists for the current locale, the unlocalized version is returned.
</p>
1088 <h3 class=
"function"><span class=
"info"> CUPS
1.3 </span><a name=
"ppdLocalizeIPPReason">ppdLocalizeIPPReason
</a></h3>
1089 <p class=
"description">Get the localized version of a cupsIPPReason
1092 const char *ppdLocalizeIPPReason (
<br>
1093 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1094 const char *reason,
<br>
1095 const char *scheme,
<br>
1096 char *buffer,
<br>
1097 size_t bufsize
<br>
1099 <h4 class=
"parameters">Parameters
</h4>
1102 <dd class=
"description">PPD file
</dd>
1104 <dd class=
"description">IPP reason keyword to look up
</dd>
1106 <dd class=
"description">URI scheme or NULL for text
</dd>
1108 <dd class=
"description">Value buffer
</dd>
1110 <dd class=
"description">Size of value buffer
</dd>
1112 <h4 class=
"returnvalue">Return Value
</h4>
1113 <p class=
"description">Value or NULL if not found
</p>
1114 <h4 class=
"discussion">Discussion
</h4>
1115 <p class=
"discussion">This function uses the current locale to find the corresponding reason
1116 text or URI from the attribute value. If
"scheme
" is NULL or
"text
",
1117 the returned value contains human-readable (UTF-
8) text from the translation
1118 string or attribute value. Otherwise the corresponding URI is returned.
<br>
1120 If no value of the requested scheme can be found, NULL is returned.
1123 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"ppdLocalizeMarkerName">ppdLocalizeMarkerName
</a></h3>
1124 <p class=
"description">Get the localized version of a marker-names
1125 attribute value.
</p>
1127 const char *ppdLocalizeMarkerName (
<br>
1128 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1129 const char *name
<br>
1131 <h4 class=
"parameters">Parameters
</h4>
1134 <dd class=
"description">PPD file
</dd>
1136 <dd class=
"description">Marker name to look up
</dd>
1138 <h4 class=
"returnvalue">Return Value
</h4>
1139 <p class=
"description">Value or
<code>NULL
</code> if not found
</p>
1140 <h4 class=
"discussion">Discussion
</h4>
1141 <p class=
"discussion">This function uses the current locale to find the corresponding name
1142 text from the attribute value. If no localized text for the requested
1143 name can be found,
<code>NULL
</code> is returned.
1146 <h3 class=
"function"><a name=
"ppdMarkDefaults">ppdMarkDefaults
</a></h3>
1147 <p class=
"description">Mark all default options in the PPD file.
</p>
1149 void ppdMarkDefaults (
<br>
1150 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
1152 <h4 class=
"parameters">Parameters
</h4>
1155 <dd class=
"description">PPD file record
</dd>
1157 <h3 class=
"function"><a name=
"ppdMarkOption">ppdMarkOption
</a></h3>
1158 <p class=
"description">Mark an option in a PPD file.
</p>
1160 int ppdMarkOption (
<br>
1161 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1162 const char *option,
<br>
1163 const char *choice
<br>
1165 <h4 class=
"parameters">Parameters
</h4>
1168 <dd class=
"description">PPD file record
</dd>
1170 <dd class=
"description">Keyword
</dd>
1172 <dd class=
"description">Option name
</dd>
1174 <h4 class=
"returnvalue">Return Value
</h4>
1175 <p class=
"description">Number of conflicts
</p>
1176 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdNextCustomParam">ppdNextCustomParam
</a></h3>
1177 <p class=
"description">Return the next parameter for a custom option.
</p>
1179 <a href=
"#ppd_cparam_t">ppd_cparam_t
</a> *ppdNextCustomParam (
<br>
1180 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *opt
<br>
1182 <h4 class=
"parameters">Parameters
</h4>
1185 <dd class=
"description">Custom option
</dd>
1187 <h4 class=
"returnvalue">Return Value
</h4>
1188 <p class=
"description">Custom parameter or NULL
</p>
1189 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdNextOption">ppdNextOption
</a></h3>
1190 <p class=
"description">Return the next option in the PPD file.
</p>
1192 <a href=
"#ppd_option_t">ppd_option_t
</a> *ppdNextOption (
<br>
1193 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
1195 <h4 class=
"parameters">Parameters
</h4>
1198 <dd class=
"description">PPD file
</dd>
1200 <h4 class=
"returnvalue">Return Value
</h4>
1201 <p class=
"description">Next option or
<code>NULL
</code></p>
1202 <h4 class=
"discussion">Discussion
</h4>
1203 <p class=
"discussion">Options are returned from all groups in ascending alphanumeric order.
1206 <h3 class=
"function"><a name=
"ppdOpen">ppdOpen
</a></h3>
1207 <p class=
"description">Read a PPD file into memory.
</p>
1209 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppdOpen (
<br>
1210 FILE *fp
<br>
1212 <h4 class=
"parameters">Parameters
</h4>
1215 <dd class=
"description">File to read from
</dd>
1217 <h4 class=
"returnvalue">Return Value
</h4>
1218 <p class=
"description">PPD file record
</p>
1219 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdOpen2">ppdOpen2
</a></h3>
1220 <p class=
"description">Read a PPD file into memory.
</p>
1222 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppdOpen2 (
<br>
1223 cups_file_t *fp
<br>
1225 <h4 class=
"parameters">Parameters
</h4>
1228 <dd class=
"description">File to read from
</dd>
1230 <h4 class=
"returnvalue">Return Value
</h4>
1231 <p class=
"description">PPD file record or
<code>NULL
</code> if the PPD file could not be opened.
</p>
1232 <h3 class=
"function"><a name=
"ppdOpenFd">ppdOpenFd
</a></h3>
1233 <p class=
"description">Read a PPD file into memory.
</p>
1235 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppdOpenFd (
<br>
1236 int fd
<br>
1238 <h4 class=
"parameters">Parameters
</h4>
1241 <dd class=
"description">File to read from
</dd>
1243 <h4 class=
"returnvalue">Return Value
</h4>
1244 <p class=
"description">PPD file record or
<code>NULL
</code> if the PPD file could not be opened.
</p>
1245 <h3 class=
"function"><a name=
"ppdOpenFile">ppdOpenFile
</a></h3>
1246 <p class=
"description">Read a PPD file into memory.
</p>
1248 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppdOpenFile (
<br>
1249 const char *filename
<br>
1251 <h4 class=
"parameters">Parameters
</h4>
1254 <dd class=
"description">File to read from
</dd>
1256 <h4 class=
"returnvalue">Return Value
</h4>
1257 <p class=
"description">PPD file record or
<code>NULL
</code> if the PPD file could not be opened.
</p>
1258 <h3 class=
"function"><a name=
"ppdPageLength">ppdPageLength
</a></h3>
1259 <p class=
"description">Get the page length for the given size.
</p>
1261 float ppdPageLength (
<br>
1262 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1263 const char *name
<br>
1265 <h4 class=
"parameters">Parameters
</h4>
1268 <dd class=
"description">PPD file
</dd>
1270 <dd class=
"description">Size name
</dd>
1272 <h4 class=
"returnvalue">Return Value
</h4>
1273 <p class=
"description">Length of page in points or
0.0</p>
1274 <h3 class=
"function"><a name=
"ppdPageSize">ppdPageSize
</a></h3>
1275 <p class=
"description">Get the page size record for the given size.
</p>
1277 <a href=
"#ppd_size_t">ppd_size_t
</a> *ppdPageSize (
<br>
1278 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1279 const char *name
<br>
1281 <h4 class=
"parameters">Parameters
</h4>
1284 <dd class=
"description">PPD file record
</dd>
1286 <dd class=
"description">Size name
</dd>
1288 <h4 class=
"returnvalue">Return Value
</h4>
1289 <p class=
"description">Size record for page or NULL
</p>
1290 <h3 class=
"function"><a name=
"ppdPageWidth">ppdPageWidth
</a></h3>
1291 <p class=
"description">Get the page width for the given size.
</p>
1293 float ppdPageWidth (
<br>
1294 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1295 const char *name
<br>
1297 <h4 class=
"parameters">Parameters
</h4>
1300 <dd class=
"description">PPD file record
</dd>
1302 <dd class=
"description">Size name
</dd>
1304 <h4 class=
"returnvalue">Return Value
</h4>
1305 <p class=
"description">Width of page in points or
0.0</p>
1306 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20 </span><a name=
"ppdSetConformance">ppdSetConformance
</a></h3>
1307 <p class=
"description">Set the conformance level for PPD files.
</p>
1309 void ppdSetConformance (
<br>
1310 <a href=
"#ppd_conform_t">ppd_conform_t
</a> c
<br>
1312 <h4 class=
"parameters">Parameters
</h4>
1315 <dd class=
"description">Conformance level
</dd>
1317 <h2 class=
"title"><a name=
"TYPES">Data Types
</a></h2>
1318 <h3 class=
"typedef"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppd_attr_t">ppd_attr_t
</a></h3>
1319 <p class=
"description">PPD Attribute Structure
</p>
1321 typedef struct
<a href=
"#ppd_attr_s">ppd_attr_s
</a> ppd_attr_t;
1323 <h3 class=
"typedef"><a name=
"ppd_choice_t">ppd_choice_t
</a></h3>
1324 <p class=
"description">Option choices
</p>
1326 typedef struct
<a href=
"#ppd_choice_s">ppd_choice_s
</a> ppd_choice_t;
1328 <h3 class=
"typedef"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppd_conform_t">ppd_conform_t
</a></h3>
1329 <p class=
"description">Conformance Levels
</p>
1331 typedef enum
<a href=
"#ppd_conform_e">ppd_conform_e
</a> ppd_conform_t;
1333 <h3 class=
"typedef"><a name=
"ppd_const_t">ppd_const_t
</a></h3>
1334 <p class=
"description">Constraints
</p>
1336 typedef struct
<a href=
"#ppd_const_s">ppd_const_s
</a> ppd_const_t;
1338 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_coption_t">ppd_coption_t
</a></h3>
1339 <p class=
"description">Custom Option
</p>
1341 typedef struct
<a href=
"#ppd_coption_s">ppd_coption_s
</a> ppd_coption_t;
1343 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cparam_t">ppd_cparam_t
</a></h3>
1344 <p class=
"description">Custom Parameter
</p>
1346 typedef struct
<a href=
"#ppd_cparam_s">ppd_cparam_s
</a> ppd_cparam_t;
1348 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cplimit_t">ppd_cplimit_t
</a></h3>
1349 <p class=
"description">Custom Parameter Limit
</p>
1351 typedef union
<a href=
"#ppd_cplimit_u">ppd_cplimit_u
</a> ppd_cplimit_t;
1353 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cptype_t">ppd_cptype_t
</a></h3>
1354 <p class=
"description">Custom Parameter Type
</p>
1356 typedef enum
<a href=
"#ppd_cptype_e">ppd_cptype_e
</a> ppd_cptype_t;
1358 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cpvalue_t">ppd_cpvalue_t
</a></h3>
1359 <p class=
"description">Custom Parameter Value
</p>
1361 typedef union
<a href=
"#ppd_cpvalue_u">ppd_cpvalue_u
</a> ppd_cpvalue_t;
1363 <h3 class=
"typedef"><a name=
"ppd_cs_t">ppd_cs_t
</a></h3>
1364 <p class=
"description">Colorspaces
</p>
1366 typedef enum
<a href=
"#ppd_cs_e">ppd_cs_e
</a> ppd_cs_t;
1368 <h3 class=
"typedef"><a name=
"ppd_emul_t">ppd_emul_t
</a></h3>
1369 <p class=
"description">Emulators
</p>
1371 typedef struct
<a href=
"#ppd_emul_s">ppd_emul_s
</a> ppd_emul_t;
1373 <h3 class=
"typedef"><a name=
"ppd_file_t">ppd_file_t
</a></h3>
1374 <p class=
"description">PPD File
</p>
1376 typedef struct
<a href=
"#ppd_file_s">ppd_file_s
</a> ppd_file_t;
1378 <h3 class=
"typedef"><a name=
"ppd_group_t">ppd_group_t
</a></h3>
1379 <p class=
"description">Groups
</p>
1381 typedef struct
<a href=
"#ppd_group_s">ppd_group_s
</a> ppd_group_t;
1383 <h3 class=
"typedef"><a name=
"ppd_option_t">ppd_option_t
</a></h3>
1384 <p class=
"description">Options
</p>
1386 typedef struct
<a href=
"#ppd_option_s">ppd_option_s
</a> ppd_option_t;
1388 <h3 class=
"typedef"><a name=
"ppd_profile_t">ppd_profile_t
</a></h3>
1389 <p class=
"description">sRGB Color Profiles
</p>
1391 typedef struct
<a href=
"#ppd_profile_s">ppd_profile_s
</a> ppd_profile_t;
1393 <h3 class=
"typedef"><a name=
"ppd_section_t">ppd_section_t
</a></h3>
1394 <p class=
"description">Order dependency sections
</p>
1396 typedef enum
<a href=
"#ppd_section_e">ppd_section_e
</a> ppd_section_t;
1398 <h3 class=
"typedef"><a name=
"ppd_size_t">ppd_size_t
</a></h3>
1399 <p class=
"description">Page Sizes
</p>
1401 typedef struct
<a href=
"#ppd_size_s">ppd_size_s
</a> ppd_size_t;
1403 <h3 class=
"typedef"><a name=
"ppd_status_t">ppd_status_t
</a></h3>
1404 <p class=
"description">Types and structures...
</p>
1406 typedef enum
<a href=
"#ppd_status_e">ppd_status_e
</a> ppd_status_t;
1408 <h3 class=
"typedef"><a name=
"ppd_ui_t">ppd_ui_t
</a></h3>
1409 <p class=
"description">UI Types
</p>
1411 typedef enum
<a href=
"#ppd_ui_e">ppd_ui_e
</a> ppd_ui_t;
1413 <h2 class=
"title"><a name=
"STRUCTURES">Structures
</a></h2>
1414 <h3 class=
"struct"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppd_attr_s">ppd_attr_s
</a></h3>
1415 <p class=
"description">PPD Attribute Structure
</p>
1416 <p class=
"code">struct ppd_attr_s {
<br>
1417 char name[PPD_MAX_NAME];
<br>
1418 char spec[PPD_MAX_NAME];
<br>
1419 char text[PPD_MAX_TEXT];
<br>
1420 char *value;
<br>
1422 <h4 class=
"members">Members
</h4>
1424 <dt>name[PPD_MAX_NAME]
</dt>
1425 <dd class=
"description">Name of attribute (cupsXYZ)
</dd>
1426 <dt>spec[PPD_MAX_NAME]
</dt>
1427 <dd class=
"description">Specifier string, if any
</dd>
1428 <dt>text[PPD_MAX_TEXT]
</dt>
1429 <dd class=
"description">Human-readable text, if any
</dd>
1431 <dd class=
"description">Value string
</dd>
1433 <h3 class=
"struct"><a name=
"ppd_choice_s">ppd_choice_s
</a></h3>
1434 <p class=
"description">Option choices
</p>
1435 <p class=
"code">struct ppd_choice_s {
<br>
1436 char choice[PPD_MAX_NAME];
<br>
1437 char *code;
<br>
1438 char marked;
<br>
1439 <a href=
"#ppd_option_t">ppd_option_t
</a> *option;
<br>
1440 char text[PPD_MAX_TEXT];
<br>
1442 <h4 class=
"members">Members
</h4>
1444 <dt>choice[PPD_MAX_NAME]
</dt>
1445 <dd class=
"description">Computer-readable option name
</dd>
1447 <dd class=
"description">Code to send for this option
</dd>
1449 <dd class=
"description">0 if not selected,
1 otherwise
</dd>
1451 <dd class=
"description">Pointer to parent option structure
</dd>
1452 <dt>text[PPD_MAX_TEXT]
</dt>
1453 <dd class=
"description">Human-readable option name
</dd>
1455 <h3 class=
"struct"><a name=
"ppd_const_s">ppd_const_s
</a></h3>
1456 <p class=
"description">Constraints
</p>
1457 <p class=
"code">struct ppd_const_s {
<br>
1458 char choice1[PPD_MAX_NAME];
<br>
1459 char choice2[PPD_MAX_NAME];
<br>
1460 char option1[PPD_MAX_NAME];
<br>
1461 char option2[PPD_MAX_NAME];
<br>
1463 <h4 class=
"members">Members
</h4>
1465 <dt>choice1[PPD_MAX_NAME]
</dt>
1466 <dd class=
"description">First option/choice (blank for all)
</dd>
1467 <dt>choice2[PPD_MAX_NAME]
</dt>
1468 <dd class=
"description">Second option/choice (blank for all)
</dd>
1469 <dt>option1[PPD_MAX_NAME]
</dt>
1470 <dd class=
"description">First keyword
</dd>
1471 <dt>option2[PPD_MAX_NAME]
</dt>
1472 <dd class=
"description">Second keyword
</dd>
1474 <h3 class=
"struct"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_coption_s">ppd_coption_s
</a></h3>
1475 <p class=
"description">Custom Option
</p>
1476 <p class=
"code">struct ppd_coption_s {
<br>
1477 char keyword[PPD_MAX_NAME];
<br>
1478 int marked;
<br>
1479 <a href=
"#ppd_option_t">ppd_option_t
</a> *option;
<br>
1480 cups_array_t *params;
<br>
1482 <h4 class=
"members">Members
</h4>
1484 <dt>keyword[PPD_MAX_NAME]
</dt>
1485 <dd class=
"description">Name of option that is being extended...
</dd>
1487 <dd class=
"description">Extended option is marked
</dd>
1489 <dd class=
"description">Option that is being extended...
</dd>
1491 <dd class=
"description">Parameters
</dd>
1493 <h3 class=
"struct"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cparam_s">ppd_cparam_s
</a></h3>
1494 <p class=
"description">Custom Parameter
</p>
1495 <p class=
"code">struct ppd_cparam_s {
<br>
1496 <a href=
"#ppd_cpvalue_t">ppd_cpvalue_t
</a> current;
<br>
1497 <a href=
"#ppd_cplimit_t">ppd_cplimit_t
</a> minimum, maximum;
<br>
1498 char name[PPD_MAX_NAME];
<br>
1499 int order;
<br>
1500 char text[PPD_MAX_TEXT];
<br>
1501 <a href=
"#ppd_cptype_t">ppd_cptype_t
</a> type;
<br>
1503 <h4 class=
"members">Members
</h4>
1506 <dd class=
"description">Current value
</dd>
1508 <dd class=
"description">Maximum value
</dd>
1509 <dt>name[PPD_MAX_NAME]
</dt>
1510 <dd class=
"description">Parameter name
</dd>
1512 <dd class=
"description">Order (
0 to N)
</dd>
1513 <dt>text[PPD_MAX_TEXT]
</dt>
1514 <dd class=
"description">Human-readable text
</dd>
1516 <dd class=
"description">Parameter type
</dd>
1518 <h3 class=
"struct"><a name=
"ppd_emul_s">ppd_emul_s
</a></h3>
1519 <p class=
"description">Emulators
</p>
1520 <p class=
"code">struct ppd_emul_s {
<br>
1521 char name[PPD_MAX_NAME];
<br>
1522 char *start;
<br>
1523 char *stop;
<br>
1525 <h4 class=
"members">Members
</h4>
1527 <dt>name[PPD_MAX_NAME]
</dt>
1528 <dd class=
"description">Emulator name
</dd>
1530 <dd class=
"description">Code to switch to this emulation
</dd>
1532 <dd class=
"description">Code to stop this emulation
</dd>
1534 <h3 class=
"struct"><a name=
"ppd_file_s">ppd_file_s
</a></h3>
1535 <p class=
"description">PPD File
</p>
1536 <p class=
"code">struct ppd_file_s {
<br>
1537 int accurate_screens;
<br>
1538 int color_device;
<br>
1539 <a href=
"#ppd_cs_t">ppd_cs_t
</a> colorspace;
<br>
1540 <a href=
"#ppd_const_t">ppd_const_t
</a> *consts;
<br>
1541 int contone_only;
<br>
1542 float custom_margins[
4];
<br>
1543 float custom_max[
2];
<br>
1544 float custom_min[
2];
<br>
1545 <a href=
"#ppd_emul_t">ppd_emul_t
</a> *emulations;
<br>
1546 char **filters;
<br>
1547 int flip_duplex;
<br>
1548 char **fonts;
<br>
1549 <a href=
"#ppd_group_t">ppd_group_t
</a> *groups;
<br>
1550 char *jcl_begin;
<br>
1551 char *jcl_end;
<br>
1552 char *jcl_ps;
<br>
1553 int landscape;
<br>
1554 char *lang_encoding;
<br>
1555 char *lang_version;
<br>
1556 int language_level;
<br>
1557 int manual_copies;
<br>
1558 char *manufacturer;
<br>
1559 int model_number;
<br>
1560 char *modelname;
<br>
1561 char *nickname;
<br>
1562 int num_consts;
<br>
1563 int num_emulations;
<br>
1564 int num_filters;
<br>
1565 int num_fonts;
<br>
1566 int num_groups;
<br>
1567 int num_profiles;
<br>
1568 int num_sizes;
<br>
1569 char *patches;
<br>
1570 char *pcfilename;
<br>
1571 char *product;
<br>
1572 <a href=
"#ppd_profile_t">ppd_profile_t
</a> *profiles;
<br>
1573 char *protocols;
<br>
1574 char *shortnickname;
<br>
1575 <a href=
"#ppd_size_t">ppd_size_t
</a> *sizes;
<br>
1576 int throughput;
<br>
1577 char *ttrasterizer;
<br>
1578 int variable_sizes;
<br>
1580 <h4 class=
"members">Members
</h4>
1582 <dt>accurate_screens
</dt>
1583 <dd class=
"description">1 = supports accurate screens,
0 = not
</dd>
1584 <dt>color_device
</dt>
1585 <dd class=
"description">1 = color device,
0 = grayscale
</dd>
1586 <dt>colorspace
</dt>
1587 <dd class=
"description">Default colorspace
</dd>
1589 <dd class=
"description">UI/Non-UI constraints
</dd>
1590 <dt>contone_only
</dt>
1591 <dd class=
"description">1 = continuous tone only,
0 = not
</dd>
1592 <dt>custom_margins[
4]
</dt>
1593 <dd class=
"description">Margins around page
</dd>
1594 <dt>custom_max[
2]
</dt>
1595 <dd class=
"description">Maximum variable page size
</dd>
1596 <dt>custom_min[
2]
</dt>
1597 <dd class=
"description">Minimum variable page size
</dd>
1598 <dt>emulations
</dt>
1599 <dd class=
"description">Emulations and the code to invoke them
</dd>
1601 <dd class=
"description">Filter strings...
</dd>
1602 <dt>flip_duplex
<span class=
"info"> DEPRECATED
</span></dt>
1603 <dd class=
"description">1 = Flip page for back sides
</dd>
1605 <dd class=
"description">Pre-loaded fonts
</dd>
1607 <dd class=
"description">UI groups
</dd>
1609 <dd class=
"description">Start JCL commands
</dd>
1611 <dd class=
"description">End JCL commands
</dd>
1613 <dd class=
"description">Enter PostScript interpreter
</dd>
1615 <dd class=
"description">-
90 or
90</dd>
1616 <dt>lang_encoding
</dt>
1617 <dd class=
"description">Language encoding
</dd>
1618 <dt>lang_version
</dt>
1619 <dd class=
"description">Language version (English, Spanish, etc.)
</dd>
1620 <dt>language_level
</dt>
1621 <dd class=
"description">Language level of device
</dd>
1622 <dt>manual_copies
</dt>
1623 <dd class=
"description">1 = Copies done manually,
0 = hardware
</dd>
1624 <dt>manufacturer
</dt>
1625 <dd class=
"description">Manufacturer name
</dd>
1626 <dt>model_number
</dt>
1627 <dd class=
"description">Device-specific model number
</dd>
1629 <dd class=
"description">Model name (general)
</dd>
1631 <dd class=
"description">Nickname (specific)
</dd>
1632 <dt>num_consts
</dt>
1633 <dd class=
"description">Number of UI/Non-UI constraints
</dd>
1634 <dt>num_emulations
</dt>
1635 <dd class=
"description">Number of emulations supported
</dd>
1636 <dt>num_filters
</dt>
1637 <dd class=
"description">Number of filters
</dd>
1639 <dd class=
"description">Number of pre-loaded fonts
</dd>
1640 <dt>num_groups
</dt>
1641 <dd class=
"description">Number of UI groups
</dd>
1642 <dt>num_profiles
</dt>
1643 <dd class=
"description">Number of sRGB color profiles
</dd>
1645 <dd class=
"description">Number of page sizes
</dd>
1647 <dd class=
"description">Patch commands to be sent to printer
</dd>
1648 <dt>pcfilename
<span class=
"info"> CUPS
1.1.19 </span></dt>
1649 <dd class=
"description">PCFileName string
</dd>
1651 <dd class=
"description">Product name (from PS RIP/interpreter)
</dd>
1653 <dd class=
"description">sRGB color profiles
</dd>
1654 <dt>protocols
<span class=
"info"> CUPS
1.1.19 </span></dt>
1655 <dd class=
"description">Protocols (BCP, TBCP) string
</dd>
1656 <dt>shortnickname
</dt>
1657 <dd class=
"description">Short version of nickname
</dd>
1659 <dd class=
"description">Page sizes
</dd>
1660 <dt>throughput
</dt>
1661 <dd class=
"description">Pages per minute
</dd>
1662 <dt>ttrasterizer
</dt>
1663 <dd class=
"description">Truetype rasterizer
</dd>
1664 <dt>variable_sizes
</dt>
1665 <dd class=
"description">1 = supports variable sizes,
0 = doesn't
</dd>
1667 <h3 class=
"struct"><a name=
"ppd_group_s">ppd_group_s
</a></h3>
1668 <p class=
"description">Groups
</p>
1669 <p class=
"code">struct ppd_group_s {
<br>
1670 char text[PPD_MAX_TEXT - PPD_MAX_NAME];
<br>
1671 char name[PPD_MAX_NAME];
<br>
1672 int num_options;
<br>
1673 int num_subgroups;
<br>
1674 <a href=
"#ppd_option_t">ppd_option_t
</a> *options;
<br>
1675 struct
<a href=
"#ppd_group_s">ppd_group_s
</a> *subgroups;
<br>
1677 <h4 class=
"members">Members
</h4>
1679 <dt>PPD_MAX_NAME]
</dt>
1680 <dd class=
"description">Human-readable group name
</dd>
1681 <dt>name[PPD_MAX_NAME]
<span class=
"info"> CUPS
1.1.18 </span></dt>
1682 <dd class=
"description">Group name
</dd>
1683 <dt>num_options
</dt>
1684 <dd class=
"description">Number of options
</dd>
1685 <dt>num_subgroups
</dt>
1686 <dd class=
"description">Number of sub-groups
</dd>
1688 <dd class=
"description">Options
</dd>
1690 <dd class=
"description">Sub-groups (max depth =
1)
</dd>
1692 <h3 class=
"struct"><a name=
"ppd_option_s">ppd_option_s
</a></h3>
1693 <p class=
"description">Options
</p>
1694 <p class=
"code">struct ppd_option_s {
<br>
1695 <a href=
"#ppd_choice_t">ppd_choice_t
</a> *choices;
<br>
1696 char conflicted;
<br>
1697 char defchoice[PPD_MAX_NAME];
<br>
1698 char keyword[PPD_MAX_NAME];
<br>
1699 int num_choices;
<br>
1700 float order;
<br>
1701 <a href=
"#ppd_section_t">ppd_section_t
</a> section;
<br>
1702 char text[PPD_MAX_TEXT];
<br>
1703 <a href=
"#ppd_ui_t">ppd_ui_t
</a> ui;
<br>
1705 <h4 class=
"members">Members
</h4>
1708 <dd class=
"description">Option choices
</dd>
1709 <dt>conflicted
</dt>
1710 <dd class=
"description">0 if no conflicts exist,
1 otherwise
</dd>
1711 <dt>defchoice[PPD_MAX_NAME]
</dt>
1712 <dd class=
"description">Default option choice
</dd>
1713 <dt>keyword[PPD_MAX_NAME]
</dt>
1714 <dd class=
"description">Option keyword name (
"PageSize
", etc.)
</dd>
1715 <dt>num_choices
</dt>
1716 <dd class=
"description">Number of option choices
</dd>
1718 <dd class=
"description">Order number
</dd>
1720 <dd class=
"description">Section for command
</dd>
1721 <dt>text[PPD_MAX_TEXT]
</dt>
1722 <dd class=
"description">Human-readable text
</dd>
1724 <dd class=
"description">Type of UI option
</dd>
1726 <h3 class=
"struct"><a name=
"ppd_profile_s">ppd_profile_s
</a></h3>
1727 <p class=
"description">sRGB Color Profiles
</p>
1728 <p class=
"code">struct ppd_profile_s {
<br>
1729 float density;
<br>
1730 float gamma;
<br>
1731 float matrix[
3][
3];
<br>
1732 char media_type[PPD_MAX_NAME];
<br>
1733 char resolution[PPD_MAX_NAME];
<br>
1735 <h4 class=
"members">Members
</h4>
1738 <dd class=
"description">Ink density to use
</dd>
1740 <dd class=
"description">Gamma correction to use
</dd>
1741 <dt>matrix[
3][
3]
</dt>
1742 <dd class=
"description">Transform matrix
</dd>
1743 <dt>media_type[PPD_MAX_NAME]
</dt>
1744 <dd class=
"description">Media type or
"-
"</dd>
1745 <dt>resolution[PPD_MAX_NAME]
</dt>
1746 <dd class=
"description">Resolution or
"-
"</dd>
1748 <h3 class=
"struct"><a name=
"ppd_size_s">ppd_size_s
</a></h3>
1749 <p class=
"description">Page Sizes
</p>
1750 <p class=
"code">struct ppd_size_s {
<br>
1751 float bottom;
<br>
1752 float left;
<br>
1753 float length;
<br>
1754 int marked;
<br>
1755 char name[PPD_MAX_NAME];
<br>
1756 float right;
<br>
1757 float top;
<br>
1758 float width;
<br>
1760 <h4 class=
"members">Members
</h4>
1763 <dd class=
"description">Bottom printable margin in points
</dd>
1765 <dd class=
"description">Left printable margin in points
</dd>
1767 <dd class=
"description">Length of media in points
</dd>
1769 <dd class=
"description">Page size selected?
</dd>
1770 <dt>name[PPD_MAX_NAME]
</dt>
1771 <dd class=
"description">Media size option
</dd>
1773 <dd class=
"description">Right printable margin in points
</dd>
1775 <dd class=
"description">Top printable margin in points
</dd>
1777 <dd class=
"description">Width of media in points
</dd>
1779 <h2 class=
"title"><a name=
"UNIONS">Unions
</a></h2>
1780 <h3 class=
"union"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cplimit_u">ppd_cplimit_u
</a></h3>
1781 <p class=
"description">Custom Parameter Limit
</p>
1782 <p class=
"code">union ppd_cplimit_u {
<br>
1783 float custom_curve;
<br>
1784 int custom_int;
<br>
1785 float custom_invcurve;
<br>
1786 int custom_passcode;
<br>
1787 int custom_password;
<br>
1788 float custom_points;
<br>
1789 float custom_real;
<br>
1790 int custom_string;
<br>
1792 <h4 class=
"members">Members
</h4>
1794 <dt>custom_curve
</dt>
1795 <dd class=
"description">Gamma value
</dd>
1796 <dt>custom_int
</dt>
1797 <dd class=
"description">Integer value
</dd>
1798 <dt>custom_invcurve
</dt>
1799 <dd class=
"description">Gamma value
</dd>
1800 <dt>custom_passcode
</dt>
1801 <dd class=
"description">Passcode length
</dd>
1802 <dt>custom_password
</dt>
1803 <dd class=
"description">Password length
</dd>
1804 <dt>custom_points
</dt>
1805 <dd class=
"description">Measurement value
</dd>
1806 <dt>custom_real
</dt>
1807 <dd class=
"description">Real value
</dd>
1808 <dt>custom_string
</dt>
1809 <dd class=
"description">String length
</dd>
1811 <h3 class=
"union"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cpvalue_u">ppd_cpvalue_u
</a></h3>
1812 <p class=
"description">Custom Parameter Value
</p>
1813 <p class=
"code">union ppd_cpvalue_u {
<br>
1814 float custom_curve;
<br>
1815 int custom_int;
<br>
1816 float custom_invcurve;
<br>
1817 char *custom_passcode;
<br>
1818 char *custom_password;
<br>
1819 float custom_points;
<br>
1820 float custom_real;
<br>
1821 char *custom_string;
<br>
1823 <h4 class=
"members">Members
</h4>
1825 <dt>custom_curve
</dt>
1826 <dd class=
"description">Gamma value
</dd>
1827 <dt>custom_int
</dt>
1828 <dd class=
"description">Integer value
</dd>
1829 <dt>custom_invcurve
</dt>
1830 <dd class=
"description">Gamma value
</dd>
1831 <dt>custom_passcode
</dt>
1832 <dd class=
"description">Passcode value
</dd>
1833 <dt>custom_password
</dt>
1834 <dd class=
"description">Password value
</dd>
1835 <dt>custom_points
</dt>
1836 <dd class=
"description">Measurement value
</dd>
1837 <dt>custom_real
</dt>
1838 <dd class=
"description">Real value
</dd>
1839 <dt>custom_string
</dt>
1840 <dd class=
"description">String value
</dd>
1842 <h2 class=
"title"><a name=
"ENUMERATIONS">Constants
</a></h2>
1843 <h3 class=
"enumeration"><a name=
"ppd_conform_e">ppd_conform_e
</a></h3>
1844 <p class=
"description"></p>
1845 <h4 class=
"constants">Constants
</h4>
1847 <dt>PPD_CONFORM_RELAXED
</dt>
1848 <dd class=
"description">Relax whitespace and control char
</dd>
1849 <dt>PPD_CONFORM_STRICT
</dt>
1850 <dd class=
"description">Require strict conformance
</dd>
1852 <h3 class=
"enumeration"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cptype_e">ppd_cptype_e
</a></h3>
1853 <p class=
"description">Custom Parameter Type
</p>
1854 <h4 class=
"constants">Constants
</h4>
1856 <dt>PPD_CUSTOM_CURVE
</dt>
1857 <dd class=
"description">Curve value for f(x) = x^value
</dd>
1858 <dt>PPD_CUSTOM_INT
</dt>
1859 <dd class=
"description">Integer number value
</dd>
1860 <dt>PPD_CUSTOM_INVCURVE
</dt>
1861 <dd class=
"description">Curve value for f(x) = x^(
1/value)
</dd>
1862 <dt>PPD_CUSTOM_PASSCODE
</dt>
1863 <dd class=
"description">String of (hidden) numbers
</dd>
1864 <dt>PPD_CUSTOM_PASSWORD
</dt>
1865 <dd class=
"description">String of (hidden) characters
</dd>
1866 <dt>PPD_CUSTOM_POINTS
</dt>
1867 <dd class=
"description">Measurement value in points
</dd>
1868 <dt>PPD_CUSTOM_REAL
</dt>
1869 <dd class=
"description">Real number value
</dd>
1870 <dt>PPD_CUSTOM_STRING
</dt>
1871 <dd class=
"description">String of characters
</dd>
1873 <h3 class=
"enumeration"><a name=
"ppd_cs_e">ppd_cs_e
</a></h3>
1874 <p class=
"description">Colorspaces
</p>
1875 <h4 class=
"constants">Constants
</h4>
1877 <dt>PPD_CS_CMY
</dt>
1878 <dd class=
"description">CMY colorspace
</dd>
1879 <dt>PPD_CS_CMYK
</dt>
1880 <dd class=
"description">CMYK colorspace
</dd>
1881 <dt>PPD_CS_GRAY
</dt>
1882 <dd class=
"description">Grayscale colorspace
</dd>
1884 <dd class=
"description">DeviceN colorspace
</dd>
1885 <dt>PPD_CS_RGB
</dt>
1886 <dd class=
"description">RGB colorspace
</dd>
1887 <dt>PPD_CS_RGBK
</dt>
1888 <dd class=
"description">RGBK (K = gray) colorspace
</dd>
1890 <h3 class=
"enumeration"><a name=
"ppd_section_e">ppd_section_e
</a></h3>
1891 <p class=
"description">Order dependency sections
</p>
1892 <h4 class=
"constants">Constants
</h4>
1894 <dt>PPD_ORDER_ANY
</dt>
1895 <dd class=
"description">Option code can be anywhere in the file
</dd>
1896 <dt>PPD_ORDER_DOCUMENT
</dt>
1897 <dd class=
"description">... must be in the DocumentSetup section
</dd>
1898 <dt>PPD_ORDER_EXIT
</dt>
1899 <dd class=
"description">... must be sent prior to the document
</dd>
1900 <dt>PPD_ORDER_JCL
</dt>
1901 <dd class=
"description">... must be sent as a JCL command
</dd>
1902 <dt>PPD_ORDER_PAGE
</dt>
1903 <dd class=
"description">... must be in the PageSetup section
</dd>
1904 <dt>PPD_ORDER_PROLOG
</dt>
1905 <dd class=
"description">... must be in the Prolog section
</dd>
1907 <h3 class=
"enumeration"><a name=
"ppd_status_e">ppd_status_e
</a></h3>
1908 <p class=
"description">Types and structures...
</p>
1909 <h4 class=
"constants">Constants
</h4>
1911 <dt>PPD_ALLOC_ERROR
</dt>
1912 <dd class=
"description">Memory allocation error
</dd>
1913 <dt>PPD_BAD_CUSTOM_PARAM
</dt>
1914 <dd class=
"description">Bad custom parameter
</dd>
1915 <dt>PPD_BAD_OPEN_GROUP
</dt>
1916 <dd class=
"description">Bad OpenGroup
</dd>
1917 <dt>PPD_BAD_OPEN_UI
</dt>
1918 <dd class=
"description">Bad OpenUI/JCLOpenUI
</dd>
1919 <dt>PPD_BAD_ORDER_DEPENDENCY
</dt>
1920 <dd class=
"description">Bad OrderDependency
</dd>
1921 <dt>PPD_BAD_UI_CONSTRAINTS
</dt>
1922 <dd class=
"description">Bad UIConstraints
</dd>
1923 <dt>PPD_FILE_OPEN_ERROR
</dt>
1924 <dd class=
"description">Unable to open PPD file
</dd>
1925 <dt>PPD_ILLEGAL_CHARACTER
</dt>
1926 <dd class=
"description">Illegal control character
</dd>
1927 <dt>PPD_ILLEGAL_MAIN_KEYWORD
</dt>
1928 <dd class=
"description">Illegal main keyword string
</dd>
1929 <dt>PPD_ILLEGAL_OPTION_KEYWORD
</dt>
1930 <dd class=
"description">Illegal option keyword string
</dd>
1931 <dt>PPD_ILLEGAL_TRANSLATION
</dt>
1932 <dd class=
"description">Illegal translation string
</dd>
1933 <dt>PPD_ILLEGAL_WHITESPACE
</dt>
1934 <dd class=
"description">Illegal whitespace character
</dd>
1935 <dt>PPD_INTERNAL_ERROR
</dt>
1936 <dd class=
"description">Internal error
</dd>
1937 <dt>PPD_LINE_TOO_LONG
</dt>
1938 <dd class=
"description">Line longer than
255 chars
</dd>
1939 <dt>PPD_MISSING_ASTERISK
</dt>
1940 <dd class=
"description">Missing asterisk in column
0</dd>
1941 <dt>PPD_MISSING_PPDADOBE4
</dt>
1942 <dd class=
"description">Missing PPD-Adobe-
4.x header
</dd>
1943 <dt>PPD_MISSING_VALUE
</dt>
1944 <dd class=
"description">Missing value string
</dd>
1945 <dt>PPD_NESTED_OPEN_GROUP
</dt>
1946 <dd class=
"description">OpenGroup without a CloseGroup first
</dd>
1947 <dt>PPD_NESTED_OPEN_UI
</dt>
1948 <dd class=
"description">OpenUI/JCLOpenUI without a CloseUI/JCLCloseUI first
</dd>
1949 <dt>PPD_NULL_FILE
</dt>
1950 <dd class=
"description">NULL PPD file pointer
</dd>
1952 <dd class=
"description">OK
</dd>
1954 <h3 class=
"enumeration"><a name=
"ppd_ui_e">ppd_ui_e
</a></h3>
1955 <p class=
"description">UI Types
</p>
1956 <h4 class=
"constants">Constants
</h4>
1958 <dt>PPD_UI_BOOLEAN
</dt>
1959 <dd class=
"description">True or False option
</dd>
1960 <dt>PPD_UI_PICKMANY
</dt>
1961 <dd class=
"description">Pick zero or more from a list
</dd>
1962 <dt>PPD_UI_PICKONE
</dt>
1963 <dd class=
"description">Pick one from a list
</dd>