3 <!-- SECTION: Programming -->
5 <title>PPD API (DEPRECATED)
</title>
6 <meta name=
"keywords" content=
"Programming">
7 <meta http-equiv=
"Content-Type" content=
"text/html;charset=utf-8">
8 <meta name=
"creator" content=
"codedoc v3.2">
9 <meta name=
"author" content=
"Unknown">
10 <meta name=
"copyright" content=
"Unknown">
11 <meta name=
"version" content=
"0.0">
12 <style type=
"text/css"><!--
14 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
17 H1, H2, H3, H4, H5, H6, P, TD, TH {
18 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
21 H1 { font-size: 2em; }
22 H2 { font-size: 1.75em; }
23 H3 { font-size: 1.5em; }
24 H4 { font-size: 1.25em; }
27 font-family: monaco, courier, monospace;
32 font-family: monaco, courier, monospace;
36 border-left: solid 2px #777;
45 PRE.command, PRE.example {
72 PRE.command EM, PRE.example EM {
73 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
77 font-family: monaco, courier, monospace;
93 -moz-border-radius: 10px;
98 text-decoration: none;
101 A:link:hover, A:visited:hover, A:active {
102 text-decoration: underline;
109 TR.data, TD.data, TR.data TD {
112 border-bottom: solid 1pt #999999;
116 border-bottom: solid 1pt #999999;
123 border: solid thin #999999;
124 border-collapse: collapse;
140 border: solid thin #cccccc;
147 border-bottom: solid thin #999999;
156 caption-side: bottom;
180 border: thin solid black;
188 H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
197 border-bottom: solid 2pt #000000;
200 DIV.indent, TABLE.indent {
208 border-collapse: collapse;
211 TABLE.indent TD, TABLE.indent TH {
216 border-collapse: collapse;
224 border-bottom: solid thin #cccccc;
229 vertical-align: bottom;
238 border-bottom: solid thin #eeeeee;
243 TABLE.list TR:nth-child(even) {
247 TABLE.list TR:nth-child(odd) {
266 font-family: monaco, courier, monospace;
270 border: solid thin #999999;
271 border-collapse: collapse;
276 DIV.summary TABLE TD, DIV.summary TABLE TH {
277 border: solid thin #999999;
283 DIV.summary TABLE THEAD TH {
287 /* API documentation styles... */
299 margin-bottom: 0.5em;
304 margin-bottom: 0.5em;
309 margin-bottom: 0.5em;
314 border: solid thin black;
323 div.contents ul.contents {
327 border-bottom: solid 2px gray;
337 border-bottom: solid 2px gray;
340 border-bottom: solid 2px gray;
352 border-bottom: solid 2px gray;
355 border-bottom: solid 2px gray;
358 border-bottom: solid 2px gray;
362 h1, h2, h3, h4, h5, h6 {
363 page-break-inside: avoid;
366 border: solid thin gray;
367 box-shadow: 3px 3px 5px rgba(0,0,0,0.5);
368 padding: 10px 10px 0px;
369 page-break-inside: avoid;
371 p code, li code, p.code, pre, ul.code li {
372 background: rgba(127,127,127,0.1);
373 border: thin dotted gray;
374 font-family: monospace;
376 -webkit-hyphens: manual;
377 page-break-inside: avoid;
379 p.code, pre, ul.code li {
386 text-decoration: none;
390 border: solid thin black;
397 h2 span.info, h3 span.info, h4 span.info {
403 h2.title span.info, h3.title span.info, h4.title span.info {
404 border-bottom-left-radius: 0px;
405 border-bottom-right-radius: 0px;
410 ul.code, ul.contents, ul.subcontents {
411 list-style-type: none;
421 ul.contents li ul.code, ul.contents li ul.subcontents {
425 border-collapse: collapse;
428 table.list tr:nth-child(even) {
429 background: rgba(127,127,127,0.1);]n}
431 border-right: 2px solid gray;
432 font-family: monospace;
433 padding: 5px 10px 5px 2px;
438 padding: 5px 2px 5px 10px;
445 border-bottom: solid 2px black;
448 border-bottom: solid 2px black;
455 PPD API header for CUPS.
457 Copyright © 2008-2019 by Apple Inc.
459 Licensed under Apache License v2.0. See the file "LICENSE" for more
463 <h1 class='title'
>PPD API (DEPRECATED)
</h1>
465 <blockquote><b>Note:
</b>
467 <p>The PPD API was deprecated in CUPS
1.6/macOS
10.8. Please use the new Job Ticket APIs in the
<a href=
"cupspm.html">CUPS Programming Manual
</a> documentation. These functions will be removed in a future release of CUPS.
</p>
470 <div class='summary'
><table summary='General Information'
>
484 <td>Programming:
<a href='api-overview.html' target='_top'
>Introduction to CUPS Programming
</a><br>
485 Programming:
<a href='cupspm.html' target='_top'
>CUPS Programming Manual
</a><br>
486 Specifications:
<a href='spec-ppd.html' target='_top'
>CUPS PPD Extensions
</a></td>
491 <div class=
"contents">
492 <h2 class=
"title">Contents
</h2>
493 <ul class=
"contents">
494 <li><a href=
"#OVERVIEW">Overview
</a><ul class=
"subcontents">
495 <li><a href=
"#LOADING">Loading a PPD File
</a></li>
496 <li><a href=
"#OPTIONS_AND_GROUPS">Options and Groups
</a></li>
497 <li><a href=
"#CONSTRAINTS">Constraints
</a></li>
498 <li><a href=
"#PAGE_SIZES">Page Sizes
</a></li>
499 <li><a href=
"#ATTRIBUTES">Attributes
</a></li>
501 <li><a href=
"#FUNCTIONS">Functions
</a><ul class=
"subcontents">
502 <li><a href=
"#cupsGetConflicts">cupsGetConflicts
</a></li>
503 <li><a href=
"#cupsGetPPD">cupsGetPPD
</a></li>
504 <li><a href=
"#cupsGetPPD2">cupsGetPPD2
</a></li>
505 <li><a href=
"#cupsGetPPD3">cupsGetPPD3
</a></li>
506 <li><a href=
"#cupsGetServerPPD">cupsGetServerPPD
</a></li>
507 <li><a href=
"#cupsMarkOptions">cupsMarkOptions
</a></li>
508 <li><a href=
"#cupsRasterInterpretPPD">cupsRasterInterpretPPD
</a></li>
509 <li><a href=
"#cupsResolveConflicts">cupsResolveConflicts
</a></li>
510 <li><a href=
"#ppdCollect">ppdCollect
</a></li>
511 <li><a href=
"#ppdCollect2">ppdCollect2
</a></li>
512 <li><a href=
"#ppdConflicts">ppdConflicts
</a></li>
513 <li><a href=
"#ppdEmit">ppdEmit
</a></li>
514 <li><a href=
"#ppdEmitAfterOrder">ppdEmitAfterOrder
</a></li>
515 <li><a href=
"#ppdEmitFd">ppdEmitFd
</a></li>
516 <li><a href=
"#ppdEmitJCL">ppdEmitJCL
</a></li>
517 <li><a href=
"#ppdEmitJCLEnd">ppdEmitJCLEnd
</a></li>
518 <li><a href=
"#ppdEmitString">ppdEmitString
</a></li>
519 <li><a href=
"#ppdFindAttr">ppdFindAttr
</a></li>
520 <li><a href=
"#ppdFindChoice">ppdFindChoice
</a></li>
521 <li><a href=
"#ppdFindCustomOption">ppdFindCustomOption
</a></li>
522 <li><a href=
"#ppdFindCustomParam">ppdFindCustomParam
</a></li>
523 <li><a href=
"#ppdFindMarkedChoice">ppdFindMarkedChoice
</a></li>
524 <li><a href=
"#ppdFindNextAttr">ppdFindNextAttr
</a></li>
525 <li><a href=
"#ppdFindOption">ppdFindOption
</a></li>
526 <li><a href=
"#ppdFirstCustomParam">ppdFirstCustomParam
</a></li>
527 <li><a href=
"#ppdFirstOption">ppdFirstOption
</a></li>
528 <li><a href=
"#ppdInstallableConflict">ppdInstallableConflict
</a></li>
529 <li><a href=
"#ppdIsMarked">ppdIsMarked
</a></li>
530 <li><a href=
"#ppdLocalize">ppdLocalize
</a></li>
531 <li><a href=
"#ppdLocalizeAttr">ppdLocalizeAttr
</a></li>
532 <li><a href=
"#ppdLocalizeIPPReason">ppdLocalizeIPPReason
</a></li>
533 <li><a href=
"#ppdLocalizeMarkerName">ppdLocalizeMarkerName
</a></li>
534 <li><a href=
"#ppdMarkDefaults">ppdMarkDefaults
</a></li>
535 <li><a href=
"#ppdMarkOption">ppdMarkOption
</a></li>
536 <li><a href=
"#ppdNextCustomParam">ppdNextCustomParam
</a></li>
537 <li><a href=
"#ppdNextOption">ppdNextOption
</a></li>
538 <li><a href=
"#ppdPageLength">ppdPageLength
</a></li>
539 <li><a href=
"#ppdPageSize">ppdPageSize
</a></li>
540 <li><a href=
"#ppdPageSizeLimits">ppdPageSizeLimits
</a></li>
541 <li><a href=
"#ppdPageWidth">ppdPageWidth
</a></li>
543 <li><a href=
"#TYPES">Data Types
</a><ul class=
"subcontents">
544 <li><a href=
"#cups_interpret_cb_t">cups_interpret_cb_t
</a></li>
545 <li><a href=
"#ppd_attr_t">ppd_attr_t
</a></li>
546 <li><a href=
"#ppd_choice_t">ppd_choice_t
</a></li>
547 <li><a href=
"#ppd_conform_t">ppd_conform_t
</a></li>
548 <li><a href=
"#ppd_const_t">ppd_const_t
</a></li>
549 <li><a href=
"#ppd_coption_t">ppd_coption_t
</a></li>
550 <li><a href=
"#ppd_cparam_t">ppd_cparam_t
</a></li>
551 <li><a href=
"#ppd_cplimit_t">ppd_cplimit_t
</a></li>
552 <li><a href=
"#ppd_cptype_t">ppd_cptype_t
</a></li>
553 <li><a href=
"#ppd_cpvalue_t">ppd_cpvalue_t
</a></li>
554 <li><a href=
"#ppd_cs_t">ppd_cs_t
</a></li>
555 <li><a href=
"#ppd_emul_t">ppd_emul_t
</a></li>
556 <li><a href=
"#ppd_file_t">ppd_file_t
</a></li>
557 <li><a href=
"#ppd_group_t">ppd_group_t
</a></li>
558 <li><a href=
"#ppd_option_t">ppd_option_t
</a></li>
559 <li><a href=
"#ppd_profile_t">ppd_profile_t
</a></li>
560 <li><a href=
"#ppd_section_t">ppd_section_t
</a></li>
561 <li><a href=
"#ppd_size_t">ppd_size_t
</a></li>
562 <li><a href=
"#ppd_status_t">ppd_status_t
</a></li>
563 <li><a href=
"#ppd_ui_t">ppd_ui_t
</a></li>
565 <li><a href=
"#STRUCTURES">Structures
</a><ul class=
"subcontents">
566 <li><a href=
"#ppd_attr_s">ppd_attr_s
</a></li>
567 <li><a href=
"#ppd_choice_s">ppd_choice_s
</a></li>
568 <li><a href=
"#ppd_const_s">ppd_const_s
</a></li>
569 <li><a href=
"#ppd_coption_s">ppd_coption_s
</a></li>
570 <li><a href=
"#ppd_cparam_s">ppd_cparam_s
</a></li>
571 <li><a href=
"#ppd_emul_s">ppd_emul_s
</a></li>
572 <li><a href=
"#ppd_file_s">ppd_file_s
</a></li>
573 <li><a href=
"#ppd_group_s">ppd_group_s
</a></li>
574 <li><a href=
"#ppd_option_s">ppd_option_s
</a></li>
575 <li><a href=
"#ppd_profile_s">ppd_profile_s
</a></li>
576 <li><a href=
"#ppd_size_s">ppd_size_s
</a></li>
578 <li><a href=
"#UNIONS">Unions
</a><ul class=
"subcontents">
579 <li><a href=
"#ppd_cplimit_u">ppd_cplimit_u
</a></li>
580 <li><a href=
"#ppd_cpvalue_u">ppd_cpvalue_u
</a></li>
582 <li><a href=
"#ENUMERATIONS">Enumerations
</a><ul class=
"subcontents">
583 <li><a href=
"#ppd_conform_e">ppd_conform_e
</a></li>
584 <li><a href=
"#ppd_cptype_e">ppd_cptype_e
</a></li>
585 <li><a href=
"#ppd_cs_e">ppd_cs_e
</a></li>
586 <li><a href=
"#ppd_section_e">ppd_section_e
</a></li>
587 <li><a href=
"#ppd_status_e">ppd_status_e
</a></li>
588 <li><a href=
"#ppd_ui_e">ppd_ui_e
</a></li>
594 PPD API introduction for CUPS.
596 Copyright © 2007-2019 by Apple Inc.
597 Copyright © 1997-2006 by Easy Software Products, all rights reserved.
599 Licensed under Apache License v2.0. See the file "LICENSE" for more
603 <h2 class='title'
><a name='OVERVIEW'
>Overview
</a></h2>
605 <blockquote><b>Note:
</b>
607 <p>The PPD API was deprecated in CUPS
1.6/macOS
10.8. Please use the new Job Ticket APIs in the
<a href=
"cupspm.html">CUPS Programming Manual
</a> documentation. These functions will be removed in a future release of CUPS.
</p>
610 <p>The CUPS PPD API provides read-only access the data in PostScript Printer
611 Description (
"PPD") files which are used for all printers with a driver. With
612 it you can obtain the data necessary to display printer options to users, mark
613 option choices and check for conflicting choices, and output marked choices in
614 PostScript output. The
<a href=
"#ppd_file_t"><code>ppd_file_t
</code></a>
615 structure contains all of the information in a PPD file.
</p>
617 <blockquote><b>Note:
</b>
619 <p>The CUPS PPD API uses the terms
"option" and
"choice" instead of the Adobe
620 terms
"MainKeyword" and
"OptionKeyword" to refer to specific printer options and
621 features. CUPS also treats option (
"MainKeyword") and choice (
"OptionKeyword")
622 values as case-insensitive strings, so option
"InputSlot" and choice
"Upper"
623 are equivalent to
"inputslot" and
"upper", respectively.
</p>
627 <h3><a name=
"LOADING">Loading a PPD File
</a></h3>
629 <p>The
<a href=
"#ppdOpenFile"><code>ppdOpenFile
</code></a> function
"opens" a
630 PPD file and loads it into memory. For example, the following code opens the
631 current printer's PPD file in a CUPS filter:
</p>
633 <pre class=
"example">
634 #include
<cups/ppd.h
>
636 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd =
<a href=
"#ppdOpenFile">ppdOpenFile
</a>(getenv(
"PPD"));
639 <p>The return value is a pointer to a new
640 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure or
<code>NULL
</code>
641 if the PPD file does not exist or cannot be loaded. The
642 <a href=
"#ppdClose"><code>ppdClose
</code></a> function frees the memory used
643 by the structure:
</p>
645 <pre class=
"example">
646 #include
<cups/ppd.h
>
648 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
650 <a href=
"#ppdClose">ppdClose
</a>(ppd);
653 <p>Once closed, pointers to the
<a href=
"#ppd_file_t"><code>ppd_file_t
</code></a>
654 structure and any data in it will no longer be valid.
</p>
656 <h3><a name=
"OPTIONS_AND_GROUPS">Options and Groups
</a></h3>
658 <p>PPD files support multiple options, which are stored in arrays of
659 <a href=
"#ppd_option_t"><code>ppd_option_t
</code></a> and
660 <a href=
"#ppd_choice_t"><code>ppd_choice_t
</code></a> structures.
</p>
662 <p>Each option in turn is associated with a group stored in a
663 <a href=
"#ppd_group_t"><code>ppd_group_t
</code></a> structure. Groups can be
664 specified in the PPD file; if an option is not associated with a group
665 then it is put in an automatically-generated
"General" group. Groups can also
666 have sub-groups, however CUPS currently ignores sub-groups because of past
667 abuses of this functionality.
</p>
669 <p>Option choices are selected by marking them using one of three functions. The
670 first is
<a href=
"#ppdMarkDefaults"><code>ppdMarkDefaults
</code></a> which
671 selects all of the default options in the PPD file:
</p>
673 <pre class=
"example">
674 #include
<cups/ppd.h
>
676 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
678 <a href=
"#ppdMarkDefaults">ppdMarkDefaults
</a>(ppd);
681 <p>The second is
<a href=
"#ppdMarkOption"><code>ppdMarkOption
</code></a>
682 which selects a single option choice in the PPD file. For example, the following
683 code selects the upper paper tray:
</p>
685 <pre class=
"example">
686 #include
<cups/ppd.h
>
688 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
690 <a href=
"#ppdMarkOption">ppdMarkOption
</a>(ppd,
"InputSlot",
"Upper");
693 <p>The last function is
694 <a href=
"#cupsMarkOptions"><code>cupsMarkOptions
</code></a> which selects
695 multiple option choices in the PPD file from an array of CUPS options, mapping
696 IPP attributes like
"media" and
"sides" to their corresponding PPD options. You
697 typically use this function in a print filter with
698 <code>cupsParseOptions
</code> and
699 <a href=
"#ppdMarkDefaults"><code>ppdMarkDefaults
</code></a> to select all of
700 the option choices needed for the job, for example:
</p>
702 <pre class=
"example">
703 #include
<cups/ppd.h
>
705 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd =
<a href=
"#ppdOpenFile">ppdOpenFile
</a>(getenv(
"PPD"));
706 cups_option_t *options = NULL;
707 int num_options = cupsParseOptions(argv[
5],
0,
&options);
709 <a href=
"#ppdMarkDefaults">ppdMarkDefaults
</a>(ppd);
710 <a href=
"#cupsMarkOptions">cupsMarkOptions
</a>(ppd, num_options, options);
711 cupsFreeOptions(num_options, options);
715 <h3><a name=
"CONSTRAINTS">Constraints
</a></h3>
717 <p>PPD files support specification of conflict conditions, called
718 constraints, between different options. Constraints are stored in an array of
719 <a href=
"#ppd_const_t"><code>ppd_const_t
</code></a> structures which specify
720 the options and choices that conflict with each other. The
721 <a href=
"#ppdConflicts"><code>ppdConflicts
</code></a> function tells you
722 how many of the selected options are incompatible. Since constraints are
723 normally specified in pairs, the returned value is typically an even number.
</p>
726 <h3><a name=
"PAGE_SIZES">Page Sizes
</a></h3>
728 <p>Page sizes are special options which have physical dimensions and margins
729 associated with them. The size information is stored in
730 <a href=
"#ppd_size_t"><code>ppd_size_t
</code></a> structures and is available
731 by looking up the named size with the
732 <a href=
"#ppdPageSize"><code>ppdPageSize
</code></a> function. The page size and
733 margins are returned in units called points; there are
72 points per inch. If
734 you pass
<code>NULL
</code> for the size, the currently selected size is
737 <pre class=
"example">
738 #include
<cups/ppd.h
>
740 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
741 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd, NULL);
744 <p>Besides the standard page sizes listed in a PPD file, some printers
745 support variable or custom page sizes. Custom page sizes are supported if the
746 <code>variables_sizes
</code> member of the
747 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure is non-zero.
748 The
<code>custom_min
</code>,
<code>custom_max
</code>, and
749 <code>custom_margins
</code> members of the
750 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure define the limits
751 of the printable area. To get the resulting media size, use a page size string
752 of the form
"Custom.<I>width</I>x<I>length</I>", where
"width" and
"length" are
753 in points. Custom page size names can also be specified in inches
754 (
"Custom.<i>width</i>x<i>height</i>in"), centimeters
755 (
"Custom.<i>width</i>x<i>height</i>cm"), or millimeters
756 (
"Custom.<i>width</i>x<i>height</i>mm"):
</p>
758 <pre class=
"example">
759 #include
<cups/ppd.h
>
761 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
763 /* Get an
576x720 point custom page size */
764 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.576x720");
766 /* Get an
8x10 inch custom page size */
767 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.8x10in");
769 /* Get a
100x200 millimeter custom page size */
770 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.100x200mm");
772 /* Get a
12.7x34.5 centimeter custom page size */
773 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.12.7x34.5cm");
776 <p>If the PPD does not support variable page sizes, the
777 <a href=
"#ppdPageSize"><code>ppdPageSize
</code></a> function will return
778 <code>NULL
</code>.
</p>
781 <h3><a name=
"ATTRIBUTES">Attributes
</a></h3>
783 <p>Every PPD file is composed of one or more attributes. Most of these
784 attributes are used to define groups, options, choices, and page sizes,
785 however several informational attributes may be present which you can access
786 in your program or filter. Attributes normally look like one of the following
787 examples in a PPD file:
</p>
789 <pre class=
"example">
792 *name spec/text:
"value"
795 <p>The
<a href=
"#ppdFindAttr"><code>ppdFindAttr
</code></a> and
796 <a href=
"#ppdFindNextAttr"><code>ppdFindNextAttr
</code></a> functions find the
797 first and next instances, respectively, of the named attribute with the given
798 "spec" string and return a
<a href=
"#ppd_attr_t"><code>ppd_attr_t
</code></a>
799 structure. If you provide a NULL specifier string, all attributes with the
800 given name will be returned. For example, the following code lists all of the
801 <code>Product
</code> attributes in a PPD file:
</p>
803 <pre class=
"example">
804 #include
<cups/ppd.h
>
806 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
807 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *attr;
809 for (attr =
<a href=
"#ppdFindAttr">ppdFindAttr
</a>(ppd,
"Product", NULL);
811 attr =
<a href=
"#ppdFindNextAttr">ppdFindNextAttr
</a>(ppd,
"Product", NULL))
814 <h2 class=
"title"><a id=
"FUNCTIONS">Functions
</a></h2>
815 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"cupsGetConflicts">cupsGetConflicts
</a></h3>
816 <p class=
"description">Get a list of conflicting options in a marked PPD.
</p>
818 int cupsGetConflicts(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd, const char *option, const char *choice, cups_option_t **options);
</p>
819 <h4 class=
"parameters">Parameters
</h4>
820 <table class=
"list"><tbody>
822 <td class=
"description">PPD file
</td></tr>
824 <td class=
"description">Option to test
</td></tr>
826 <td class=
"description">Choice to test
</td></tr>
828 <td class=
"description">Conflicting options
</td></tr>
830 <h4 class=
"returnvalue">Return Value
</h4>
831 <p class=
"description">Number of conflicting options
</p>
832 <h4 class=
"discussion">Discussion
</h4>
833 <p class=
"discussion">This function gets a list of options that would conflict if
"option
" and
834 "choice
" were marked in the PPD. You would typically call this function
835 after marking the currently selected options in the PPD in order to
836 determine whether a new option selection would cause a conflict.
<br>
838 The number of conflicting options are returned with
"options
" pointing to
839 the conflicting options. The returned option array must be freed using
840 <a href=
"#cupsFreeOptions"><code>cupsFreeOptions
</code></a>.
843 <h3 class=
"function"><a id=
"cupsGetPPD">cupsGetPPD
</a></h3>
844 <p class=
"description">Get the PPD file for a printer on the default server.
</p>
846 const char *cupsGetPPD(const char *name);
</p>
847 <h4 class=
"parameters">Parameters
</h4>
848 <table class=
"list"><tbody>
850 <td class=
"description">Destination name
</td></tr>
852 <h4 class=
"returnvalue">Return Value
</h4>
853 <p class=
"description">Filename for PPD file
</p>
854 <h4 class=
"discussion">Discussion
</h4>
855 <p class=
"discussion">For classes,
<code>cupsGetPPD
</code> returns the PPD file for the first printer
858 The returned filename is stored in a static buffer and is overwritten with
859 each call to
<code>cupsGetPPD
</code> or
<a href=
"#cupsGetPPD2"><code>cupsGetPPD2
</code></a>. The caller
"owns
" the
860 file that is created and must
<code>unlink
</code> the returned filename.
</p>
861 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/macOS
10.4 </span><a id=
"cupsGetPPD2">cupsGetPPD2
</a></h3>
862 <p class=
"description">Get the PPD file for a printer from the specified server.
</p>
864 const char *cupsGetPPD2(http_t *http, const char *name);
</p>
865 <h4 class=
"parameters">Parameters
</h4>
866 <table class=
"list"><tbody>
868 <td class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></td></tr>
870 <td class=
"description">Destination name
</td></tr>
872 <h4 class=
"returnvalue">Return Value
</h4>
873 <p class=
"description">Filename for PPD file
</p>
874 <h4 class=
"discussion">Discussion
</h4>
875 <p class=
"discussion">For classes,
<code>cupsGetPPD2
</code> returns the PPD file for the first printer
878 The returned filename is stored in a static buffer and is overwritten with
879 each call to
<a href=
"#cupsGetPPD"><code>cupsGetPPD
</code></a> or
<code>cupsGetPPD2
</code>. The caller
"owns
" the
880 file that is created and must
<code>unlink
</code> the returned filename.
883 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"cupsGetPPD3">cupsGetPPD3
</a></h3>
884 <p class=
"description">Get the PPD file for a printer on the specified
885 server if it has changed.
</p>
887 http_status_t cupsGetPPD3(http_t *http, const char *name, time_t *modtime, char *buffer, size_t bufsize);
</p>
888 <h4 class=
"parameters">Parameters
</h4>
889 <table class=
"list"><tbody>
891 <td class=
"description">HTTP connection or
<code>CUPS_HTTP_DEFAULT
</code></td></tr>
893 <td class=
"description">Destination name
</td></tr>
895 <td class=
"description">Modification time
</td></tr>
897 <td class=
"description">Filename buffer
</td></tr>
899 <td class=
"description">Size of filename buffer
</td></tr>
901 <h4 class=
"returnvalue">Return Value
</h4>
902 <p class=
"description">HTTP status
</p>
903 <h4 class=
"discussion">Discussion
</h4>
904 <p class=
"discussion">The
"modtime
" parameter contains the modification time of any
905 locally-cached content and is updated with the time from the PPD file on
908 The
"buffer
" parameter contains the local PPD filename. If it contains
909 the empty string, a new temporary file is created, otherwise the existing
910 file will be overwritten as needed. The caller
"owns
" the file that is
911 created and must
<code>unlink
</code> the returned filename.
<br>
913 On success,
<code>HTTP_STATUS_OK
</code> is returned for a new PPD file and
914 <code>HTTP_STATUS_NOT_MODIFIED
</code> if the existing PPD file is up-to-date. Any other
915 status is an error.
<br>
917 For classes,
<code>cupsGetPPD3
</code> returns the PPD file for the first printer
921 <h3 class=
"function"><span class=
"info"> CUPS
1.3/macOS
10.5 </span><a id=
"cupsGetServerPPD">cupsGetServerPPD
</a></h3>
922 <p class=
"description">Get an available PPD file from the server.
</p>
924 char *cupsGetServerPPD(http_t *http, const char *name);
</p>
925 <h4 class=
"parameters">Parameters
</h4>
926 <table class=
"list"><tbody>
928 <td class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></td></tr>
930 <td class=
"description">Name of PPD file (
"ppd-name
")
</td></tr>
932 <h4 class=
"returnvalue">Return Value
</h4>
933 <p class=
"description">Name of PPD file or
<code>NULL
</code> on error
</p>
934 <h4 class=
"discussion">Discussion
</h4>
935 <p class=
"discussion">This function returns the named PPD file from the server. The
936 list of available PPDs is provided by the IPP
<code>CUPS_GET_PPDS
</code>
939 You must remove (unlink) the PPD file when you are finished with
940 it. The PPD filename is stored in a static location that will be
941 overwritten on the next call to
<a href=
"#cupsGetPPD"><code>cupsGetPPD
</code></a>,
<a href=
"#cupsGetPPD2"><code>cupsGetPPD2
</code></a>,
942 or
<a href=
"#cupsGetServerPPD"><code>cupsGetServerPPD
</code></a>.
945 <h3 class=
"function"><a id=
"cupsMarkOptions">cupsMarkOptions
</a></h3>
946 <p class=
"description">Mark command-line options in a PPD file.
</p>
948 int cupsMarkOptions(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd, int num_options, cups_option_t *options);
</p>
949 <h4 class=
"parameters">Parameters
</h4>
950 <table class=
"list"><tbody>
952 <td class=
"description">PPD file
</td></tr>
953 <tr><th>num_options
</th>
954 <td class=
"description">Number of options
</td></tr>
956 <td class=
"description">Options
</td></tr>
958 <h4 class=
"returnvalue">Return Value
</h4>
959 <p class=
"description">1 if conflicts exist,
0 otherwise
</p>
960 <h4 class=
"discussion">Discussion
</h4>
961 <p class=
"discussion">This function maps the IPP
"finishings
",
"media
",
"mirror
",
962 "multiple-document-handling
",
"output-bin
",
"print-color-mode
",
963 "print-quality
",
"printer-resolution
", and
"sides
" attributes to their
964 corresponding PPD options and choices.
</p>
965 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"cupsRasterInterpretPPD">cupsRasterInterpretPPD
</a></h3>
966 <p class=
"description">Interpret PPD commands to create a page header.
</p>
968 int cupsRasterInterpretPPD(cups_page_header2_t *h,
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd, int num_options, cups_option_t *options,
<a href=
"#cups_interpret_cb_t">cups_interpret_cb_t
</a> func);
</p>
969 <h4 class=
"parameters">Parameters
</h4>
970 <table class=
"list"><tbody>
972 <td class=
"description">Page header to create
</td></tr>
974 <td class=
"description">PPD file
</td></tr>
975 <tr><th>num_options
</th>
976 <td class=
"description">Number of options
</td></tr>
978 <td class=
"description">Options
</td></tr>
980 <td class=
"description">Optional page header callback (
<code>NULL
</code> for none)
</td></tr>
982 <h4 class=
"returnvalue">Return Value
</h4>
983 <p class=
"description">0 on success, -
1 on failure
</p>
984 <h4 class=
"discussion">Discussion
</h4>
985 <p class=
"discussion">This function is used by raster image processing (RIP) filters like
986 cgpdftoraster and imagetoraster when writing CUPS raster data for a page.
987 It is not used by raster printer driver filters which only read CUPS
991 <code>cupsRasterInterpretPPD
</code> does not mark the options in the PPD using
992 the
"num_options
" and
"options
" arguments. Instead, mark the options with
993 <code>cupsMarkOptions
</code> and
<code>ppdMarkOption
</code> prior to calling it -
994 this allows for per-page options without manipulating the options array.
<br>
996 The
"func
" argument specifies an optional callback function that is
997 called prior to the computation of the final raster data. The function
998 can make changes to the
<a href=
"#cups_page_header2_t"><code>cups_page_header2_t
</code></a> data as needed to use a
999 supported raster format and then returns
0 on success and -
1 if the
1000 requested attributes cannot be supported.
<br>
1003 <code>cupsRasterInterpretPPD
</code> supports a subset of the PostScript language.
1004 Currently only the
<code>[
</code>,
<code>]
</code>,
<code><<</code>,
<code>>></code>,
<code>{
</code>,
1005 <code>}
</code>,
<code>cleartomark
</code>,
<code>copy
</code>,
<code>dup
</code>,
<code>index
</code>,
1006 <code>pop
</code>,
<code>roll
</code>,
<code>setpagedevice
</code>, and
<code>stopped
</code> operators
1010 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"cupsResolveConflicts">cupsResolveConflicts
</a></h3>
1011 <p class=
"description">Resolve conflicts in a marked PPD.
</p>
1013 int cupsResolveConflicts(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd, const char *option, const char *choice, int *num_options, cups_option_t **options);
</p>
1014 <h4 class=
"parameters">Parameters
</h4>
1015 <table class=
"list"><tbody>
1017 <td class=
"description">PPD file
</td></tr>
1019 <td class=
"description">Newly selected option or
<code>NULL
</code> for none
</td></tr>
1021 <td class=
"description">Newly selected choice or
<code>NULL
</code> for none
</td></tr>
1022 <tr><th>num_options
</th>
1023 <td class=
"description">Number of additional selected options
</td></tr>
1024 <tr><th>options
</th>
1025 <td class=
"description">Additional selected options
</td></tr>
1027 <h4 class=
"returnvalue">Return Value
</h4>
1028 <p class=
"description">1 on success,
0 on failure
</p>
1029 <h4 class=
"discussion">Discussion
</h4>
1030 <p class=
"discussion">This function attempts to resolve any conflicts in a marked PPD, returning
1031 a list of option changes that are required to resolve them. On input,
1032 "num_options
" and
"options
" contain any pending option changes that have
1033 not yet been marked, while
"option
" and
"choice
" contain the most recent
1034 selection which may or may not be in
"num_options
" or
"options
".
<br>
1036 On successful return,
"num_options
" and
"options
" are updated to contain
1037 "option
" and
"choice
" along with any changes required to resolve conflicts
1038 specified in the PPD file and
1 is returned.
<br>
1040 If option conflicts cannot be resolved,
"num_options
" and
"options
" are not
1041 changed and
0 is returned.
<br>
1043 When resolving conflicts,
<code>cupsResolveConflicts
</code> does not consider
1044 changes to the current page size (
<code>media
</code>,
<code>PageSize
</code>, and
1045 <code>PageRegion
</code>) or to the most recent option specified in
"option
".
1046 Thus, if the only way to resolve a conflict is to change the page size
1047 or the option the user most recently changed,
<code>cupsResolveConflicts
</code>
1048 will return
0 to indicate it was unable to resolve the conflicts.
<br>
1050 The
<code>cupsResolveConflicts
</code> function uses one of two sources of option
1051 constraint information. The preferred constraint information is defined by
1052 <code>cupsUIConstraints
</code> and
<code>cupsUIResolver
</code> attributes - in this
1053 case, the PPD file provides constraint resolution actions.
<br>
1055 The backup constraint information is defined by the
1056 <code>UIConstraints
</code> and
<code>NonUIConstraints
</code> attributes. These
1057 constraints are resolved algorithmically by first selecting the default
1058 choice for the conflicting option, then iterating over all possible choices
1059 until a non-conflicting option choice is found.
1062 <h3 class=
"function"><a id=
"ppdCollect">ppdCollect
</a></h3>
1063 <p class=
"description">Collect all marked options that reside in the specified
1066 int ppdCollect(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<a href=
"#ppd_section_t">ppd_section_t
</a> section,
<a href=
"#ppd_choice_t">ppd_choice_t
</a> ***choices);
</p>
1067 <h4 class=
"parameters">Parameters
</h4>
1068 <table class=
"list"><tbody>
1070 <td class=
"description">PPD file data
</td></tr>
1071 <tr><th>section
</th>
1072 <td class=
"description">Section to collect
</td></tr>
1073 <tr><th>choices
</th>
1074 <td class=
"description">Pointers to choices
</td></tr>
1076 <h4 class=
"returnvalue">Return Value
</h4>
1077 <p class=
"description">Number of options marked
</p>
1078 <h4 class=
"discussion">Discussion
</h4>
1079 <p class=
"discussion">The choices array should be freed using
<code>free
</code> when you are
1080 finished with it.
</p>
1081 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppdCollect2">ppdCollect2
</a></h3>
1082 <p class=
"description">Collect all marked options that reside in the
1083 specified section and minimum order.
</p>
1085 int ppdCollect2(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<a href=
"#ppd_section_t">ppd_section_t
</a> section, float min_order,
<a href=
"#ppd_choice_t">ppd_choice_t
</a> ***choices);
</p>
1086 <h4 class=
"parameters">Parameters
</h4>
1087 <table class=
"list"><tbody>
1089 <td class=
"description">PPD file data
</td></tr>
1090 <tr><th>section
</th>
1091 <td class=
"description">Section to collect
</td></tr>
1092 <tr><th>min_order
</th>
1093 <td class=
"description">Minimum OrderDependency value
</td></tr>
1094 <tr><th>choices
</th>
1095 <td class=
"description">Pointers to choices
</td></tr>
1097 <h4 class=
"returnvalue">Return Value
</h4>
1098 <p class=
"description">Number of options marked
</p>
1099 <h4 class=
"discussion">Discussion
</h4>
1100 <p class=
"discussion">The choices array should be freed using
<code>free
</code> when you are
1104 <h3 class=
"function"><a id=
"ppdConflicts">ppdConflicts
</a></h3>
1105 <p class=
"description">Check to see if there are any conflicts among the
1106 marked option choices.
</p>
1108 int ppdConflicts(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd);
</p>
1109 <h4 class=
"parameters">Parameters
</h4>
1110 <table class=
"list"><tbody>
1112 <td class=
"description">PPD to check
</td></tr>
1114 <h4 class=
"returnvalue">Return Value
</h4>
1115 <p class=
"description">Number of conflicts found
</p>
1116 <h4 class=
"discussion">Discussion
</h4>
1117 <p class=
"discussion">The returned value is the same as returned by
<a href=
"#ppdMarkOption"><code>ppdMarkOption
</code></a>.
</p>
1118 <h3 class=
"function"><a id=
"ppdEmit">ppdEmit
</a></h3>
1119 <p class=
"description">Emit code for marked options to a file.
</p>
1121 int ppdEmit(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd, FILE *fp,
<a href=
"#ppd_section_t">ppd_section_t
</a> section);
</p>
1122 <h4 class=
"parameters">Parameters
</h4>
1123 <table class=
"list"><tbody>
1125 <td class=
"description">PPD file record
</td></tr>
1127 <td class=
"description">File to write to
</td></tr>
1128 <tr><th>section
</th>
1129 <td class=
"description">Section to write
</td></tr>
1131 <h4 class=
"returnvalue">Return Value
</h4>
1132 <p class=
"description">0 on success, -
1 on failure
</p>
1133 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppdEmitAfterOrder">ppdEmitAfterOrder
</a></h3>
1134 <p class=
"description">Emit a subset of the code for marked options to a file.
</p>
1136 int ppdEmitAfterOrder(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd, FILE *fp,
<a href=
"#ppd_section_t">ppd_section_t
</a> section, int limit, float min_order);
</p>
1137 <h4 class=
"parameters">Parameters
</h4>
1138 <table class=
"list"><tbody>
1140 <td class=
"description">PPD file record
</td></tr>
1142 <td class=
"description">File to write to
</td></tr>
1143 <tr><th>section
</th>
1144 <td class=
"description">Section to write
</td></tr>
1146 <td class=
"description">Non-zero to use min_order
</td></tr>
1147 <tr><th>min_order
</th>
1148 <td class=
"description">Lowest OrderDependency
</td></tr>
1150 <h4 class=
"returnvalue">Return Value
</h4>
1151 <p class=
"description">0 on success, -
1 on failure
</p>
1152 <h4 class=
"discussion">Discussion
</h4>
1153 <p class=
"discussion">When
"limit
" is non-zero, this function only emits options whose
1154 OrderDependency value is greater than or equal to
"min_order
".
<br>
1156 When
"limit
" is zero, this function is identical to ppdEmit().
1159 <h3 class=
"function"><a id=
"ppdEmitFd">ppdEmitFd
</a></h3>
1160 <p class=
"description">Emit code for marked options to a file.
</p>
1162 int ppdEmitFd(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd, int fd,
<a href=
"#ppd_section_t">ppd_section_t
</a> section);
</p>
1163 <h4 class=
"parameters">Parameters
</h4>
1164 <table class=
"list"><tbody>
1166 <td class=
"description">PPD file record
</td></tr>
1168 <td class=
"description">File to write to
</td></tr>
1169 <tr><th>section
</th>
1170 <td class=
"description">Section to write
</td></tr>
1172 <h4 class=
"returnvalue">Return Value
</h4>
1173 <p class=
"description">0 on success, -
1 on failure
</p>
1174 <h3 class=
"function"><a id=
"ppdEmitJCL">ppdEmitJCL
</a></h3>
1175 <p class=
"description">Emit code for JCL options to a file.
</p>
1177 int ppdEmitJCL(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd, FILE *fp, int job_id, const char *user, const char *title);
</p>
1178 <h4 class=
"parameters">Parameters
</h4>
1179 <table class=
"list"><tbody>
1181 <td class=
"description">PPD file record
</td></tr>
1183 <td class=
"description">File to write to
</td></tr>
1185 <td class=
"description">Job ID
</td></tr>
1187 <td class=
"description">Username
</td></tr>
1189 <td class=
"description">Title
</td></tr>
1191 <h4 class=
"returnvalue">Return Value
</h4>
1192 <p class=
"description">0 on success, -
1 on failure
</p>
1193 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppdEmitJCLEnd">ppdEmitJCLEnd
</a></h3>
1194 <p class=
"description">Emit JCLEnd code to a file.
</p>
1196 int ppdEmitJCLEnd(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd, FILE *fp);
</p>
1197 <h4 class=
"parameters">Parameters
</h4>
1198 <table class=
"list"><tbody>
1200 <td class=
"description">PPD file record
</td></tr>
1202 <td class=
"description">File to write to
</td></tr>
1204 <h4 class=
"returnvalue">Return Value
</h4>
1205 <p class=
"description">0 on success, -
1 on failure
</p>
1206 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppdEmitString">ppdEmitString
</a></h3>
1207 <p class=
"description">Get a string containing the code for marked options.
</p>
1209 char *ppdEmitString(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<a href=
"#ppd_section_t">ppd_section_t
</a> section, float min_order);
</p>
1210 <h4 class=
"parameters">Parameters
</h4>
1211 <table class=
"list"><tbody>
1213 <td class=
"description">PPD file record
</td></tr>
1214 <tr><th>section
</th>
1215 <td class=
"description">Section to write
</td></tr>
1216 <tr><th>min_order
</th>
1217 <td class=
"description">Lowest OrderDependency
</td></tr>
1219 <h4 class=
"returnvalue">Return Value
</h4>
1220 <p class=
"description">String containing option code or
<code>NULL
</code> if there is no option code
</p>
1221 <h4 class=
"discussion">Discussion
</h4>
1222 <p class=
"discussion">When
"min_order
" is greater than zero, this function only includes options
1223 whose OrderDependency value is greater than or equal to
"min_order
".
1224 Otherwise, all options in the specified section are included in the
1225 returned string.
<br>
1227 The return string is allocated on the heap and should be freed using
1228 <code>free
</code> when you are done with it.
1231 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a id=
"ppdFindAttr">ppdFindAttr
</a></h3>
1232 <p class=
"description">Find the first matching attribute.
</p>
1234 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *ppdFindAttr(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd, const char *name, const char *spec);
</p>
1235 <h4 class=
"parameters">Parameters
</h4>
1236 <table class=
"list"><tbody>
1238 <td class=
"description">PPD file data
</td></tr>
1240 <td class=
"description">Attribute name
</td></tr>
1242 <td class=
"description">Specifier string or
<code>NULL
</code></td></tr>
1244 <h4 class=
"returnvalue">Return Value
</h4>
1245 <p class=
"description">Attribute or
<code>NULL
</code> if not found
</p>
1246 <h3 class=
"function"><a id=
"ppdFindChoice">ppdFindChoice
</a></h3>
1247 <p class=
"description">Return a pointer to an option choice.
</p>
1249 <a href=
"#ppd_choice_t">ppd_choice_t
</a> *ppdFindChoice(
<a href=
"#ppd_option_t">ppd_option_t
</a> *o, const char *choice);
</p>
1250 <h4 class=
"parameters">Parameters
</h4>
1251 <table class=
"list"><tbody>
1253 <td class=
"description">Pointer to option
</td></tr>
1255 <td class=
"description">Name of choice
</td></tr>
1257 <h4 class=
"returnvalue">Return Value
</h4>
1258 <p class=
"description">Choice pointer or
<code>NULL
</code></p>
1259 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppdFindCustomOption">ppdFindCustomOption
</a></h3>
1260 <p class=
"description">Find a custom option.
</p>
1262 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *ppdFindCustomOption(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd, const char *keyword);
</p>
1263 <h4 class=
"parameters">Parameters
</h4>
1264 <table class=
"list"><tbody>
1266 <td class=
"description">PPD file
</td></tr>
1267 <tr><th>keyword
</th>
1268 <td class=
"description">Custom option name
</td></tr>
1270 <h4 class=
"returnvalue">Return Value
</h4>
1271 <p class=
"description">Custom option or NULL
</p>
1272 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppdFindCustomParam">ppdFindCustomParam
</a></h3>
1273 <p class=
"description">Find a parameter for a custom option.
</p>
1275 <a href=
"#ppd_cparam_t">ppd_cparam_t
</a> *ppdFindCustomParam(
<a href=
"#ppd_coption_t">ppd_coption_t
</a> *opt, const char *name);
</p>
1276 <h4 class=
"parameters">Parameters
</h4>
1277 <table class=
"list"><tbody>
1279 <td class=
"description">Custom option
</td></tr>
1281 <td class=
"description">Parameter name
</td></tr>
1283 <h4 class=
"returnvalue">Return Value
</h4>
1284 <p class=
"description">Custom parameter or NULL
</p>
1285 <h3 class=
"function"><a id=
"ppdFindMarkedChoice">ppdFindMarkedChoice
</a></h3>
1286 <p class=
"description">Return the marked choice for the specified option.
</p>
1288 <a href=
"#ppd_choice_t">ppd_choice_t
</a> *ppdFindMarkedChoice(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd, const char *option);
</p>
1289 <h4 class=
"parameters">Parameters
</h4>
1290 <table class=
"list"><tbody>
1292 <td class=
"description">PPD file
</td></tr>
1294 <td class=
"description">Keyword/option name
</td></tr>
1296 <h4 class=
"returnvalue">Return Value
</h4>
1297 <p class=
"description">Pointer to choice or
<code>NULL
</code></p>
1298 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a id=
"ppdFindNextAttr">ppdFindNextAttr
</a></h3>
1299 <p class=
"description">Find the next matching attribute.
</p>
1301 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *ppdFindNextAttr(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd, const char *name, const char *spec);
</p>
1302 <h4 class=
"parameters">Parameters
</h4>
1303 <table class=
"list"><tbody>
1305 <td class=
"description">PPD file data
</td></tr>
1307 <td class=
"description">Attribute name
</td></tr>
1309 <td class=
"description">Specifier string or
<code>NULL
</code></td></tr>
1311 <h4 class=
"returnvalue">Return Value
</h4>
1312 <p class=
"description">Attribute or
<code>NULL
</code> if not found
</p>
1313 <h3 class=
"function"><a id=
"ppdFindOption">ppdFindOption
</a></h3>
1314 <p class=
"description">Return a pointer to the specified option.
</p>
1316 <a href=
"#ppd_option_t">ppd_option_t
</a> *ppdFindOption(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd, const char *option);
</p>
1317 <h4 class=
"parameters">Parameters
</h4>
1318 <table class=
"list"><tbody>
1320 <td class=
"description">PPD file data
</td></tr>
1322 <td class=
"description">Option/Keyword name
</td></tr>
1324 <h4 class=
"returnvalue">Return Value
</h4>
1325 <p class=
"description">Pointer to option or
<code>NULL
</code></p>
1326 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppdFirstCustomParam">ppdFirstCustomParam
</a></h3>
1327 <p class=
"description">Return the first parameter for a custom option.
</p>
1329 <a href=
"#ppd_cparam_t">ppd_cparam_t
</a> *ppdFirstCustomParam(
<a href=
"#ppd_coption_t">ppd_coption_t
</a> *opt);
</p>
1330 <h4 class=
"parameters">Parameters
</h4>
1331 <table class=
"list"><tbody>
1333 <td class=
"description">Custom option
</td></tr>
1335 <h4 class=
"returnvalue">Return Value
</h4>
1336 <p class=
"description">Custom parameter or NULL
</p>
1337 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppdFirstOption">ppdFirstOption
</a></h3>
1338 <p class=
"description">Return the first option in the PPD file.
</p>
1340 <a href=
"#ppd_option_t">ppd_option_t
</a> *ppdFirstOption(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd);
</p>
1341 <h4 class=
"parameters">Parameters
</h4>
1342 <table class=
"list"><tbody>
1344 <td class=
"description">PPD file
</td></tr>
1346 <h4 class=
"returnvalue">Return Value
</h4>
1347 <p class=
"description">First option or
<code>NULL
</code></p>
1348 <h4 class=
"discussion">Discussion
</h4>
1349 <p class=
"discussion">Options are returned from all groups in ascending alphanumeric order.
1352 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"ppdInstallableConflict">ppdInstallableConflict
</a></h3>
1353 <p class=
"description">Test whether an option choice conflicts with
1354 an installable option.
</p>
1356 int ppdInstallableConflict(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd, const char *option, const char *choice);
</p>
1357 <h4 class=
"parameters">Parameters
</h4>
1358 <table class=
"list"><tbody>
1360 <td class=
"description">PPD file
</td></tr>
1362 <td class=
"description">Option
</td></tr>
1364 <td class=
"description">Choice
</td></tr>
1366 <h4 class=
"returnvalue">Return Value
</h4>
1367 <p class=
"description">1 if conflicting,
0 if not conflicting
</p>
1368 <h4 class=
"discussion">Discussion
</h4>
1369 <p class=
"discussion">This function tests whether a particular option choice is available based
1370 on constraints against options in the
"InstallableOptions
" group.
1373 <h3 class=
"function"><a id=
"ppdIsMarked">ppdIsMarked
</a></h3>
1374 <p class=
"description">Check to see if an option is marked.
</p>
1376 int ppdIsMarked(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd, const char *option, const char *choice);
</p>
1377 <h4 class=
"parameters">Parameters
</h4>
1378 <table class=
"list"><tbody>
1380 <td class=
"description">PPD file data
</td></tr>
1382 <td class=
"description">Option/Keyword name
</td></tr>
1384 <td class=
"description">Choice name
</td></tr>
1386 <h4 class=
"returnvalue">Return Value
</h4>
1387 <p class=
"description">Non-zero if option is marked
</p>
1388 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppdLocalize">ppdLocalize
</a></h3>
1389 <p class=
"description">Localize the PPD file to the current locale.
</p>
1391 int ppdLocalize(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd);
</p>
1392 <h4 class=
"parameters">Parameters
</h4>
1393 <table class=
"list"><tbody>
1395 <td class=
"description">PPD file
</td></tr>
1397 <h4 class=
"returnvalue">Return Value
</h4>
1398 <p class=
"description">0 on success, -
1 on error
</p>
1399 <h4 class=
"discussion">Discussion
</h4>
1400 <p class=
"discussion">All groups, options, and choices are localized, as are ICC profile
1401 descriptions, printer presets, and custom option parameters. Each
1402 localized string uses the UTF-
8 character encoding.
1405 <h3 class=
"function"><a id=
"ppdLocalizeAttr">ppdLocalizeAttr
</a></h3>
1406 <p class=
"description">Localize an attribute.
</p>
1408 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *ppdLocalizeAttr(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd, const char *keyword, const char *spec);
</p>
1409 <h4 class=
"parameters">Parameters
</h4>
1410 <table class=
"list"><tbody>
1412 <td class=
"description">PPD file
</td></tr>
1413 <tr><th>keyword
</th>
1414 <td class=
"description">Main keyword
</td></tr>
1416 <td class=
"description">Option keyword or
<code>NULL
</code> for none
</td></tr>
1418 <h4 class=
"returnvalue">Return Value
</h4>
1419 <p class=
"description">Localized attribute or
<code>NULL
</code> if none exists
</p>
1420 <h4 class=
"discussion">Discussion
</h4>
1421 <p class=
"discussion">This function uses the current locale to find the localized attribute for
1422 the given main and option keywords. If no localized version of the
1423 attribute exists for the current locale, the unlocalized version is returned.
</p>
1424 <h3 class=
"function"><span class=
"info"> CUPS
1.3/macOS
10.5 </span><a id=
"ppdLocalizeIPPReason">ppdLocalizeIPPReason
</a></h3>
1425 <p class=
"description">Get the localized version of a cupsIPPReason
1428 const char *ppdLocalizeIPPReason(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd, const char *reason, const char *scheme, char *buffer, size_t bufsize);
</p>
1429 <h4 class=
"parameters">Parameters
</h4>
1430 <table class=
"list"><tbody>
1432 <td class=
"description">PPD file
</td></tr>
1434 <td class=
"description">IPP reason keyword to look up
</td></tr>
1436 <td class=
"description">URI scheme or NULL for text
</td></tr>
1438 <td class=
"description">Value buffer
</td></tr>
1439 <tr><th>bufsize
</th>
1440 <td class=
"description">Size of value buffer
</td></tr>
1442 <h4 class=
"returnvalue">Return Value
</h4>
1443 <p class=
"description">Value or NULL if not found
</p>
1444 <h4 class=
"discussion">Discussion
</h4>
1445 <p class=
"discussion">This function uses the current locale to find the corresponding reason
1446 text or URI from the attribute value. If
"scheme
" is NULL or
"text
",
1447 the returned value contains human-readable (UTF-
8) text from the translation
1448 string or attribute value. Otherwise the corresponding URI is returned.
<br>
1450 If no value of the requested scheme can be found, NULL is returned.
1453 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"ppdLocalizeMarkerName">ppdLocalizeMarkerName
</a></h3>
1454 <p class=
"description">Get the localized version of a marker-names
1455 attribute value.
</p>
1457 const char *ppdLocalizeMarkerName(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd, const char *name);
</p>
1458 <h4 class=
"parameters">Parameters
</h4>
1459 <table class=
"list"><tbody>
1461 <td class=
"description">PPD file
</td></tr>
1463 <td class=
"description">Marker name to look up
</td></tr>
1465 <h4 class=
"returnvalue">Return Value
</h4>
1466 <p class=
"description">Value or
<code>NULL
</code> if not found
</p>
1467 <h4 class=
"discussion">Discussion
</h4>
1468 <p class=
"discussion">This function uses the current locale to find the corresponding name
1469 text from the attribute value. If no localized text for the requested
1470 name can be found,
<code>NULL
</code> is returned.
1473 <h3 class=
"function"><a id=
"ppdMarkDefaults">ppdMarkDefaults
</a></h3>
1474 <p class=
"description">Mark all default options in the PPD file.
</p>
1476 void ppdMarkDefaults(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd);
</p>
1477 <h4 class=
"parameters">Parameters
</h4>
1478 <table class=
"list"><tbody>
1480 <td class=
"description">PPD file record
</td></tr>
1482 <h3 class=
"function"><a id=
"ppdMarkOption">ppdMarkOption
</a></h3>
1483 <p class=
"description">Mark an option in a PPD file and return the number of
1486 int ppdMarkOption(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd, const char *option, const char *choice);
</p>
1487 <h4 class=
"parameters">Parameters
</h4>
1488 <table class=
"list"><tbody>
1490 <td class=
"description">PPD file record
</td></tr>
1492 <td class=
"description">Keyword
</td></tr>
1494 <td class=
"description">Option name
</td></tr>
1496 <h4 class=
"returnvalue">Return Value
</h4>
1497 <p class=
"description">Number of conflicts
</p>
1498 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppdNextCustomParam">ppdNextCustomParam
</a></h3>
1499 <p class=
"description">Return the next parameter for a custom option.
</p>
1501 <a href=
"#ppd_cparam_t">ppd_cparam_t
</a> *ppdNextCustomParam(
<a href=
"#ppd_coption_t">ppd_coption_t
</a> *opt);
</p>
1502 <h4 class=
"parameters">Parameters
</h4>
1503 <table class=
"list"><tbody>
1505 <td class=
"description">Custom option
</td></tr>
1507 <h4 class=
"returnvalue">Return Value
</h4>
1508 <p class=
"description">Custom parameter or NULL
</p>
1509 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppdNextOption">ppdNextOption
</a></h3>
1510 <p class=
"description">Return the next option in the PPD file.
</p>
1512 <a href=
"#ppd_option_t">ppd_option_t
</a> *ppdNextOption(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd);
</p>
1513 <h4 class=
"parameters">Parameters
</h4>
1514 <table class=
"list"><tbody>
1516 <td class=
"description">PPD file
</td></tr>
1518 <h4 class=
"returnvalue">Return Value
</h4>
1519 <p class=
"description">Next option or
<code>NULL
</code></p>
1520 <h4 class=
"discussion">Discussion
</h4>
1521 <p class=
"discussion">Options are returned from all groups in ascending alphanumeric order.
1524 <h3 class=
"function"><a id=
"ppdPageLength">ppdPageLength
</a></h3>
1525 <p class=
"description">Get the page length for the given size.
</p>
1527 float ppdPageLength(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd, const char *name);
</p>
1528 <h4 class=
"parameters">Parameters
</h4>
1529 <table class=
"list"><tbody>
1531 <td class=
"description">PPD file
</td></tr>
1533 <td class=
"description">Size name
</td></tr>
1535 <h4 class=
"returnvalue">Return Value
</h4>
1536 <p class=
"description">Length of page in points or
0.0</p>
1537 <h3 class=
"function"><a id=
"ppdPageSize">ppdPageSize
</a></h3>
1538 <p class=
"description">Get the page size record for the named size.
</p>
1540 <a href=
"#ppd_size_t">ppd_size_t
</a> *ppdPageSize(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd, const char *name);
</p>
1541 <h4 class=
"parameters">Parameters
</h4>
1542 <table class=
"list"><tbody>
1544 <td class=
"description">PPD file record
</td></tr>
1546 <td class=
"description">Size name
</td></tr>
1548 <h4 class=
"returnvalue">Return Value
</h4>
1549 <p class=
"description">Size record for page or NULL
</p>
1550 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"ppdPageSizeLimits">ppdPageSizeLimits
</a></h3>
1551 <p class=
"description">Return the custom page size limits.
</p>
1553 int ppdPageSizeLimits(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<a href=
"#ppd_size_t">ppd_size_t
</a> *minimum,
<a href=
"#ppd_size_t">ppd_size_t
</a> *maximum);
</p>
1554 <h4 class=
"parameters">Parameters
</h4>
1555 <table class=
"list"><tbody>
1557 <td class=
"description">PPD file record
</td></tr>
1558 <tr><th>minimum
</th>
1559 <td class=
"description">Minimum custom size
</td></tr>
1560 <tr><th>maximum
</th>
1561 <td class=
"description">Maximum custom size
</td></tr>
1563 <h4 class=
"returnvalue">Return Value
</h4>
1564 <p class=
"description">1 if custom sizes are supported,
0 otherwise
</p>
1565 <h4 class=
"discussion">Discussion
</h4>
1566 <p class=
"discussion">This function returns the minimum and maximum custom page sizes and printable
1567 areas based on the currently-marked (selected) options.
<br>
1569 If the specified PPD file does not support custom page sizes, both
1570 "minimum
" and
"maximum
" are filled with zeroes.
1573 <h3 class=
"function"><a id=
"ppdPageWidth">ppdPageWidth
</a></h3>
1574 <p class=
"description">Get the page width for the given size.
</p>
1576 float ppdPageWidth(
<a href=
"#ppd_file_t">ppd_file_t
</a> *ppd, const char *name);
</p>
1577 <h4 class=
"parameters">Parameters
</h4>
1578 <table class=
"list"><tbody>
1580 <td class=
"description">PPD file record
</td></tr>
1582 <td class=
"description">Size name
</td></tr>
1584 <h4 class=
"returnvalue">Return Value
</h4>
1585 <p class=
"description">Width of page in points or
0.0</p>
1586 <h2 class=
"title"><a id=
"TYPES">Data Types
</a></h2>
1587 <h3 class=
"typedef"><a id=
"cups_interpret_cb_t">cups_interpret_cb_t
</a></h3>
1588 <p class=
"description">cupsRasterInterpretPPD callback function
</p>
1590 typedef int (*cups_interpret_cb_t)(cups_page_header2_t *header, int preferred_bits);
1592 <h3 class=
"typedef"><a id=
"ppd_attr_t"><span class=
"info"> DEPRECATED
 </span>ppd_attr_t
</a></h3>
1593 <p class=
"description">PPD Attribute Structure
</p>
1595 typedef struct
<a href=
"#ppd_attr_s">ppd_attr_s
</a> ppd_attr_t;
1597 <h3 class=
"typedef"><a id=
"ppd_choice_t"><span class=
"info"> DEPRECATED
 </span>ppd_choice_t
</a></h3>
1598 <p class=
"description">Option choices
</p>
1600 typedef struct
<a href=
"#ppd_choice_s">ppd_choice_s
</a> ppd_choice_t;
1602 <h3 class=
"typedef"><a id=
"ppd_conform_t"><span class=
"info"> DEPRECATED
 </span>ppd_conform_t
</a></h3>
1603 <p class=
"description">Conformance Levels
</p>
1605 typedef enum
<a href=
"#ppd_conform_e">ppd_conform_e
</a> ppd_conform_t;
1607 <h3 class=
"typedef"><a id=
"ppd_const_t"><span class=
"info"> DEPRECATED
 </span>ppd_const_t
</a></h3>
1608 <p class=
"description">Constraints
</p>
1610 typedef struct
<a href=
"#ppd_const_s">ppd_const_s
</a> ppd_const_t;
1612 <h3 class=
"typedef"><a id=
"ppd_coption_t"><span class=
"info"> DEPRECATED
 </span>ppd_coption_t
</a></h3>
1613 <p class=
"description">Custom Option
</p>
1615 typedef struct
<a href=
"#ppd_coption_s">ppd_coption_s
</a> ppd_coption_t;
1617 <h3 class=
"typedef"><a id=
"ppd_cparam_t"><span class=
"info"> DEPRECATED
 </span>ppd_cparam_t
</a></h3>
1618 <p class=
"description">Custom Parameter
</p>
1620 typedef struct
<a href=
"#ppd_cparam_s">ppd_cparam_s
</a> ppd_cparam_t;
1622 <h3 class=
"typedef"><a id=
"ppd_cplimit_t"><span class=
"info"> DEPRECATED
 </span>ppd_cplimit_t
</a></h3>
1623 <p class=
"description">Custom Parameter Limit
</p>
1625 typedef union
<a href=
"#ppd_cplimit_u">ppd_cplimit_u
</a> ppd_cplimit_t;
1627 <h3 class=
"typedef"><a id=
"ppd_cptype_t"><span class=
"info"> DEPRECATED
 </span>ppd_cptype_t
</a></h3>
1628 <p class=
"description">Custom Parameter Type
</p>
1630 typedef enum
<a href=
"#ppd_cptype_e">ppd_cptype_e
</a> ppd_cptype_t;
1632 <h3 class=
"typedef"><a id=
"ppd_cpvalue_t"><span class=
"info"> DEPRECATED
 </span>ppd_cpvalue_t
</a></h3>
1633 <p class=
"description">Custom Parameter Value
</p>
1635 typedef union
<a href=
"#ppd_cpvalue_u">ppd_cpvalue_u
</a> ppd_cpvalue_t;
1637 <h3 class=
"typedef"><a id=
"ppd_cs_t"><span class=
"info"> DEPRECATED
 </span>ppd_cs_t
</a></h3>
1638 <p class=
"description">Colorspaces
</p>
1640 typedef enum
<a href=
"#ppd_cs_e">ppd_cs_e
</a> ppd_cs_t;
1642 <h3 class=
"typedef"><a id=
"ppd_emul_t"><span class=
"info"> DEPRECATED
 </span>ppd_emul_t
</a></h3>
1643 <p class=
"description">Emulators
</p>
1645 typedef struct
<a href=
"#ppd_emul_s">ppd_emul_s
</a> ppd_emul_t;
1647 <h3 class=
"typedef"><a id=
"ppd_file_t"><span class=
"info"> DEPRECATED
 </span>ppd_file_t
</a></h3>
1648 <p class=
"description">PPD File
</p>
1650 typedef struct
<a href=
"#ppd_file_s">ppd_file_s
</a> ppd_file_t;
1652 <h3 class=
"typedef"><a id=
"ppd_group_t"><span class=
"info"> DEPRECATED
 </span>ppd_group_t
</a></h3>
1653 <p class=
"description">Groups
</p>
1655 typedef struct
<a href=
"#ppd_group_s">ppd_group_s
</a> ppd_group_t;
1657 <h3 class=
"typedef"><a id=
"ppd_option_t"><span class=
"info"> DEPRECATED
 </span>ppd_option_t
</a></h3>
1658 <p class=
"description">Options
</p>
1660 typedef struct
<a href=
"#ppd_option_s">ppd_option_s
</a> ppd_option_t;
1662 <h3 class=
"typedef"><a id=
"ppd_profile_t"><span class=
"info"> DEPRECATED
 </span>ppd_profile_t
</a></h3>
1663 <p class=
"description">sRGB Color Profiles
</p>
1665 typedef struct
<a href=
"#ppd_profile_s">ppd_profile_s
</a> ppd_profile_t;
1667 <h3 class=
"typedef"><a id=
"ppd_section_t"><span class=
"info"> DEPRECATED
 </span>ppd_section_t
</a></h3>
1668 <p class=
"description">Order dependency sections
</p>
1670 typedef enum
<a href=
"#ppd_section_e">ppd_section_e
</a> ppd_section_t;
1672 <h3 class=
"typedef"><a id=
"ppd_size_t"><span class=
"info"> DEPRECATED
 </span>ppd_size_t
</a></h3>
1673 <p class=
"description">Page Sizes
</p>
1675 typedef struct
<a href=
"#ppd_size_s">ppd_size_s
</a> ppd_size_t;
1677 <h3 class=
"typedef"><a id=
"ppd_status_t"><span class=
"info"> DEPRECATED
 </span>ppd_status_t
</a></h3>
1678 <p class=
"description">Status Codes
</p>
1680 typedef enum
<a href=
"#ppd_status_e">ppd_status_e
</a> ppd_status_t;
1682 <h3 class=
"typedef"><a id=
"ppd_ui_t"><span class=
"info"> DEPRECATED
 </span>ppd_ui_t
</a></h3>
1683 <p class=
"description">UI Types
</p>
1685 typedef enum
<a href=
"#ppd_ui_e">ppd_ui_e
</a> ppd_ui_t;
1687 <h2 class=
"title"><a id=
"STRUCTURES">Structures
</a></h2>
1688 <h3 class=
"struct"><span class=
"info"> DEPRECATED
 </span><a id=
"ppd_attr_s">ppd_attr_s
</a></h3>
1689 <p class=
"description">PPD Attribute Structure
</p>
1690 <p class=
"code">struct ppd_attr_s {
<br>
1691     char name[PPD_MAX_NAME];
<br>
1692     char spec[PPD_MAX_NAME];
<br>
1693     char text[PPD_MAX_TEXT];
<br>
1694     char *value;
<br>
1696 <h4 class=
"members">Members
</h4>
1697 <table class=
"list"><tbody>
1698 <tr><th>name[PPD_MAX_NAME]
</th>
1699 <td class=
"description">Name of attribute (cupsXYZ)
</td></tr>
1700 <tr><th>spec[PPD_MAX_NAME]
</th>
1701 <td class=
"description">Specifier string, if any
</td></tr>
1702 <tr><th>text[PPD_MAX_TEXT]
</th>
1703 <td class=
"description">Human-readable text, if any
</td></tr>
1705 <td class=
"description">Value string
</td></tr>
1707 <h3 class=
"struct"><span class=
"info"> DEPRECATED
 </span><a id=
"ppd_choice_s">ppd_choice_s
</a></h3>
1708 <p class=
"description">Option choices
</p>
1709 <p class=
"code">struct ppd_choice_s {
<br>
1710     char choice[PPD_MAX_NAME];
<br>
1711     char *code;
<br>
1712     char marked;
<br>
1713     <a href=
"#ppd_option_t">ppd_option_t
</a> *option;
<br>
1714     char text[PPD_MAX_TEXT];
<br>
1716 <h4 class=
"members">Members
</h4>
1717 <table class=
"list"><tbody>
1718 <tr><th>choice[PPD_MAX_NAME]
</th>
1719 <td class=
"description">Computer-readable option name
</td></tr>
1721 <td class=
"description">Code to send for this option
</td></tr>
1722 <tr><th>marked
</th>
1723 <td class=
"description">0 if not selected,
1 otherwise
</td></tr>
1724 <tr><th>option
</th>
1725 <td class=
"description">Pointer to parent option structure
</td></tr>
1726 <tr><th>text[PPD_MAX_TEXT]
</th>
1727 <td class=
"description">Human-readable option name
</td></tr>
1729 <h3 class=
"struct"><span class=
"info"> DEPRECATED
 </span><a id=
"ppd_const_s">ppd_const_s
</a></h3>
1730 <p class=
"description">Constraints
</p>
1731 <p class=
"code">struct ppd_const_s {
<br>
1732     char choice1[PPD_MAX_NAME];
<br>
1733     char choice2[PPD_MAX_NAME];
<br>
1734     char option1[PPD_MAX_NAME];
<br>
1735     char option2[PPD_MAX_NAME];
<br>
1737 <h4 class=
"members">Members
</h4>
1738 <table class=
"list"><tbody>
1739 <tr><th>choice1[PPD_MAX_NAME]
</th>
1740 <td class=
"description">First option/choice (blank for all)
</td></tr>
1741 <tr><th>choice2[PPD_MAX_NAME]
</th>
1742 <td class=
"description">Second option/choice (blank for all)
</td></tr>
1743 <tr><th>option1[PPD_MAX_NAME]
</th>
1744 <td class=
"description">First keyword
</td></tr>
1745 <tr><th>option2[PPD_MAX_NAME]
</th>
1746 <td class=
"description">Second keyword
</td></tr>
1748 <h3 class=
"struct"><span class=
"info"> DEPRECATED
 </span><a id=
"ppd_coption_s">ppd_coption_s
</a></h3>
1749 <p class=
"description">Custom Option
</p>
1750 <p class=
"code">struct ppd_coption_s {
<br>
1751     char keyword[PPD_MAX_NAME];
<br>
1752     int marked;
<br>
1753     <a href=
"#ppd_option_t">ppd_option_t
</a> *option;
<br>
1754     cups_array_t *params;
<br>
1756 <h4 class=
"members">Members
</h4>
1757 <table class=
"list"><tbody>
1758 <tr><th>keyword[PPD_MAX_NAME]
</th>
1759 <td class=
"description">Name of option that is being extended...
</td></tr>
1760 <tr><th>marked
</th>
1761 <td class=
"description">Extended option is marked
</td></tr>
1762 <tr><th>option
</th>
1763 <td class=
"description">Option that is being extended...
</td></tr>
1764 <tr><th>params
</th>
1765 <td class=
"description">Parameters
</td></tr>
1767 <h3 class=
"struct"><span class=
"info"> DEPRECATED
 </span><a id=
"ppd_cparam_s">ppd_cparam_s
</a></h3>
1768 <p class=
"description">Custom Parameter
</p>
1769 <p class=
"code">struct ppd_cparam_s {
<br>
1770     <a href=
"#ppd_cpvalue_t">ppd_cpvalue_t
</a> current;
<br>
1771     <a href=
"#ppd_cplimit_t">ppd_cplimit_t
</a> minimum, maximum;
<br>
1772     char name[PPD_MAX_NAME];
<br>
1773     int order;
<br>
1774     char text[PPD_MAX_TEXT];
<br>
1775     <a href=
"#ppd_cptype_t">ppd_cptype_t
</a> type;
<br>
1777 <h4 class=
"members">Members
</h4>
1778 <table class=
"list"><tbody>
1779 <tr><th>current
</th>
1780 <td class=
"description">Current value
</td></tr>
1781 <tr><th>maximum
</th>
1782 <td class=
"description">Maximum value
</td></tr>
1783 <tr><th>name[PPD_MAX_NAME]
</th>
1784 <td class=
"description">Parameter name
</td></tr>
1786 <td class=
"description">Order (
0 to N)
</td></tr>
1787 <tr><th>text[PPD_MAX_TEXT]
</th>
1788 <td class=
"description">Human-readable text
</td></tr>
1790 <td class=
"description">Parameter type
</td></tr>
1792 <h3 class=
"struct"><span class=
"info"> DEPRECATED
 </span><a id=
"ppd_emul_s">ppd_emul_s
</a></h3>
1793 <p class=
"description">Emulators
</p>
1794 <p class=
"code">struct ppd_emul_s {
<br>
1795     char name[PPD_MAX_NAME];
<br>
1796     char *start;
<br>
1797     char *stop;
<br>
1799 <h4 class=
"members">Members
</h4>
1800 <table class=
"list"><tbody>
1801 <tr><th>name[PPD_MAX_NAME]
</th>
1802 <td class=
"description">Emulator name
</td></tr>
1804 <td class=
"description">Code to switch to this emulation
</td></tr>
1806 <td class=
"description">Code to stop this emulation
</td></tr>
1808 <h3 class=
"struct"><span class=
"info"> DEPRECATED
 </span><a id=
"ppd_file_s">ppd_file_s
</a></h3>
1809 <p class=
"description">PPD File
</p>
1810 <p class=
"code">struct ppd_file_s {
<br>
1811     int accurate_screens;
<br>
1812     int color_device;
<br>
1813     <a href=
"#ppd_cs_t">ppd_cs_t
</a> colorspace;
<br>
1814     <a href=
"#ppd_const_t">ppd_const_t
</a> *consts;
<br>
1815     int contone_only;
<br>
1816     float custom_margins[
4];
<br>
1817     float custom_max[
2];
<br>
1818     float custom_min[
2];
<br>
1819     char **filters;
<br>
1820     int flip_duplex;
<br>
1821     char **fonts;
<br>
1822     <a href=
"#ppd_group_t">ppd_group_t
</a> *groups;
<br>
1823     char *jcl_begin;
<br>
1824     char *jcl_end;
<br>
1825     char *jcl_ps;
<br>
1826     int landscape;
<br>
1827     char *lang_encoding;
<br>
1828     char *lang_version;
<br>
1829     int language_level;
<br>
1830     int manual_copies;
<br>
1831     char *manufacturer;
<br>
1832     int model_number;
<br>
1833     char *modelname;
<br>
1834     char *nickname;
<br>
1835     int num_consts;
<br>
1836     int num_filters;
<br>
1837     int num_fonts;
<br>
1838     int num_groups;
<br>
1839     int num_profiles;
<br>
1840     int num_sizes;
<br>
1841     char *patches;
<br>
1842     char *pcfilename;
<br>
1843     char *product;
<br>
1844     <a href=
"#ppd_profile_t">ppd_profile_t
</a> *profiles;
<br>
1845     char *protocols;
<br>
1846     char *shortnickname;
<br>
1847     <a href=
"#ppd_size_t">ppd_size_t
</a> *sizes;
<br>
1848     int throughput;
<br>
1849     char *ttrasterizer;
<br>
1850     int variable_sizes;
<br>
1852 <h4 class=
"members">Members
</h4>
1853 <table class=
"list"><tbody>
1854 <tr><th>accurate_screens
</th>
1855 <td class=
"description">1 = supports accurate screens,
0 = not
</td></tr>
1856 <tr><th>color_device
</th>
1857 <td class=
"description">1 = color device,
0 = grayscale
</td></tr>
1858 <tr><th>colorspace
</th>
1859 <td class=
"description">Default colorspace
</td></tr>
1860 <tr><th>consts
</th>
1861 <td class=
"description">UI/Non-UI constraints
</td></tr>
1862 <tr><th>contone_only
</th>
1863 <td class=
"description">1 = continuous tone only,
0 = not
</td></tr>
1864 <tr><th>custom_margins[
4]
</th>
1865 <td class=
"description">Margins around page
</td></tr>
1866 <tr><th>custom_max[
2]
</th>
1867 <td class=
"description">Maximum variable page size
</td></tr>
1868 <tr><th>custom_min[
2]
</th>
1869 <td class=
"description">Minimum variable page size
</td></tr>
1870 <tr><th>filters
</th>
1871 <td class=
"description">Filter strings...
</td></tr>
1872 <tr><th>flip_duplex
<span class=
"info"> DEPRECATED
 </span></th>
1873 <td class=
"description">1 = Flip page for back sides
</td></tr>
1875 <td class=
"description">Pre-loaded fonts
</td></tr>
1876 <tr><th>groups
</th>
1877 <td class=
"description">UI groups
</td></tr>
1878 <tr><th>jcl_begin
</th>
1879 <td class=
"description">Start JCL commands
</td></tr>
1880 <tr><th>jcl_end
</th>
1881 <td class=
"description">End JCL commands
</td></tr>
1882 <tr><th>jcl_ps
</th>
1883 <td class=
"description">Enter PostScript interpreter
</td></tr>
1884 <tr><th>landscape
</th>
1885 <td class=
"description">-
90 or
90</td></tr>
1886 <tr><th>lang_encoding
</th>
1887 <td class=
"description">Language encoding
</td></tr>
1888 <tr><th>lang_version
</th>
1889 <td class=
"description">Language version (English, Spanish, etc.)
</td></tr>
1890 <tr><th>language_level
</th>
1891 <td class=
"description">Language level of device
</td></tr>
1892 <tr><th>manual_copies
</th>
1893 <td class=
"description">1 = Copies done manually,
0 = hardware
</td></tr>
1894 <tr><th>manufacturer
</th>
1895 <td class=
"description">Manufacturer name
</td></tr>
1896 <tr><th>model_number
</th>
1897 <td class=
"description">Device-specific model number
</td></tr>
1898 <tr><th>modelname
</th>
1899 <td class=
"description">Model name (general)
</td></tr>
1900 <tr><th>nickname
</th>
1901 <td class=
"description">Nickname (specific)
</td></tr>
1902 <tr><th>num_consts
</th>
1903 <td class=
"description">Number of UI/Non-UI constraints
</td></tr>
1904 <tr><th>num_filters
</th>
1905 <td class=
"description">Number of filters
</td></tr>
1906 <tr><th>num_fonts
</th>
1907 <td class=
"description">Number of pre-loaded fonts
</td></tr>
1908 <tr><th>num_groups
</th>
1909 <td class=
"description">Number of UI groups
</td></tr>
1910 <tr><th>num_profiles
<span class=
"info"> DEPRECATED
 </span></th>
1911 <td class=
"description">Number of sRGB color profiles
</td></tr>
1912 <tr><th>num_sizes
</th>
1913 <td class=
"description">Number of page sizes
</td></tr>
1914 <tr><th>patches
</th>
1915 <td class=
"description">Patch commands to be sent to printer
</td></tr>
1916 <tr><th>pcfilename
<span class=
"info"> CUPS
1.1.19/macOS
10.3 </span></th>
1917 <td class=
"description">PCFileName string
</td></tr>
1918 <tr><th>product
</th>
1919 <td class=
"description">Product name (from PS RIP/interpreter)
</td></tr>
1920 <tr><th>profiles
<span class=
"info"> DEPRECATED
 </span></th>
1921 <td class=
"description">sRGB color profiles
</td></tr>
1922 <tr><th>protocols
<span class=
"info"> CUPS
1.1.19/macOS
10.3 </span></th>
1923 <td class=
"description">Protocols (BCP, TBCP) string
</td></tr>
1924 <tr><th>shortnickname
</th>
1925 <td class=
"description">Short version of nickname
</td></tr>
1927 <td class=
"description">Page sizes
</td></tr>
1928 <tr><th>throughput
</th>
1929 <td class=
"description">Pages per minute
</td></tr>
1930 <tr><th>ttrasterizer
</th>
1931 <td class=
"description">Truetype rasterizer
</td></tr>
1932 <tr><th>variable_sizes
</th>
1933 <td class=
"description">1 = supports variable sizes,
0 = doesn't
</td></tr>
1935 <h3 class=
"struct"><span class=
"info"> DEPRECATED
 </span><a id=
"ppd_group_s">ppd_group_s
</a></h3>
1936 <p class=
"description">Groups
</p>
1937 <p class=
"code">struct ppd_group_s {
<br>
1938     char text[PPD_MAX_TEXT - PPD_MAX_NAME];
<br>
1939     char name[PPD_MAX_NAME];
<br>
1940     int num_options;
<br>
1941     int num_subgroups;
<br>
1942     <a href=
"#ppd_option_t">ppd_option_t
</a> *options;
<br>
1943     struct
<a href=
"#ppd_group_s">ppd_group_s
</a> *subgroups;
<br>
1945 <h4 class=
"members">Members
</h4>
1946 <table class=
"list"><tbody>
1947 <tr><th>PPD_MAX_NAME]
</th>
1948 <td class=
"description">Human-readable group name
</td></tr>
1949 <tr><th>name[PPD_MAX_NAME]
<span class=
"info"> CUPS
1.1.18/macOS
10.3 </span></th>
1950 <td class=
"description">Group name
</td></tr>
1951 <tr><th>num_options
</th>
1952 <td class=
"description">Number of options
</td></tr>
1953 <tr><th>num_subgroups
</th>
1954 <td class=
"description">Number of sub-groups
</td></tr>
1955 <tr><th>options
</th>
1956 <td class=
"description">Options
</td></tr>
1957 <tr><th>subgroups
</th>
1958 <td class=
"description">Sub-groups (max depth =
1)
</td></tr>
1960 <h3 class=
"struct"><span class=
"info"> DEPRECATED
 </span><a id=
"ppd_option_s">ppd_option_s
</a></h3>
1961 <p class=
"description">Options
</p>
1962 <p class=
"code">struct ppd_option_s {
<br>
1963     <a href=
"#ppd_choice_t">ppd_choice_t
</a> *choices;
<br>
1964     char conflicted;
<br>
1965     char defchoice[PPD_MAX_NAME];
<br>
1966     char keyword[PPD_MAX_NAME];
<br>
1967     int num_choices;
<br>
1968     float order;
<br>
1969     <a href=
"#ppd_section_t">ppd_section_t
</a> section;
<br>
1970     char text[PPD_MAX_TEXT];
<br>
1971     <a href=
"#ppd_ui_t">ppd_ui_t
</a> ui;
<br>
1973 <h4 class=
"members">Members
</h4>
1974 <table class=
"list"><tbody>
1975 <tr><th>choices
</th>
1976 <td class=
"description">Option choices
</td></tr>
1977 <tr><th>conflicted
</th>
1978 <td class=
"description">0 if no conflicts exist,
1 otherwise
</td></tr>
1979 <tr><th>defchoice[PPD_MAX_NAME]
</th>
1980 <td class=
"description">Default option choice
</td></tr>
1981 <tr><th>keyword[PPD_MAX_NAME]
</th>
1982 <td class=
"description">Option keyword name (
"PageSize
", etc.)
</td></tr>
1983 <tr><th>num_choices
</th>
1984 <td class=
"description">Number of option choices
</td></tr>
1986 <td class=
"description">Order number
</td></tr>
1987 <tr><th>section
</th>
1988 <td class=
"description">Section for command
</td></tr>
1989 <tr><th>text[PPD_MAX_TEXT]
</th>
1990 <td class=
"description">Human-readable text
</td></tr>
1992 <td class=
"description">Type of UI option
</td></tr>
1994 <h3 class=
"struct"><span class=
"info"> DEPRECATED
 </span><a id=
"ppd_profile_s">ppd_profile_s
</a></h3>
1995 <p class=
"description">sRGB Color Profiles
</p>
1996 <p class=
"code">struct ppd_profile_s {
<br>
1997     float density;
<br>
1998     float gamma;
<br>
1999     float matrix[
3][
3];
<br>
2000     char media_type[PPD_MAX_NAME];
<br>
2001     char resolution[PPD_MAX_NAME];
<br>
2003 <h4 class=
"members">Members
</h4>
2004 <table class=
"list"><tbody>
2005 <tr><th>density
</th>
2006 <td class=
"description">Ink density to use
</td></tr>
2008 <td class=
"description">Gamma correction to use
</td></tr>
2009 <tr><th>matrix[
3][
3]
</th>
2010 <td class=
"description">Transform matrix
</td></tr>
2011 <tr><th>media_type[PPD_MAX_NAME]
</th>
2012 <td class=
"description">Media type or
"-
"</td></tr>
2013 <tr><th>resolution[PPD_MAX_NAME]
</th>
2014 <td class=
"description">Resolution or
"-
"</td></tr>
2016 <h3 class=
"struct"><span class=
"info"> DEPRECATED
 </span><a id=
"ppd_size_s">ppd_size_s
</a></h3>
2017 <p class=
"description">Page Sizes
</p>
2018 <p class=
"code">struct ppd_size_s {
<br>
2019     float bottom;
<br>
2020     float left;
<br>
2021     float length;
<br>
2022     int marked;
<br>
2023     char name[PPD_MAX_NAME];
<br>
2024     float right;
<br>
2025     float top;
<br>
2026     float width;
<br>
2028 <h4 class=
"members">Members
</h4>
2029 <table class=
"list"><tbody>
2030 <tr><th>bottom
</th>
2031 <td class=
"description">Bottom printable margin in points
</td></tr>
2033 <td class=
"description">Left printable margin in points
</td></tr>
2034 <tr><th>length
</th>
2035 <td class=
"description">Length of media in points
</td></tr>
2036 <tr><th>marked
</th>
2037 <td class=
"description">Page size selected?
</td></tr>
2038 <tr><th>name[PPD_MAX_NAME]
</th>
2039 <td class=
"description">Media size option
</td></tr>
2041 <td class=
"description">Right printable margin in points
</td></tr>
2043 <td class=
"description">Top printable margin in points
</td></tr>
2045 <td class=
"description">Width of media in points
</td></tr>
2047 <h2 class=
"title"><a id=
"UNIONS">Unions
</a></h2>
2048 <h3 class=
"union"><span class=
"info"> DEPRECATED
 </span><a id=
"ppd_cplimit_u">ppd_cplimit_u
</a></h3>
2049 <p class=
"description">Custom Parameter Limit
</p>
2050 <p class=
"code">union ppd_cplimit_u {
<br>
2051     float custom_curve;
<br>
2052     int custom_int;
<br>
2053     float custom_invcurve;
<br>
2054     int custom_passcode;
<br>
2055     int custom_password;
<br>
2056     float custom_points;
<br>
2057     float custom_real;
<br>
2058     int custom_string;
<br>
2060 <h4 class=
"members">Members
</h4>
2061 <table class=
"list"><tbody>
2062 <tr><th>custom_curve
</th>
2063 <td class=
"description">Gamma value
</td></tr>
2064 <tr><th>custom_int
</th>
2065 <td class=
"description">Integer value
</td></tr>
2066 <tr><th>custom_invcurve
</th>
2067 <td class=
"description">Gamma value
</td></tr>
2068 <tr><th>custom_passcode
</th>
2069 <td class=
"description">Passcode length
</td></tr>
2070 <tr><th>custom_password
</th>
2071 <td class=
"description">Password length
</td></tr>
2072 <tr><th>custom_points
</th>
2073 <td class=
"description">Measurement value
</td></tr>
2074 <tr><th>custom_real
</th>
2075 <td class=
"description">Real value
</td></tr>
2076 <tr><th>custom_string
</th>
2077 <td class=
"description">String length
</td></tr>
2079 <h3 class=
"union"><span class=
"info"> DEPRECATED
 </span><a id=
"ppd_cpvalue_u">ppd_cpvalue_u
</a></h3>
2080 <p class=
"description">Custom Parameter Value
</p>
2081 <p class=
"code">union ppd_cpvalue_u {
<br>
2082     float custom_curve;
<br>
2083     int custom_int;
<br>
2084     float custom_invcurve;
<br>
2085     char *custom_passcode;
<br>
2086     char *custom_password;
<br>
2087     float custom_points;
<br>
2088     float custom_real;
<br>
2089     char *custom_string;
<br>
2091 <h4 class=
"members">Members
</h4>
2092 <table class=
"list"><tbody>
2093 <tr><th>custom_curve
</th>
2094 <td class=
"description">Gamma value
</td></tr>
2095 <tr><th>custom_int
</th>
2096 <td class=
"description">Integer value
</td></tr>
2097 <tr><th>custom_invcurve
</th>
2098 <td class=
"description">Gamma value
</td></tr>
2099 <tr><th>custom_passcode
</th>
2100 <td class=
"description">Passcode value
</td></tr>
2101 <tr><th>custom_password
</th>
2102 <td class=
"description">Password value
</td></tr>
2103 <tr><th>custom_points
</th>
2104 <td class=
"description">Measurement value
</td></tr>
2105 <tr><th>custom_real
</th>
2106 <td class=
"description">Real value
</td></tr>
2107 <tr><th>custom_string
</th>
2108 <td class=
"description">String value
</td></tr>
2110 <h2 class=
"title"><a id=
"ENUMERATIONS">Constants
</a></h2>
2111 <h3 class=
"enumeration"><a id=
"ppd_conform_e"><span class=
"info"> DEPRECATED
 </span>ppd_conform_e
</a></h3>
2112 <p class=
"description">Conformance Levels
</p>
2113 <h4 class=
"constants">Constants
</h4>
2114 <table class=
"list"><tbody>
2115 <tr><th>PPD_CONFORM_RELAXED
</th> <td class=
"description">Relax whitespace and control char
</td></tr>
2116 <tr><th>PPD_CONFORM_STRICT
</th> <td class=
"description">Require strict conformance
</td></tr>
2118 <h3 class=
"enumeration"><a id=
"ppd_cptype_e"><span class=
"info"> DEPRECATED
 </span>ppd_cptype_e
</a></h3>
2119 <p class=
"description">Custom Parameter Type
</p>
2120 <h4 class=
"constants">Constants
</h4>
2121 <table class=
"list"><tbody>
2122 <tr><th>PPD_CUSTOM_CURVE
</th> <td class=
"description">Curve value for f(x) = x^value
</td></tr>
2123 <tr><th>PPD_CUSTOM_INT
</th> <td class=
"description">Integer number value
</td></tr>
2124 <tr><th>PPD_CUSTOM_INVCURVE
</th> <td class=
"description">Curve value for f(x) = x^(
1/value)
</td></tr>
2125 <tr><th>PPD_CUSTOM_PASSCODE
</th> <td class=
"description">String of (hidden) numbers
</td></tr>
2126 <tr><th>PPD_CUSTOM_PASSWORD
</th> <td class=
"description">String of (hidden) characters
</td></tr>
2127 <tr><th>PPD_CUSTOM_POINTS
</th> <td class=
"description">Measurement value in points
</td></tr>
2128 <tr><th>PPD_CUSTOM_REAL
</th> <td class=
"description">Real number value
</td></tr>
2129 <tr><th>PPD_CUSTOM_STRING
</th> <td class=
"description">String of characters
</td></tr>
2130 <tr><th>PPD_CUSTOM_UNKNOWN
</th> <td class=
"description">Unknown type (error)
</td></tr>
2132 <h3 class=
"enumeration"><a id=
"ppd_cs_e"><span class=
"info"> DEPRECATED
 </span>ppd_cs_e
</a></h3>
2133 <p class=
"description">Colorspaces
</p>
2134 <h4 class=
"constants">Constants
</h4>
2135 <table class=
"list"><tbody>
2136 <tr><th>PPD_CS_CMY
</th> <td class=
"description">CMY colorspace
</td></tr>
2137 <tr><th>PPD_CS_CMYK
</th> <td class=
"description">CMYK colorspace
</td></tr>
2138 <tr><th>PPD_CS_GRAY
</th> <td class=
"description">Grayscale colorspace
</td></tr>
2139 <tr><th>PPD_CS_N
</th> <td class=
"description">DeviceN colorspace
</td></tr>
2140 <tr><th>PPD_CS_RGB
</th> <td class=
"description">RGB colorspace
</td></tr>
2141 <tr><th>PPD_CS_RGBK
</th> <td class=
"description">RGBK (K = gray) colorspace
</td></tr>
2143 <h3 class=
"enumeration"><a id=
"ppd_section_e"><span class=
"info"> DEPRECATED
 </span>ppd_section_e
</a></h3>
2144 <p class=
"description">Order dependency sections
</p>
2145 <h4 class=
"constants">Constants
</h4>
2146 <table class=
"list"><tbody>
2147 <tr><th>PPD_ORDER_ANY
</th> <td class=
"description">Option code can be anywhere in the file
</td></tr>
2148 <tr><th>PPD_ORDER_DOCUMENT
</th> <td class=
"description">... must be in the DocumentSetup section
</td></tr>
2149 <tr><th>PPD_ORDER_EXIT
</th> <td class=
"description">... must be sent prior to the document
</td></tr>
2150 <tr><th>PPD_ORDER_JCL
</th> <td class=
"description">... must be sent as a JCL command
</td></tr>
2151 <tr><th>PPD_ORDER_PAGE
</th> <td class=
"description">... must be in the PageSetup section
</td></tr>
2152 <tr><th>PPD_ORDER_PROLOG
</th> <td class=
"description">... must be in the Prolog section
</td></tr>
2154 <h3 class=
"enumeration"><a id=
"ppd_status_e"><span class=
"info"> DEPRECATED
 </span>ppd_status_e
</a></h3>
2155 <p class=
"description">Status Codes
</p>
2156 <h4 class=
"constants">Constants
</h4>
2157 <table class=
"list"><tbody>
2158 <tr><th>PPD_ALLOC_ERROR
</th> <td class=
"description">Memory allocation error
</td></tr>
2159 <tr><th>PPD_BAD_CLOSE_UI
</th> <td class=
"description">Bad CloseUI/JCLCloseUI
</td></tr>
2160 <tr><th>PPD_BAD_CUSTOM_PARAM
</th> <td class=
"description">Bad custom parameter
</td></tr>
2161 <tr><th>PPD_BAD_OPEN_GROUP
</th> <td class=
"description">Bad OpenGroup
</td></tr>
2162 <tr><th>PPD_BAD_OPEN_UI
</th> <td class=
"description">Bad OpenUI/JCLOpenUI
</td></tr>
2163 <tr><th>PPD_BAD_ORDER_DEPENDENCY
</th> <td class=
"description">Bad OrderDependency
</td></tr>
2164 <tr><th>PPD_BAD_UI_CONSTRAINTS
</th> <td class=
"description">Bad UIConstraints
</td></tr>
2165 <tr><th>PPD_BAD_VALUE
</th> <td class=
"description">Bad value string
</td></tr>
2166 <tr><th>PPD_FILE_OPEN_ERROR
</th> <td class=
"description">Unable to open PPD file
</td></tr>
2167 <tr><th>PPD_ILLEGAL_CHARACTER
</th> <td class=
"description">Illegal control character
</td></tr>
2168 <tr><th>PPD_ILLEGAL_MAIN_KEYWORD
</th> <td class=
"description">Illegal main keyword string
</td></tr>
2169 <tr><th>PPD_ILLEGAL_OPTION_KEYWORD
</th> <td class=
"description">Illegal option keyword string
</td></tr>
2170 <tr><th>PPD_ILLEGAL_TRANSLATION
</th> <td class=
"description">Illegal translation string
</td></tr>
2171 <tr><th>PPD_ILLEGAL_WHITESPACE
</th> <td class=
"description">Illegal whitespace character
</td></tr>
2172 <tr><th>PPD_INTERNAL_ERROR
</th> <td class=
"description">Internal error
</td></tr>
2173 <tr><th>PPD_LINE_TOO_LONG
</th> <td class=
"description">Line longer than
255 chars
</td></tr>
2174 <tr><th>PPD_MISSING_ASTERISK
</th> <td class=
"description">Missing asterisk in column
0</td></tr>
2175 <tr><th>PPD_MISSING_CLOSE_GROUP
</th> <td class=
"description">Missing CloseGroup
</td></tr>
2176 <tr><th>PPD_MISSING_CLOSE_UI
</th> <td class=
"description">Missing CloseUI/JCLCloseUI
</td></tr>
2177 <tr><th>PPD_MISSING_OPTION_KEYWORD
</th> <td class=
"description">Missing option keyword
</td></tr>
2178 <tr><th>PPD_MISSING_PPDADOBE4
</th> <td class=
"description">Missing PPD-Adobe-
4.x header
</td></tr>
2179 <tr><th>PPD_MISSING_VALUE
</th> <td class=
"description">Missing value string
</td></tr>
2180 <tr><th>PPD_NESTED_OPEN_GROUP
</th> <td class=
"description">OpenGroup without a CloseGroup first
</td></tr>
2181 <tr><th>PPD_NESTED_OPEN_UI
</th> <td class=
"description">OpenUI/JCLOpenUI without a CloseUI/JCLCloseUI first
</td></tr>
2182 <tr><th>PPD_NULL_FILE
</th> <td class=
"description">NULL PPD file pointer
</td></tr>
2183 <tr><th>PPD_OK
</th> <td class=
"description">OK
</td></tr>
2185 <h3 class=
"enumeration"><a id=
"ppd_ui_e"><span class=
"info"> DEPRECATED
 </span>ppd_ui_e
</a></h3>
2186 <p class=
"description">UI Types
</p>
2187 <h4 class=
"constants">Constants
</h4>
2188 <table class=
"list"><tbody>
2189 <tr><th>PPD_UI_BOOLEAN
</th> <td class=
"description">True or False option
</td></tr>
2190 <tr><th>PPD_UI_PICKMANY
</th> <td class=
"description">Pick zero or more from a list
</td></tr>
2191 <tr><th>PPD_UI_PICKONE
</th> <td class=
"description">Pick one from a list
</td></tr>