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=
"Mini-XML v2.11">
9 <meta name=
"author" content=
"Unknown">
10 <meta name=
"copyright" content=
"Unknown">
11 <style type=
"text/css"><!--
13 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
16 H1, H2, H3, H4, H5, H6, P, TD, TH {
17 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
21 font-family: monaco, courier, monospace;
26 font-family: monaco, courier, monospace;
30 border: dotted thin #7f7f7f;
58 border: dotted thin #999999;
63 PRE.command EM, PRE.example EM {
64 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
68 font-family: monaco, courier, monospace;
79 border: solid thin #999999;
90 -moz-border-radius: 10px;
95 text-decoration: none;
98 A:link:hover, A:visited:hover, A:active {
99 text-decoration: underline;
106 TR.data, TD.data, TR.data TD {
109 border-bottom: solid 1pt #999999;
113 border-bottom: solid 1pt #999999;
120 border: solid thin #999999;
121 border-collapse: collapse;
137 border: solid thin #cccccc;
144 border-bottom: solid thin #999999;
153 caption-side: bottom;
177 border: thin solid black;
185 H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
194 border-bottom: solid 2pt #000000;
197 DIV.indent, TABLE.indent {
205 border-collapse: collapse;
208 TABLE.indent TD, TABLE.indent TH {
213 border-collapse: collapse;
221 border-bottom: solid thin #cccccc;
226 vertical-align: bottom;
235 border-bottom: solid thin #eeeeee;
240 TABLE.list TR:nth-child(even) {
244 TABLE.list TR:nth-child(odd) {
263 font-family: monaco, courier, monospace;
267 border: solid thin #999999;
268 border-collapse: collapse;
273 DIV.summary TABLE TD, DIV.summary TABLE TH {
274 border: solid thin #999999;
280 DIV.summary TABLE THEAD TH {
284 /* API documentation styles... */
291 div.body h3, div.body h4, div.body h5 {
292 margin-bottom: 0.5em;
295 .class, .enumeration, .function, .struct, .typedef, .union {
296 border-bottom: solid thin #999999;
303 code, p.code, pre, ul.code li {
304 font-family: monaco, courier, monospace;
307 ul.code, ul.contents, ul.subcontents {
308 list-style-type: none;
318 ul.contents li ul.code, ul.contents li ul.subcontents {
331 margin-bottom: 0.5em;
334 /* This is just for the HTML files generated with the framedhelp target */
337 border: solid thin black;
346 div.contents ul.contents {
349 div.contents ul.subcontents li {
357 PPD API header for CUPS.
359 Copyright 2008-2012 by Apple Inc.
361 These coded instructions, statements, and computer programs are the
362 property of Apple Inc. and are protected by Federal copyright
363 law. Distribution and use rights are outlined in the file "LICENSE.txt"
364 which should have been included with this file. If this file is
365 file is missing or damaged, see the license at "http://www.cups.org/".
368 <h1 class='title'
>PPD API (DEPRECATED)
</h1>
370 <blockquote>The PPD API is deprecated starting in CUPS
1.6/macOS
10.8. Please use the new Job Ticket APIs in the
<a href=
"api-cups.html">CUPS API
</a> documentation. These functions will be removed in a future release of CUPS.
</blockquote>
372 <div class='summary'
><table summary='General Information'
>
386 <td>Programming:
<a href='api-overview.html' target='_top'
>Introduction to CUPS Programming
</a><br>
387 Programming:
<a href='api-cups.html' target='_top'
>CUPS API
</a><br>
388 Specifications:
<a href='spec-ppd.html' target='_top'
>CUPS PPD Extensions
</a></td>
392 <div class=
"contents">
393 <h2 class=
"title">Contents
</h2>
394 <ul class=
"contents">
395 <li><a href=
"#OVERVIEW">Overview
</a><ul class=
"subcontents">
396 <li><a href=
"#LOADING">Loading a PPD File
</a></li>
397 <li><a href=
"#OPTIONS_AND_GROUPS">Options and Groups
</a></li>
398 <li><a href=
"#CONSTRAINTS">Constraints
</a></li>
399 <li><a href=
"#PAGE_SIZES">Page Sizes
</a></li>
400 <li><a href=
"#ATTRIBUTES">Attributes
</a></li>
402 <li><a href=
"#FUNCTIONS">Functions
</a><ul class=
"subcontents">
403 <li><a href=
"#cupsGetConflicts">cupsGetConflicts
</a></li>
404 <li><a href=
"#cupsGetPPD">cupsGetPPD
</a></li>
405 <li><a href=
"#cupsGetPPD2">cupsGetPPD2
</a></li>
406 <li><a href=
"#cupsGetPPD3">cupsGetPPD3
</a></li>
407 <li><a href=
"#cupsGetServerPPD">cupsGetServerPPD
</a></li>
408 <li><a href=
"#cupsMarkOptions">cupsMarkOptions
</a></li>
409 <li><a href=
"#cupsResolveConflicts">cupsResolveConflicts
</a></li>
410 <li><a href=
"#ppdCollect">ppdCollect
</a></li>
411 <li><a href=
"#ppdCollect2">ppdCollect2
</a></li>
412 <li><a href=
"#ppdConflicts">ppdConflicts
</a></li>
413 <li><a href=
"#ppdEmit">ppdEmit
</a></li>
414 <li><a href=
"#ppdEmitAfterOrder">ppdEmitAfterOrder
</a></li>
415 <li><a href=
"#ppdEmitFd">ppdEmitFd
</a></li>
416 <li><a href=
"#ppdEmitJCL">ppdEmitJCL
</a></li>
417 <li><a href=
"#ppdEmitJCLEnd">ppdEmitJCLEnd
</a></li>
418 <li><a href=
"#ppdEmitString">ppdEmitString
</a></li>
419 <li><a href=
"#ppdFindAttr">ppdFindAttr
</a></li>
420 <li><a href=
"#ppdFindChoice">ppdFindChoice
</a></li>
421 <li><a href=
"#ppdFindCustomOption">ppdFindCustomOption
</a></li>
422 <li><a href=
"#ppdFindCustomParam">ppdFindCustomParam
</a></li>
423 <li><a href=
"#ppdFindMarkedChoice">ppdFindMarkedChoice
</a></li>
424 <li><a href=
"#ppdFindNextAttr">ppdFindNextAttr
</a></li>
425 <li><a href=
"#ppdFindOption">ppdFindOption
</a></li>
426 <li><a href=
"#ppdFirstCustomParam">ppdFirstCustomParam
</a></li>
427 <li><a href=
"#ppdFirstOption">ppdFirstOption
</a></li>
428 <li><a href=
"#ppdInstallableConflict">ppdInstallableConflict
</a></li>
429 <li><a href=
"#ppdIsMarked">ppdIsMarked
</a></li>
430 <li><a href=
"#ppdLocalize">ppdLocalize
</a></li>
431 <li><a href=
"#ppdLocalizeAttr">ppdLocalizeAttr
</a></li>
432 <li><a href=
"#ppdLocalizeIPPReason">ppdLocalizeIPPReason
</a></li>
433 <li><a href=
"#ppdLocalizeMarkerName">ppdLocalizeMarkerName
</a></li>
434 <li><a href=
"#ppdMarkDefaults">ppdMarkDefaults
</a></li>
435 <li><a href=
"#ppdMarkOption">ppdMarkOption
</a></li>
436 <li><a href=
"#ppdNextCustomParam">ppdNextCustomParam
</a></li>
437 <li><a href=
"#ppdNextOption">ppdNextOption
</a></li>
438 <li><a href=
"#ppdPageLength">ppdPageLength
</a></li>
439 <li><a href=
"#ppdPageSize">ppdPageSize
</a></li>
440 <li><a href=
"#ppdPageSizeLimits">ppdPageSizeLimits
</a></li>
441 <li><a href=
"#ppdPageWidth">ppdPageWidth
</a></li>
443 <li><a href=
"#TYPES">Data Types
</a><ul class=
"subcontents">
444 <li><a href=
"#ppd_attr_t">ppd_attr_t
</a></li>
445 <li><a href=
"#ppd_choice_t">ppd_choice_t
</a></li>
446 <li><a href=
"#ppd_conform_t">ppd_conform_t
</a></li>
447 <li><a href=
"#ppd_const_t">ppd_const_t
</a></li>
448 <li><a href=
"#ppd_coption_t">ppd_coption_t
</a></li>
449 <li><a href=
"#ppd_cparam_t">ppd_cparam_t
</a></li>
450 <li><a href=
"#ppd_cplimit_t">ppd_cplimit_t
</a></li>
451 <li><a href=
"#ppd_cptype_t">ppd_cptype_t
</a></li>
452 <li><a href=
"#ppd_cpvalue_t">ppd_cpvalue_t
</a></li>
453 <li><a href=
"#ppd_cs_t">ppd_cs_t
</a></li>
454 <li><a href=
"#ppd_emul_t">ppd_emul_t
</a></li>
455 <li><a href=
"#ppd_file_t">ppd_file_t
</a></li>
456 <li><a href=
"#ppd_group_t">ppd_group_t
</a></li>
457 <li><a href=
"#ppd_option_t">ppd_option_t
</a></li>
458 <li><a href=
"#ppd_profile_t">ppd_profile_t
</a></li>
459 <li><a href=
"#ppd_section_t">ppd_section_t
</a></li>
460 <li><a href=
"#ppd_size_t">ppd_size_t
</a></li>
461 <li><a href=
"#ppd_status_t">ppd_status_t
</a></li>
462 <li><a href=
"#ppd_ui_t">ppd_ui_t
</a></li>
464 <li><a href=
"#STRUCTURES">Structures
</a><ul class=
"subcontents">
465 <li><a href=
"#ppd_attr_s">ppd_attr_s
</a></li>
466 <li><a href=
"#ppd_choice_s">ppd_choice_s
</a></li>
467 <li><a href=
"#ppd_const_s">ppd_const_s
</a></li>
468 <li><a href=
"#ppd_coption_s">ppd_coption_s
</a></li>
469 <li><a href=
"#ppd_cparam_s">ppd_cparam_s
</a></li>
470 <li><a href=
"#ppd_emul_s">ppd_emul_s
</a></li>
471 <li><a href=
"#ppd_file_s">ppd_file_s
</a></li>
472 <li><a href=
"#ppd_group_s">ppd_group_s
</a></li>
473 <li><a href=
"#ppd_option_s">ppd_option_s
</a></li>
474 <li><a href=
"#ppd_profile_s">ppd_profile_s
</a></li>
475 <li><a href=
"#ppd_size_s">ppd_size_s
</a></li>
477 <li><a href=
"#UNIONS">Unions
</a><ul class=
"subcontents">
478 <li><a href=
"#ppd_cplimit_u">ppd_cplimit_u
</a></li>
479 <li><a href=
"#ppd_cpvalue_u">ppd_cpvalue_u
</a></li>
481 <li><a href=
"#ENUMERATIONS">Enumerations
</a><ul class=
"subcontents">
482 <li><a href=
"#ppd_conform_e">ppd_conform_e
</a></li>
483 <li><a href=
"#ppd_cs_e">ppd_cs_e
</a></li>
484 <li><a href=
"#ppd_section_e">ppd_section_e
</a></li>
485 <li><a href=
"#ppd_status_e">ppd_status_e
</a></li>
486 <li><a href=
"#ppd_ui_e">ppd_ui_e
</a></li>
492 PPD API introduction for CUPS.
494 Copyright 2007-2012 by Apple Inc.
495 Copyright 1997-2006 by Easy Software Products, all rights reserved.
497 These coded instructions, statements, and computer programs are the
498 property of Apple Inc. and are protected by Federal copyright
499 law. Distribution and use rights are outlined in the file "LICENSE.txt"
500 which should have been included with this file. If this file is
501 file is missing or damaged, see the license at "http://www.cups.org/".
504 <h2 class='title'
><a name='OVERVIEW'
>Overview
</a></h2>
506 <blockquote>The PPD API is deprecated starting in CUPS
1.6/macOS
10.8. Please use the new Job Ticket APIs in the
<a href=
"api-cups.html">CUPS API
</a> documentation. These functions will be removed in a future release of CUPS.
</blockquote>
508 <p>The CUPS PPD API provides read-only access the data in PostScript Printer
509 Description (
"PPD") files which are used for all printers with a driver. With
510 it you can obtain the data necessary to display printer options to users, mark
511 option choices and check for conflicting choices, and output marked choices in
512 PostScript output. The
<a href=
"#ppd_file_t"><code>ppd_file_t
</code></a>
513 structure contains all of the information in a PPD file.
</p>
515 <blockquote><b>Note:
</b>
517 <p>The CUPS PPD API uses the terms
"option" and
"choice" instead of the Adobe
518 terms
"MainKeyword" and
"OptionKeyword" to refer to specific printer options and
519 features. CUPS also treats option (
"MainKeyword") and choice (
"OptionKeyword")
520 values as case-insensitive strings, so option
"InputSlot" and choice
"Upper"
521 are equivalent to
"inputslot" and
"upper", respectively.
</p>
524 <h3><a name=
"LOADING">Loading a PPD File
</a></h3>
526 <p>The
<a href=
"#ppdOpenFile"><code>ppdOpenFile
</code></a> function
"opens" a
527 PPD file and loads it into memory. For example, the following code opens the
528 current printer's PPD file in a CUPS filter:
</p>
530 <pre class=
"example">
531 #include
<cups/ppd.h
>
533 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd =
<a href=
"#ppdOpenFile">ppdOpenFile
</a>(getenv(
"PPD"));
536 <p>The return value is a pointer to a new
537 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure or
<code>NULL
</code>
538 if the PPD file does not exist or cannot be loaded. The
539 <a href=
"#ppdClose"><code>ppdClose
</code></a> function frees the memory used
540 by the structure:
</p>
542 <pre class=
"example">
543 #include
<cups/ppd.h
>
545 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
547 <a href=
"#ppdClose">ppdClose
</a>(ppd);
550 <p>Once closed, pointers to the
<a href=
"#ppd_file_t"><code>ppd_file_t
</code></a>
551 structure and any data in it will no longer be valid.
</p>
553 <h3><a name=
"OPTIONS_AND_GROUPS">Options and Groups
</a></h3>
555 <p>PPD files support multiple options, which are stored in arrays of
556 <a href=
"#ppd_option_t"><code>ppd_option_t
</code></a> and
557 <a href=
"#ppd_choice_t"><code>ppd_choice_t
</code></a> structures.
</p>
559 <p>Each option in turn is associated with a group stored in a
560 <a href=
"#ppd_group_t"><code>ppd_group_t
</code></a> structure. Groups can be
561 specified in the PPD file; if an option is not associated with a group
562 then it is put in an automatically-generated
"General" group. Groups can also
563 have sub-groups, however CUPS currently ignores sub-groups because of past
564 abuses of this functionality.
</p>
566 <p>Option choices are selected by marking them using one of three functions. The
567 first is
<a href=
"#ppdMarkDefaults"><code>ppdMarkDefaults
</code></a> which
568 selects all of the default options in the PPD file:
</p>
570 <pre class=
"example">
571 #include
<cups/ppd.h
>
573 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
575 <a href=
"#ppdMarkDefaults">ppdMarkDefaults
</a>(ppd);
578 <p>The second is
<a href=
"#ppdMarkOption"><code>ppdMarkOption
</code></a>
579 which selects a single option choice in the PPD file. For example, the following
580 code selects the upper paper tray:
</p>
582 <pre class=
"example">
583 #include
<cups/ppd.h
>
585 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
587 <a href=
"#ppdMarkOption">ppdMarkOption
</a>(ppd,
"InputSlot",
"Upper");
590 <p>The last function is
591 <a href=
"#cupsMarkOptions"><code>cupsMarkOptions
</code></a> which selects
592 multiple option choices in the PPD file from an array of CUPS options, mapping
593 IPP attributes like
"media" and
"sides" to their corresponding PPD options. You
594 typically use this function in a print filter with
595 <code>cupsParseOptions
</code> and
596 <a href=
"#ppdMarkDefaults"><code>ppdMarkDefaults
</code></a> to select all of
597 the option choices needed for the job, for example:
</p>
599 <pre class=
"example">
600 #include
<cups/ppd.h
>
602 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd =
<a href=
"#ppdOpenFile">ppdOpenFile
</a>(getenv(
"PPD"));
603 cups_option_t *options = NULL;
604 int num_options = cupsParseOptions(argv[
5],
0,
&options);
606 <a href=
"#ppdMarkDefaults">ppdMarkDefaults
</a>(ppd);
607 <a href=
"#cupsMarkOptions">cupsMarkOptions
</a>(ppd, num_options, options);
608 cupsFreeOptions(num_options, options);
611 <h3><a name=
"CONSTRAINTS">Constraints
</a></h3>
613 <p>PPD files support specification of conflict conditions, called
614 constraints, between different options. Constraints are stored in an array of
615 <a href=
"#ppd_const_t"><code>ppd_const_t
</code></a> structures which specify
616 the options and choices that conflict with each other. The
617 <a href=
"#ppdConflicts"><code>ppdConflicts
</code></a> function tells you
618 how many of the selected options are incompatible. Since constraints are
619 normally specified in pairs, the returned value is typically an even number.
</p>
621 <h3><a name=
"PAGE_SIZES">Page Sizes
</a></h3>
623 <p>Page sizes are special options which have physical dimensions and margins
624 associated with them. The size information is stored in
625 <a href=
"#ppd_size_t"><code>ppd_size_t
</code></a> structures and is available
626 by looking up the named size with the
627 <a href=
"#ppdPageSize"><code>ppdPageSize
</code></a> function. The page size and
628 margins are returned in units called points; there are
72 points per inch. If
629 you pass
<code>NULL
</code> for the size, the currently selected size is
632 <pre class=
"example">
633 #include
<cups/ppd.h
>
635 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
636 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd, NULL);
639 <p>Besides the standard page sizes listed in a PPD file, some printers
640 support variable or custom page sizes. Custom page sizes are supported if the
641 <code>variables_sizes
</code> member of the
642 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure is non-zero.
643 The
<code>custom_min
</code>,
<code>custom_max
</code>, and
644 <code>custom_margins
</code> members of the
645 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure define the limits
646 of the printable area. To get the resulting media size, use a page size string
647 of the form
"Custom.<I>width</I>x<I>length</I>", where
"width" and
"length" are
648 in points. Custom page size names can also be specified in inches
649 (
"Custom.<i>width</i>x<i>height</i>in"), centimeters
650 (
"Custom.<i>width</i>x<i>height</i>cm"), or millimeters
651 (
"Custom.<i>width</i>x<i>height</i>mm"):
</p>
653 <pre class=
"example">
654 #include
<cups/ppd.h
>
656 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
658 /* Get an
576x720 point custom page size */
659 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.576x720");
661 /* Get an
8x10 inch custom page size */
662 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.8x10in");
664 /* Get a
100x200 millimeter custom page size */
665 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.100x200mm");
667 /* Get a
12.7x34.5 centimeter custom page size */
668 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.12.7x34.5cm");
671 <p>If the PPD does not support variable page sizes, the
672 <a href=
"#ppdPageSize"><code>ppdPageSize
</code></a> function will return
673 <code>NULL
</code>.
</p>
675 <h3><a name=
"ATTRIBUTES">Attributes
</a></h3>
677 <p>Every PPD file is composed of one or more attributes. Most of these
678 attributes are used to define groups, options, choices, and page sizes,
679 however several informational attributes may be present which you can access
680 in your program or filter. Attributes normally look like one of the following
681 examples in a PPD file:
</p>
683 <pre class=
"example">
686 *name spec/text:
"value"
689 <p>The
<a href=
"#ppdFindAttr"><code>ppdFindAttr
</code></a> and
690 <a href=
"#ppdFindNextAttr"><code>ppdFindNextAttr
</code></a> functions find the
691 first and next instances, respectively, of the named attribute with the given
692 "spec" string and return a
<a href=
"#ppd_attr_t"><code>ppd_attr_t
</code></a>
693 structure. If you provide a NULL specifier string, all attributes with the
694 given name will be returned. For example, the following code lists all of the
695 <code>Product
</code> attributes in a PPD file:
</p>
697 <pre class=
"example">
698 #include
<cups/ppd.h
>
700 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
701 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *attr;
703 for (attr =
<a href=
"#ppdFindAttr">ppdFindAttr
</a>(ppd,
"Product", NULL);
705 attr =
<a href=
"#ppdFindNextAttr">ppdFindNextAttr
</a>(ppd,
"Product", NULL))
708 <h2 class=
"title"><a id=
"FUNCTIONS">Functions
</a></h2>
709 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"cupsGetConflicts">cupsGetConflicts
</a></h3>
710 <p class=
"description">Get a list of conflicting options in a marked PPD.
</p>
712 int cupsGetConflicts (
<br />
713     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
714     const char *option,
<br />
715     const char *choice,
<br />
716     cups_option_t **options
<br />
718 <h4 class=
"parameters">Parameters
</h4>
721 <dd class=
"description">PPD file
</dd>
723 <dd class=
"description">Option to test
</dd>
725 <dd class=
"description">Choice to test
</dd>
727 <dd class=
"description">Conflicting options
</dd>
729 <h4 class=
"returnvalue">Return Value
</h4>
730 <p class=
"description">Number of conflicting options
</p>
731 <h4 class=
"discussion">Discussion
</h4>
732 <p class=
"discussion">This function gets a list of options that would conflict if
"option
" and
733 "choice
" were marked in the PPD. You would typically call this function
734 after marking the currently selected options in the PPD in order to
735 determine whether a new option selection would cause a conflict.
<br>
737 The number of conflicting options are returned with
"options
" pointing to
738 the conflicting options. The returned option array must be freed using
739 <a href=
"#cupsFreeOptions"><code>cupsFreeOptions
</code></a>.
742 <h3 class=
"function"><a id=
"cupsGetPPD">cupsGetPPD
</a></h3>
743 <p class=
"description">Get the PPD file for a printer on the default server.
</p>
745 const char *cupsGetPPD (
<br />
746     const char *name
<br />
748 <h4 class=
"parameters">Parameters
</h4>
751 <dd class=
"description">Destination name
</dd>
753 <h4 class=
"returnvalue">Return Value
</h4>
754 <p class=
"description">Filename for PPD file
</p>
755 <h4 class=
"discussion">Discussion
</h4>
756 <p class=
"discussion">For classes,
<code>cupsGetPPD
</code> returns the PPD file for the first printer
759 The returned filename is stored in a static buffer and is overwritten with
760 each call to
<code>cupsGetPPD
</code> or
<a href=
"#cupsGetPPD2"><code>cupsGetPPD2
</code></a>. The caller
"owns
" the
761 file that is created and must
<code>unlink
</code> the returned filename.
</p>
762 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/macOS
10.4 </span><a id=
"cupsGetPPD2">cupsGetPPD2
</a></h3>
763 <p class=
"description">Get the PPD file for a printer from the specified server.
</p>
765 const char *cupsGetPPD2 (
<br />
766     http_t *http,
<br />
767     const char *name
<br />
769 <h4 class=
"parameters">Parameters
</h4>
772 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
774 <dd class=
"description">Destination name
</dd>
776 <h4 class=
"returnvalue">Return Value
</h4>
777 <p class=
"description">Filename for PPD file
</p>
778 <h4 class=
"discussion">Discussion
</h4>
779 <p class=
"discussion">For classes,
<code>cupsGetPPD2
</code> returns the PPD file for the first printer
782 The returned filename is stored in a static buffer and is overwritten with
783 each call to
<a href=
"#cupsGetPPD"><code>cupsGetPPD
</code></a> or
<code>cupsGetPPD2
</code>. The caller
"owns
" the
784 file that is created and must
<code>unlink
</code> the returned filename.
787 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"cupsGetPPD3">cupsGetPPD3
</a></h3>
788 <p class=
"description">Get the PPD file for a printer on the specified
789 server if it has changed.
</p>
791 http_status_t cupsGetPPD3 (
<br />
792     http_t *http,
<br />
793     const char *name,
<br />
794     time_t *modtime,
<br />
795     char *buffer,
<br />
796     size_t bufsize
<br />
798 <h4 class=
"parameters">Parameters
</h4>
801 <dd class=
"description">HTTP connection or
<code>CUPS_HTTP_DEFAULT
</code></dd>
803 <dd class=
"description">Destination name
</dd>
805 <dd class=
"description">Modification time
</dd>
807 <dd class=
"description">Filename buffer
</dd>
809 <dd class=
"description">Size of filename buffer
</dd>
811 <h4 class=
"returnvalue">Return Value
</h4>
812 <p class=
"description">HTTP status
</p>
813 <h4 class=
"discussion">Discussion
</h4>
814 <p class=
"discussion">The
"modtime
" parameter contains the modification time of any
815 locally-cached content and is updated with the time from the PPD file on
818 The
"buffer
" parameter contains the local PPD filename. If it contains
819 the empty string, a new temporary file is created, otherwise the existing
820 file will be overwritten as needed. The caller
"owns
" the file that is
821 created and must
<code>unlink
</code> the returned filename.
<br>
823 On success,
<code>HTTP_STATUS_OK
</code> is returned for a new PPD file and
824 <code>HTTP_STATUS_NOT_MODIFIED
</code> if the existing PPD file is up-to-date. Any other
825 status is an error.
<br>
827 For classes,
<code>cupsGetPPD3
</code> returns the PPD file for the first printer
831 <h3 class=
"function"><span class=
"info"> CUPS
1.3/macOS
10.5 </span><a id=
"cupsGetServerPPD">cupsGetServerPPD
</a></h3>
832 <p class=
"description">Get an available PPD file from the server.
</p>
834 char *cupsGetServerPPD (
<br />
835     http_t *http,
<br />
836     const char *name
<br />
838 <h4 class=
"parameters">Parameters
</h4>
841 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
843 <dd class=
"description">Name of PPD file (
"ppd-name
")
</dd>
845 <h4 class=
"returnvalue">Return Value
</h4>
846 <p class=
"description">Name of PPD file or
<code>NULL
</code> on error
</p>
847 <h4 class=
"discussion">Discussion
</h4>
848 <p class=
"discussion">This function returns the named PPD file from the server. The
849 list of available PPDs is provided by the IPP
<code>CUPS_GET_PPDS
</code>
852 You must remove (unlink) the PPD file when you are finished with
853 it. The PPD filename is stored in a static location that will be
854 overwritten on the next call to
<a href=
"#cupsGetPPD"><code>cupsGetPPD
</code></a>,
<a href=
"#cupsGetPPD2"><code>cupsGetPPD2
</code></a>,
855 or
<a href=
"#cupsGetServerPPD"><code>cupsGetServerPPD
</code></a>.
858 <h3 class=
"function"><a id=
"cupsMarkOptions">cupsMarkOptions
</a></h3>
859 <p class=
"description">Mark command-line options in a PPD file.
</p>
861 int cupsMarkOptions (
<br />
862     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
863     int num_options,
<br />
864     cups_option_t *options
<br />
866 <h4 class=
"parameters">Parameters
</h4>
869 <dd class=
"description">PPD file
</dd>
871 <dd class=
"description">Number of options
</dd>
873 <dd class=
"description">Options
</dd>
875 <h4 class=
"returnvalue">Return Value
</h4>
876 <p class=
"description">1 if conflicts exist,
0 otherwise
</p>
877 <h4 class=
"discussion">Discussion
</h4>
878 <p class=
"discussion">This function maps the IPP
"finishings
",
"media
",
"mirror
",
879 "multiple-document-handling
",
"output-bin
",
"print-color-mode
",
880 "print-quality
",
"printer-resolution
", and
"sides
" attributes to their
881 corresponding PPD options and choices.
</p>
882 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"cupsResolveConflicts">cupsResolveConflicts
</a></h3>
883 <p class=
"description">Resolve conflicts in a marked PPD.
</p>
885 int cupsResolveConflicts (
<br />
886     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
887     const char *option,
<br />
888     const char *choice,
<br />
889     int *num_options,
<br />
890     cups_option_t **options
<br />
892 <h4 class=
"parameters">Parameters
</h4>
895 <dd class=
"description">PPD file
</dd>
897 <dd class=
"description">Newly selected option or
<code>NULL
</code> for none
</dd>
899 <dd class=
"description">Newly selected choice or
<code>NULL
</code> for none
</dd>
901 <dd class=
"description">Number of additional selected options
</dd>
903 <dd class=
"description">Additional selected options
</dd>
905 <h4 class=
"returnvalue">Return Value
</h4>
906 <p class=
"description">1 on success,
0 on failure
</p>
907 <h4 class=
"discussion">Discussion
</h4>
908 <p class=
"discussion">This function attempts to resolve any conflicts in a marked PPD, returning
909 a list of option changes that are required to resolve them. On input,
910 "num_options
" and
"options
" contain any pending option changes that have
911 not yet been marked, while
"option
" and
"choice
" contain the most recent
912 selection which may or may not be in
"num_options
" or
"options
".
<br>
914 On successful return,
"num_options
" and
"options
" are updated to contain
915 "option
" and
"choice
" along with any changes required to resolve conflicts
916 specified in the PPD file and
1 is returned.
<br>
918 If option conflicts cannot be resolved,
"num_options
" and
"options
" are not
919 changed and
0 is returned.
<br>
921 When resolving conflicts,
<code>cupsResolveConflicts
</code> does not consider
922 changes to the current page size (
<code>media
</code>,
<code>PageSize
</code>, and
923 <code>PageRegion
</code>) or to the most recent option specified in
"option
".
924 Thus, if the only way to resolve a conflict is to change the page size
925 or the option the user most recently changed,
<code>cupsResolveConflicts
</code>
926 will return
0 to indicate it was unable to resolve the conflicts.
<br>
928 The
<code>cupsResolveConflicts
</code> function uses one of two sources of option
929 constraint information. The preferred constraint information is defined by
930 <code>cupsUIConstraints
</code> and
<code>cupsUIResolver
</code> attributes - in this
931 case, the PPD file provides constraint resolution actions.
<br>
933 The backup constraint information is defined by the
934 <code>UIConstraints
</code> and
<code>NonUIConstraints
</code> attributes. These
935 constraints are resolved algorithmically by first selecting the default
936 choice for the conflicting option, then iterating over all possible choices
937 until a non-conflicting option choice is found.
940 <h3 class=
"function"><a id=
"ppdCollect">ppdCollect
</a></h3>
941 <p class=
"description">Collect all marked options that reside in the specified
944 int ppdCollect (
<br />
945     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
946     <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br />
947     <a href=
"#ppd_choice_t">ppd_choice_t
</a> ***choices
<br />
949 <h4 class=
"parameters">Parameters
</h4>
952 <dd class=
"description">PPD file data
</dd>
954 <dd class=
"description">Section to collect
</dd>
956 <dd class=
"description">Pointers to choices
</dd>
958 <h4 class=
"returnvalue">Return Value
</h4>
959 <p class=
"description">Number of options marked
</p>
960 <h4 class=
"discussion">Discussion
</h4>
961 <p class=
"discussion">The choices array should be freed using
<code>free
</code> when you are
962 finished with it.
</p>
963 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppdCollect2">ppdCollect2
</a></h3>
964 <p class=
"description">Collect all marked options that reside in the
965 specified section and minimum order.
</p>
967 int ppdCollect2 (
<br />
968     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
969     <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br />
970     float min_order,
<br />
971     <a href=
"#ppd_choice_t">ppd_choice_t
</a> ***choices
<br />
973 <h4 class=
"parameters">Parameters
</h4>
976 <dd class=
"description">PPD file data
</dd>
978 <dd class=
"description">Section to collect
</dd>
980 <dd class=
"description">Minimum OrderDependency value
</dd>
982 <dd class=
"description">Pointers to choices
</dd>
984 <h4 class=
"returnvalue">Return Value
</h4>
985 <p class=
"description">Number of options marked
</p>
986 <h4 class=
"discussion">Discussion
</h4>
987 <p class=
"discussion">The choices array should be freed using
<code>free
</code> when you are
991 <h3 class=
"function"><a id=
"ppdConflicts">ppdConflicts
</a></h3>
992 <p class=
"description">Check to see if there are any conflicts among the
993 marked option choices.
</p>
995 int ppdConflicts (
<br />
996     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br />
998 <h4 class=
"parameters">Parameters
</h4>
1001 <dd class=
"description">PPD to check
</dd>
1003 <h4 class=
"returnvalue">Return Value
</h4>
1004 <p class=
"description">Number of conflicts found
</p>
1005 <h4 class=
"discussion">Discussion
</h4>
1006 <p class=
"discussion">The returned value is the same as returned by
<a href=
"#ppdMarkOption"><code>ppdMarkOption
</code></a>.
</p>
1007 <h3 class=
"function"><a id=
"ppdEmit">ppdEmit
</a></h3>
1008 <p class=
"description">Emit code for marked options to a file.
</p>
1011     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
1012     FILE *fp,
<br />
1013     <a href=
"#ppd_section_t">ppd_section_t
</a> section
<br />
1015 <h4 class=
"parameters">Parameters
</h4>
1018 <dd class=
"description">PPD file record
</dd>
1020 <dd class=
"description">File to write to
</dd>
1022 <dd class=
"description">Section to write
</dd>
1024 <h4 class=
"returnvalue">Return Value
</h4>
1025 <p class=
"description">0 on success, -
1 on failure
</p>
1026 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppdEmitAfterOrder">ppdEmitAfterOrder
</a></h3>
1027 <p class=
"description">Emit a subset of the code for marked options to a file.
</p>
1029 int ppdEmitAfterOrder (
<br />
1030     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
1031     FILE *fp,
<br />
1032     <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br />
1033     int limit,
<br />
1034     float min_order
<br />
1036 <h4 class=
"parameters">Parameters
</h4>
1039 <dd class=
"description">PPD file record
</dd>
1041 <dd class=
"description">File to write to
</dd>
1043 <dd class=
"description">Section to write
</dd>
1045 <dd class=
"description">Non-zero to use min_order
</dd>
1047 <dd class=
"description">Lowest OrderDependency
</dd>
1049 <h4 class=
"returnvalue">Return Value
</h4>
1050 <p class=
"description">0 on success, -
1 on failure
</p>
1051 <h4 class=
"discussion">Discussion
</h4>
1052 <p class=
"discussion">When
"limit
" is non-zero, this function only emits options whose
1053 OrderDependency value is greater than or equal to
"min_order
".
<br>
1055 When
"limit
" is zero, this function is identical to ppdEmit().
1058 <h3 class=
"function"><a id=
"ppdEmitFd">ppdEmitFd
</a></h3>
1059 <p class=
"description">Emit code for marked options to a file.
</p>
1061 int ppdEmitFd (
<br />
1062     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
1063     int fd,
<br />
1064     <a href=
"#ppd_section_t">ppd_section_t
</a> section
<br />
1066 <h4 class=
"parameters">Parameters
</h4>
1069 <dd class=
"description">PPD file record
</dd>
1071 <dd class=
"description">File to write to
</dd>
1073 <dd class=
"description">Section to write
</dd>
1075 <h4 class=
"returnvalue">Return Value
</h4>
1076 <p class=
"description">0 on success, -
1 on failure
</p>
1077 <h3 class=
"function"><a id=
"ppdEmitJCL">ppdEmitJCL
</a></h3>
1078 <p class=
"description">Emit code for JCL options to a file.
</p>
1080 int ppdEmitJCL (
<br />
1081     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
1082     FILE *fp,
<br />
1083     int job_id,
<br />
1084     const char *user,
<br />
1085     const char *title
<br />
1087 <h4 class=
"parameters">Parameters
</h4>
1090 <dd class=
"description">PPD file record
</dd>
1092 <dd class=
"description">File to write to
</dd>
1094 <dd class=
"description">Job ID
</dd>
1096 <dd class=
"description">Username
</dd>
1098 <dd class=
"description">Title
</dd>
1100 <h4 class=
"returnvalue">Return Value
</h4>
1101 <p class=
"description">0 on success, -
1 on failure
</p>
1102 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppdEmitJCLEnd">ppdEmitJCLEnd
</a></h3>
1103 <p class=
"description">Emit JCLEnd code to a file.
</p>
1105 int ppdEmitJCLEnd (
<br />
1106     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
1107     FILE *fp
<br />
1109 <h4 class=
"parameters">Parameters
</h4>
1112 <dd class=
"description">PPD file record
</dd>
1114 <dd class=
"description">File to write to
</dd>
1116 <h4 class=
"returnvalue">Return Value
</h4>
1117 <p class=
"description">0 on success, -
1 on failure
</p>
1118 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppdEmitString">ppdEmitString
</a></h3>
1119 <p class=
"description">Get a string containing the code for marked options.
</p>
1121 char *ppdEmitString (
<br />
1122     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
1123     <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br />
1124     float min_order
<br />
1126 <h4 class=
"parameters">Parameters
</h4>
1129 <dd class=
"description">PPD file record
</dd>
1131 <dd class=
"description">Section to write
</dd>
1133 <dd class=
"description">Lowest OrderDependency
</dd>
1135 <h4 class=
"returnvalue">Return Value
</h4>
1136 <p class=
"description">String containing option code or
<code>NULL
</code> if there is no option code
</p>
1137 <h4 class=
"discussion">Discussion
</h4>
1138 <p class=
"discussion">When
"min_order
" is greater than zero, this function only includes options
1139 whose OrderDependency value is greater than or equal to
"min_order
".
1140 Otherwise, all options in the specified section are included in the
1141 returned string.
<br>
1143 The return string is allocated on the heap and should be freed using
1144 <code>free
</code> when you are done with it.
1147 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a id=
"ppdFindAttr">ppdFindAttr
</a></h3>
1148 <p class=
"description">Find the first matching attribute.
</p>
1150 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *ppdFindAttr (
<br />
1151     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
1152     const char *name,
<br />
1153     const char *spec
<br />
1155 <h4 class=
"parameters">Parameters
</h4>
1158 <dd class=
"description">PPD file data
</dd>
1160 <dd class=
"description">Attribute name
</dd>
1162 <dd class=
"description">Specifier string or
<code>NULL
</code></dd>
1164 <h4 class=
"returnvalue">Return Value
</h4>
1165 <p class=
"description">Attribute or
<code>NULL
</code> if not found
</p>
1166 <h3 class=
"function"><a id=
"ppdFindChoice">ppdFindChoice
</a></h3>
1167 <p class=
"description">Return a pointer to an option choice.
</p>
1169 <a href=
"#ppd_choice_t">ppd_choice_t
</a> *ppdFindChoice (
<br />
1170     <a href=
"#ppd_option_t">ppd_option_t
</a> *o,
<br />
1171     const char *choice
<br />
1173 <h4 class=
"parameters">Parameters
</h4>
1176 <dd class=
"description">Pointer to option
</dd>
1178 <dd class=
"description">Name of choice
</dd>
1180 <h4 class=
"returnvalue">Return Value
</h4>
1181 <p class=
"description">Choice pointer or
<code>NULL
</code></p>
1182 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppdFindCustomOption">ppdFindCustomOption
</a></h3>
1183 <p class=
"description">Find a custom option.
</p>
1185 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *ppdFindCustomOption (
<br />
1186     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
1187     const char *keyword
<br />
1189 <h4 class=
"parameters">Parameters
</h4>
1192 <dd class=
"description">PPD file
</dd>
1194 <dd class=
"description">Custom option name
</dd>
1196 <h4 class=
"returnvalue">Return Value
</h4>
1197 <p class=
"description">Custom option or NULL
</p>
1198 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppdFindCustomParam">ppdFindCustomParam
</a></h3>
1199 <p class=
"description">Find a parameter for a custom option.
</p>
1201 <a href=
"#ppd_cparam_t">ppd_cparam_t
</a> *ppdFindCustomParam (
<br />
1202     <a href=
"#ppd_coption_t">ppd_coption_t
</a> *opt,
<br />
1203     const char *name
<br />
1205 <h4 class=
"parameters">Parameters
</h4>
1208 <dd class=
"description">Custom option
</dd>
1210 <dd class=
"description">Parameter name
</dd>
1212 <h4 class=
"returnvalue">Return Value
</h4>
1213 <p class=
"description">Custom parameter or NULL
</p>
1214 <h3 class=
"function"><a id=
"ppdFindMarkedChoice">ppdFindMarkedChoice
</a></h3>
1215 <p class=
"description">Return the marked choice for the specified option.
</p>
1217 <a href=
"#ppd_choice_t">ppd_choice_t
</a> *ppdFindMarkedChoice (
<br />
1218     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
1219     const char *option
<br />
1221 <h4 class=
"parameters">Parameters
</h4>
1224 <dd class=
"description">PPD file
</dd>
1226 <dd class=
"description">Keyword/option name
</dd>
1228 <h4 class=
"returnvalue">Return Value
</h4>
1229 <p class=
"description">Pointer to choice or
<code>NULL
</code></p>
1230 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a id=
"ppdFindNextAttr">ppdFindNextAttr
</a></h3>
1231 <p class=
"description">Find the next matching attribute.
</p>
1233 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *ppdFindNextAttr (
<br />
1234     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
1235     const char *name,
<br />
1236     const char *spec
<br />
1238 <h4 class=
"parameters">Parameters
</h4>
1241 <dd class=
"description">PPD file data
</dd>
1243 <dd class=
"description">Attribute name
</dd>
1245 <dd class=
"description">Specifier string or
<code>NULL
</code></dd>
1247 <h4 class=
"returnvalue">Return Value
</h4>
1248 <p class=
"description">Attribute or
<code>NULL
</code> if not found
</p>
1249 <h3 class=
"function"><a id=
"ppdFindOption">ppdFindOption
</a></h3>
1250 <p class=
"description">Return a pointer to the specified option.
</p>
1252 <a href=
"#ppd_option_t">ppd_option_t
</a> *ppdFindOption (
<br />
1253     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
1254     const char *option
<br />
1256 <h4 class=
"parameters">Parameters
</h4>
1259 <dd class=
"description">PPD file data
</dd>
1261 <dd class=
"description">Option/Keyword name
</dd>
1263 <h4 class=
"returnvalue">Return Value
</h4>
1264 <p class=
"description">Pointer to option or
<code>NULL
</code></p>
1265 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppdFirstCustomParam">ppdFirstCustomParam
</a></h3>
1266 <p class=
"description">Return the first parameter for a custom option.
</p>
1268 <a href=
"#ppd_cparam_t">ppd_cparam_t
</a> *ppdFirstCustomParam (
<br />
1269     <a href=
"#ppd_coption_t">ppd_coption_t
</a> *opt
<br />
1271 <h4 class=
"parameters">Parameters
</h4>
1274 <dd class=
"description">Custom option
</dd>
1276 <h4 class=
"returnvalue">Return Value
</h4>
1277 <p class=
"description">Custom parameter or NULL
</p>
1278 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppdFirstOption">ppdFirstOption
</a></h3>
1279 <p class=
"description">Return the first option in the PPD file.
</p>
1281 <a href=
"#ppd_option_t">ppd_option_t
</a> *ppdFirstOption (
<br />
1282     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br />
1284 <h4 class=
"parameters">Parameters
</h4>
1287 <dd class=
"description">PPD file
</dd>
1289 <h4 class=
"returnvalue">Return Value
</h4>
1290 <p class=
"description">First option or
<code>NULL
</code></p>
1291 <h4 class=
"discussion">Discussion
</h4>
1292 <p class=
"discussion">Options are returned from all groups in ascending alphanumeric order.
1295 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"ppdInstallableConflict">ppdInstallableConflict
</a></h3>
1296 <p class=
"description">Test whether an option choice conflicts with
1297 an installable option.
</p>
1299 int ppdInstallableConflict (
<br />
1300     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
1301     const char *option,
<br />
1302     const char *choice
<br />
1304 <h4 class=
"parameters">Parameters
</h4>
1307 <dd class=
"description">PPD file
</dd>
1309 <dd class=
"description">Option
</dd>
1311 <dd class=
"description">Choice
</dd>
1313 <h4 class=
"returnvalue">Return Value
</h4>
1314 <p class=
"description">1 if conflicting,
0 if not conflicting
</p>
1315 <h4 class=
"discussion">Discussion
</h4>
1316 <p class=
"discussion">This function tests whether a particular option choice is available based
1317 on constraints against options in the
"InstallableOptions
" group.
1320 <h3 class=
"function"><a id=
"ppdIsMarked">ppdIsMarked
</a></h3>
1321 <p class=
"description">Check to see if an option is marked.
</p>
1323 int ppdIsMarked (
<br />
1324     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
1325     const char *option,
<br />
1326     const char *choice
<br />
1328 <h4 class=
"parameters">Parameters
</h4>
1331 <dd class=
"description">PPD file data
</dd>
1333 <dd class=
"description">Option/Keyword name
</dd>
1335 <dd class=
"description">Choice name
</dd>
1337 <h4 class=
"returnvalue">Return Value
</h4>
1338 <p class=
"description">Non-zero if option is marked
</p>
1339 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppdLocalize">ppdLocalize
</a></h3>
1340 <p class=
"description">Localize the PPD file to the current locale.
</p>
1342 int ppdLocalize (
<br />
1343     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br />
1345 <h4 class=
"parameters">Parameters
</h4>
1348 <dd class=
"description">PPD file
</dd>
1350 <h4 class=
"returnvalue">Return Value
</h4>
1351 <p class=
"description">0 on success, -
1 on error
</p>
1352 <h4 class=
"discussion">Discussion
</h4>
1353 <p class=
"discussion">All groups, options, and choices are localized, as are ICC profile
1354 descriptions, printer presets, and custom option parameters. Each
1355 localized string uses the UTF-
8 character encoding.
1358 <h3 class=
"function"><a id=
"ppdLocalizeAttr">ppdLocalizeAttr
</a></h3>
1359 <p class=
"description">Localize an attribute.
</p>
1361 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *ppdLocalizeAttr (
<br />
1362     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
1363     const char *keyword,
<br />
1364     const char *spec
<br />
1366 <h4 class=
"parameters">Parameters
</h4>
1369 <dd class=
"description">PPD file
</dd>
1371 <dd class=
"description">Main keyword
</dd>
1373 <dd class=
"description">Option keyword or
<code>NULL
</code> for none
</dd>
1375 <h4 class=
"returnvalue">Return Value
</h4>
1376 <p class=
"description">Localized attribute or
<code>NULL
</code> if none exists
</p>
1377 <h4 class=
"discussion">Discussion
</h4>
1378 <p class=
"discussion">This function uses the current locale to find the localized attribute for
1379 the given main and option keywords. If no localized version of the
1380 attribute exists for the current locale, the unlocalized version is returned.
</p>
1381 <h3 class=
"function"><span class=
"info"> CUPS
1.3/macOS
10.5 </span><a id=
"ppdLocalizeIPPReason">ppdLocalizeIPPReason
</a></h3>
1382 <p class=
"description">Get the localized version of a cupsIPPReason
1385 const char *ppdLocalizeIPPReason (
<br />
1386     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
1387     const char *reason,
<br />
1388     const char *scheme,
<br />
1389     char *buffer,
<br />
1390     size_t bufsize
<br />
1392 <h4 class=
"parameters">Parameters
</h4>
1395 <dd class=
"description">PPD file
</dd>
1397 <dd class=
"description">IPP reason keyword to look up
</dd>
1399 <dd class=
"description">URI scheme or NULL for text
</dd>
1401 <dd class=
"description">Value buffer
</dd>
1403 <dd class=
"description">Size of value buffer
</dd>
1405 <h4 class=
"returnvalue">Return Value
</h4>
1406 <p class=
"description">Value or NULL if not found
</p>
1407 <h4 class=
"discussion">Discussion
</h4>
1408 <p class=
"discussion">This function uses the current locale to find the corresponding reason
1409 text or URI from the attribute value. If
"scheme
" is NULL or
"text
",
1410 the returned value contains human-readable (UTF-
8) text from the translation
1411 string or attribute value. Otherwise the corresponding URI is returned.
<br>
1413 If no value of the requested scheme can be found, NULL is returned.
1416 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"ppdLocalizeMarkerName">ppdLocalizeMarkerName
</a></h3>
1417 <p class=
"description">Get the localized version of a marker-names
1418 attribute value.
</p>
1420 const char *ppdLocalizeMarkerName (
<br />
1421     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
1422     const char *name
<br />
1424 <h4 class=
"parameters">Parameters
</h4>
1427 <dd class=
"description">PPD file
</dd>
1429 <dd class=
"description">Marker name to look up
</dd>
1431 <h4 class=
"returnvalue">Return Value
</h4>
1432 <p class=
"description">Value or
<code>NULL
</code> if not found
</p>
1433 <h4 class=
"discussion">Discussion
</h4>
1434 <p class=
"discussion">This function uses the current locale to find the corresponding name
1435 text from the attribute value. If no localized text for the requested
1436 name can be found,
<code>NULL
</code> is returned.
1439 <h3 class=
"function"><a id=
"ppdMarkDefaults">ppdMarkDefaults
</a></h3>
1440 <p class=
"description">Mark all default options in the PPD file.
</p>
1442 void ppdMarkDefaults (
<br />
1443     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br />
1445 <h4 class=
"parameters">Parameters
</h4>
1448 <dd class=
"description">PPD file record
</dd>
1450 <h3 class=
"function"><a id=
"ppdMarkOption">ppdMarkOption
</a></h3>
1451 <p class=
"description">Mark an option in a PPD file and return the number of
1454 int ppdMarkOption (
<br />
1455     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
1456     const char *option,
<br />
1457     const char *choice
<br />
1459 <h4 class=
"parameters">Parameters
</h4>
1462 <dd class=
"description">PPD file record
</dd>
1464 <dd class=
"description">Keyword
</dd>
1466 <dd class=
"description">Option name
</dd>
1468 <h4 class=
"returnvalue">Return Value
</h4>
1469 <p class=
"description">Number of conflicts
</p>
1470 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppdNextCustomParam">ppdNextCustomParam
</a></h3>
1471 <p class=
"description">Return the next parameter for a custom option.
</p>
1473 <a href=
"#ppd_cparam_t">ppd_cparam_t
</a> *ppdNextCustomParam (
<br />
1474     <a href=
"#ppd_coption_t">ppd_coption_t
</a> *opt
<br />
1476 <h4 class=
"parameters">Parameters
</h4>
1479 <dd class=
"description">Custom option
</dd>
1481 <h4 class=
"returnvalue">Return Value
</h4>
1482 <p class=
"description">Custom parameter or NULL
</p>
1483 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppdNextOption">ppdNextOption
</a></h3>
1484 <p class=
"description">Return the next option in the PPD file.
</p>
1486 <a href=
"#ppd_option_t">ppd_option_t
</a> *ppdNextOption (
<br />
1487     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br />
1489 <h4 class=
"parameters">Parameters
</h4>
1492 <dd class=
"description">PPD file
</dd>
1494 <h4 class=
"returnvalue">Return Value
</h4>
1495 <p class=
"description">Next option or
<code>NULL
</code></p>
1496 <h4 class=
"discussion">Discussion
</h4>
1497 <p class=
"discussion">Options are returned from all groups in ascending alphanumeric order.
1500 <h3 class=
"function"><a id=
"ppdPageLength">ppdPageLength
</a></h3>
1501 <p class=
"description">Get the page length for the given size.
</p>
1503 float ppdPageLength (
<br />
1504     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
1505     const char *name
<br />
1507 <h4 class=
"parameters">Parameters
</h4>
1510 <dd class=
"description">PPD file
</dd>
1512 <dd class=
"description">Size name
</dd>
1514 <h4 class=
"returnvalue">Return Value
</h4>
1515 <p class=
"description">Length of page in points or
0.0</p>
1516 <h3 class=
"function"><a id=
"ppdPageSize">ppdPageSize
</a></h3>
1517 <p class=
"description">Get the page size record for the named size.
</p>
1519 <a href=
"#ppd_size_t">ppd_size_t
</a> *ppdPageSize (
<br />
1520     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
1521     const char *name
<br />
1523 <h4 class=
"parameters">Parameters
</h4>
1526 <dd class=
"description">PPD file record
</dd>
1528 <dd class=
"description">Size name
</dd>
1530 <h4 class=
"returnvalue">Return Value
</h4>
1531 <p class=
"description">Size record for page or NULL
</p>
1532 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"ppdPageSizeLimits">ppdPageSizeLimits
</a></h3>
1533 <p class=
"description">Return the custom page size limits.
</p>
1535 int ppdPageSizeLimits (
<br />
1536     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
1537     <a href=
"#ppd_size_t">ppd_size_t
</a> *minimum,
<br />
1538     <a href=
"#ppd_size_t">ppd_size_t
</a> *maximum
<br />
1540 <h4 class=
"parameters">Parameters
</h4>
1543 <dd class=
"description">PPD file record
</dd>
1545 <dd class=
"description">Minimum custom size
</dd>
1547 <dd class=
"description">Maximum custom size
</dd>
1549 <h4 class=
"returnvalue">Return Value
</h4>
1550 <p class=
"description">1 if custom sizes are supported,
0 otherwise
</p>
1551 <h4 class=
"discussion">Discussion
</h4>
1552 <p class=
"discussion">This function returns the minimum and maximum custom page sizes and printable
1553 areas based on the currently-marked (selected) options.
<br>
1555 If the specified PPD file does not support custom page sizes, both
1556 "minimum
" and
"maximum
" are filled with zeroes.
1559 <h3 class=
"function"><a id=
"ppdPageWidth">ppdPageWidth
</a></h3>
1560 <p class=
"description">Get the page width for the given size.
</p>
1562 float ppdPageWidth (
<br />
1563     <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br />
1564     const char *name
<br />
1566 <h4 class=
"parameters">Parameters
</h4>
1569 <dd class=
"description">PPD file record
</dd>
1571 <dd class=
"description">Size name
</dd>
1573 <h4 class=
"returnvalue">Return Value
</h4>
1574 <p class=
"description">Width of page in points or
0.0</p>
1575 <h2 class=
"title"><a id=
"TYPES">Data Types
</a></h2>
1576 <h3 class=
"typedef"><a id=
"ppd_attr_t"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span>ppd_attr_t
</a></h3>
1577 <p class=
"description">PPD Attribute Structure
</p>
1579 typedef struct
<a href=
"#ppd_attr_s">ppd_attr_s
</a> ppd_attr_t;
1581 <h3 class=
"typedef"><a id=
"ppd_choice_t">ppd_choice_t
</a></h3>
1582 <p class=
"description">Option choices
</p>
1584 typedef struct
<a href=
"#ppd_choice_s">ppd_choice_s
</a> ppd_choice_t;
1586 <h3 class=
"typedef"><a id=
"ppd_conform_t"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span>ppd_conform_t
</a></h3>
1587 <p class=
"description">Conformance Levels
</p>
1589 typedef enum
<a href=
"#ppd_conform_e">ppd_conform_e
</a> ppd_conform_t;
1591 <h3 class=
"typedef"><a id=
"ppd_const_t">ppd_const_t
</a></h3>
1592 <p class=
"description">Constraints
</p>
1594 typedef struct
<a href=
"#ppd_const_s">ppd_const_s
</a> ppd_const_t;
1596 <h3 class=
"typedef"><a id=
"ppd_coption_t"><span class=
"info"> CUPS
1.2/macOS
10.5 </span>ppd_coption_t
</a></h3>
1597 <p class=
"description">Custom Option
</p>
1599 typedef struct
<a href=
"#ppd_coption_s">ppd_coption_s
</a> ppd_coption_t;
1601 <h3 class=
"typedef"><a id=
"ppd_cparam_t"><span class=
"info"> CUPS
1.2/macOS
10.5 </span>ppd_cparam_t
</a></h3>
1602 <p class=
"description">Custom Parameter
</p>
1604 typedef struct
<a href=
"#ppd_cparam_s">ppd_cparam_s
</a> ppd_cparam_t;
1606 <h3 class=
"typedef"><a id=
"ppd_cplimit_t"><span class=
"info"> CUPS
1.2/macOS
10.5 </span>ppd_cplimit_t
</a></h3>
1607 <p class=
"description">Custom Parameter Limit
</p>
1609 typedef union
<a href=
"#ppd_cplimit_u">ppd_cplimit_u
</a> ppd_cplimit_t;
1611 <h3 class=
"typedef"><a id=
"ppd_cptype_t"><span class=
"info"> CUPS
1.2/macOS
10.5 </span>ppd_cptype_t
</a></h3>
1612 <p class=
"description">Custom Parameter Type
</p>
1614 typedef enum ppd_cptype_e ppd_cptype_t;
1616 <h3 class=
"typedef"><a id=
"ppd_cpvalue_t"><span class=
"info"> CUPS
1.2/macOS
10.5 </span>ppd_cpvalue_t
</a></h3>
1617 <p class=
"description">Custom Parameter Value
</p>
1619 typedef union
<a href=
"#ppd_cpvalue_u">ppd_cpvalue_u
</a> ppd_cpvalue_t;
1621 <h3 class=
"typedef"><a id=
"ppd_cs_t">ppd_cs_t
</a></h3>
1622 <p class=
"description">Colorspaces
</p>
1624 typedef enum
<a href=
"#ppd_cs_e">ppd_cs_e
</a> ppd_cs_t;
1626 <h3 class=
"typedef"><a id=
"ppd_emul_t">ppd_emul_t
</a></h3>
1627 <p class=
"description">Emulators
</p>
1629 typedef struct
<a href=
"#ppd_emul_s">ppd_emul_s
</a> ppd_emul_t;
1631 <h3 class=
"typedef"><a id=
"ppd_file_t">ppd_file_t
</a></h3>
1632 <p class=
"description">PPD File
</p>
1634 typedef struct
<a href=
"#ppd_file_s">ppd_file_s
</a> ppd_file_t;
1636 <h3 class=
"typedef"><a id=
"ppd_group_t">ppd_group_t
</a></h3>
1637 <p class=
"description">Groups
</p>
1639 typedef struct
<a href=
"#ppd_group_s">ppd_group_s
</a> ppd_group_t;
1641 <h3 class=
"typedef"><a id=
"ppd_option_t">ppd_option_t
</a></h3>
1642 <p class=
"description">Options
</p>
1644 typedef struct
<a href=
"#ppd_option_s">ppd_option_s
</a> ppd_option_t;
1646 <h3 class=
"typedef"><a id=
"ppd_profile_t">ppd_profile_t
</a></h3>
1647 <p class=
"description">sRGB Color Profiles
</p>
1649 typedef struct
<a href=
"#ppd_profile_s">ppd_profile_s
</a> ppd_profile_t;
1651 <h3 class=
"typedef"><a id=
"ppd_section_t">ppd_section_t
</a></h3>
1652 <p class=
"description">Order dependency sections
</p>
1654 typedef enum
<a href=
"#ppd_section_e">ppd_section_e
</a> ppd_section_t;
1656 <h3 class=
"typedef"><a id=
"ppd_size_t">ppd_size_t
</a></h3>
1657 <p class=
"description">Page Sizes
</p>
1659 typedef struct
<a href=
"#ppd_size_s">ppd_size_s
</a> ppd_size_t;
1661 <h3 class=
"typedef"><a id=
"ppd_status_t"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span>ppd_status_t
</a></h3>
1662 <p class=
"description">Status Codes
</p>
1664 typedef enum
<a href=
"#ppd_status_e">ppd_status_e
</a> ppd_status_t;
1666 <h3 class=
"typedef"><a id=
"ppd_ui_t">ppd_ui_t
</a></h3>
1667 <p class=
"description">UI Types
</p>
1669 typedef enum
<a href=
"#ppd_ui_e">ppd_ui_e
</a> ppd_ui_t;
1671 <h2 class=
"title"><a id=
"STRUCTURES">Structures
</a></h2>
1672 <h3 class=
"struct"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a id=
"ppd_attr_s">ppd_attr_s
</a></h3>
1673 <p class=
"description">PPD Attribute Structure
</p>
1674 <p class=
"code">struct ppd_attr_s {
<br />
1675     char name[PPD_MAX_NAME];
<br />
1676     char spec[PPD_MAX_NAME];
<br />
1677     char text[PPD_MAX_TEXT];
<br />
1678     char *value;
<br />
1680 <h4 class=
"members">Members
</h4>
1682 <dt>name[PPD_MAX_NAME]
</dt>
1683 <dd class=
"description">Name of attribute (cupsXYZ)
</dd>
1684 <dt>spec[PPD_MAX_NAME]
</dt>
1685 <dd class=
"description">Specifier string, if any
</dd>
1686 <dt>text[PPD_MAX_TEXT]
</dt>
1687 <dd class=
"description">Human-readable text, if any
</dd>
1689 <dd class=
"description">Value string
</dd>
1691 <h3 class=
"struct"><a id=
"ppd_choice_s">ppd_choice_s
</a></h3>
1692 <p class=
"description">Option choices
</p>
1693 <p class=
"code">struct ppd_choice_s {
<br />
1694     char choice[PPD_MAX_NAME];
<br />
1695     char *code;
<br />
1696     char marked;
<br />
1697     <a href=
"#ppd_option_t">ppd_option_t
</a> *option;
<br />
1698     char text[PPD_MAX_TEXT];
<br />
1700 <h4 class=
"members">Members
</h4>
1702 <dt>choice[PPD_MAX_NAME]
</dt>
1703 <dd class=
"description">Computer-readable option name
</dd>
1705 <dd class=
"description">Code to send for this option
</dd>
1707 <dd class=
"description">0 if not selected,
1 otherwise
</dd>
1709 <dd class=
"description">Pointer to parent option structure
</dd>
1710 <dt>text[PPD_MAX_TEXT]
</dt>
1711 <dd class=
"description">Human-readable option name
</dd>
1713 <h3 class=
"struct"><a id=
"ppd_const_s">ppd_const_s
</a></h3>
1714 <p class=
"description">Constraints
</p>
1715 <p class=
"code">struct ppd_const_s {
<br />
1716     char choice1[PPD_MAX_NAME];
<br />
1717     char choice2[PPD_MAX_NAME];
<br />
1718     char option1[PPD_MAX_NAME];
<br />
1719     char option2[PPD_MAX_NAME];
<br />
1721 <h4 class=
"members">Members
</h4>
1723 <dt>choice1[PPD_MAX_NAME]
</dt>
1724 <dd class=
"description">First option/choice (blank for all)
</dd>
1725 <dt>choice2[PPD_MAX_NAME]
</dt>
1726 <dd class=
"description">Second option/choice (blank for all)
</dd>
1727 <dt>option1[PPD_MAX_NAME]
</dt>
1728 <dd class=
"description">First keyword
</dd>
1729 <dt>option2[PPD_MAX_NAME]
</dt>
1730 <dd class=
"description">Second keyword
</dd>
1732 <h3 class=
"struct"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppd_coption_s">ppd_coption_s
</a></h3>
1733 <p class=
"description">Custom Option
</p>
1734 <p class=
"code">struct ppd_coption_s {
<br />
1735     char keyword[PPD_MAX_NAME];
<br />
1736     int marked;
<br />
1737     <a href=
"#ppd_option_t">ppd_option_t
</a> *option;
<br />
1738     cups_array_t *params;
<br />
1740 <h4 class=
"members">Members
</h4>
1742 <dt>keyword[PPD_MAX_NAME]
</dt>
1743 <dd class=
"description">Name of option that is being extended...
</dd>
1745 <dd class=
"description">Extended option is marked
</dd>
1747 <dd class=
"description">Option that is being extended...
</dd>
1749 <dd class=
"description">Parameters
</dd>
1751 <h3 class=
"struct"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppd_cparam_s">ppd_cparam_s
</a></h3>
1752 <p class=
"description">Custom Parameter
</p>
1753 <p class=
"code">struct ppd_cparam_s {
<br />
1754     <a href=
"#ppd_cpvalue_t">ppd_cpvalue_t
</a> current;
<br />
1755     <a href=
"#ppd_cplimit_t">ppd_cplimit_t
</a> minimum, maximum;
<br />
1756     char name[PPD_MAX_NAME];
<br />
1757     int order;
<br />
1758     char text[PPD_MAX_TEXT];
<br />
1759     <a href=
"#ppd_cptype_t">ppd_cptype_t
</a> type;
<br />
1761 <h4 class=
"members">Members
</h4>
1764 <dd class=
"description">Current value
</dd>
1766 <dd class=
"description">Maximum value
</dd>
1767 <dt>name[PPD_MAX_NAME]
</dt>
1768 <dd class=
"description">Parameter name
</dd>
1770 <dd class=
"description">Order (
0 to N)
</dd>
1771 <dt>text[PPD_MAX_TEXT]
</dt>
1772 <dd class=
"description">Human-readable text
</dd>
1774 <dd class=
"description">Parameter type
</dd>
1776 <h3 class=
"struct"><a id=
"ppd_emul_s">ppd_emul_s
</a></h3>
1777 <p class=
"description">Emulators
</p>
1778 <p class=
"code">struct ppd_emul_s {
<br />
1779     char name[PPD_MAX_NAME];
<br />
1780     char *start;
<br />
1781     char *stop;
<br />
1783 <h4 class=
"members">Members
</h4>
1785 <dt>name[PPD_MAX_NAME]
</dt>
1786 <dd class=
"description">Emulator name
</dd>
1788 <dd class=
"description">Code to switch to this emulation
</dd>
1790 <dd class=
"description">Code to stop this emulation
</dd>
1792 <h3 class=
"struct"><a id=
"ppd_file_s">ppd_file_s
</a></h3>
1793 <p class=
"description">PPD File
</p>
1794 <p class=
"code">struct ppd_file_s {
<br />
1795     int accurate_screens;
<br />
1796     int color_device;
<br />
1797     <a href=
"#ppd_cs_t">ppd_cs_t
</a> colorspace;
<br />
1798     <a href=
"#ppd_const_t">ppd_const_t
</a> *consts;
<br />
1799     int contone_only;
<br />
1800     float custom_margins[
4];
<br />
1801     float custom_max[
2];
<br />
1802     float custom_min[
2];
<br />
1803     <a href=
"#ppd_emul_t">ppd_emul_t
</a> *emulations;
<br />
1804     char **filters;
<br />
1805     int flip_duplex;
<br />
1806     char **fonts;
<br />
1807     <a href=
"#ppd_group_t">ppd_group_t
</a> *groups;
<br />
1808     char *jcl_begin;
<br />
1809     char *jcl_end;
<br />
1810     char *jcl_ps;
<br />
1811     int landscape;
<br />
1812     char *lang_encoding;
<br />
1813     char *lang_version;
<br />
1814     int language_level;
<br />
1815     int manual_copies;
<br />
1816     char *manufacturer;
<br />
1817     int model_number;
<br />
1818     char *modelname;
<br />
1819     char *nickname;
<br />
1820     int num_consts;
<br />
1821     int num_emulations;
<br />
1822     int num_filters;
<br />
1823     int num_fonts;
<br />
1824     int num_groups;
<br />
1825     int num_profiles;
<br />
1826     int num_sizes;
<br />
1827     char *patches;
<br />
1828     char *pcfilename;
<br />
1829     char *product;
<br />
1830     <a href=
"#ppd_profile_t">ppd_profile_t
</a> *profiles;
<br />
1831     char *protocols;
<br />
1832     char *shortnickname;
<br />
1833     <a href=
"#ppd_size_t">ppd_size_t
</a> *sizes;
<br />
1834     int throughput;
<br />
1835     char *ttrasterizer;
<br />
1836     int variable_sizes;
<br />
1838 <h4 class=
"members">Members
</h4>
1840 <dt>accurate_screens
</dt>
1841 <dd class=
"description">1 = supports accurate screens,
0 = not
</dd>
1842 <dt>color_device
</dt>
1843 <dd class=
"description">1 = color device,
0 = grayscale
</dd>
1844 <dt>colorspace
</dt>
1845 <dd class=
"description">Default colorspace
</dd>
1847 <dd class=
"description">UI/Non-UI constraints
</dd>
1848 <dt>contone_only
</dt>
1849 <dd class=
"description">1 = continuous tone only,
0 = not
</dd>
1850 <dt>custom_margins[
4]
</dt>
1851 <dd class=
"description">Margins around page
</dd>
1852 <dt>custom_max[
2]
</dt>
1853 <dd class=
"description">Maximum variable page size
</dd>
1854 <dt>custom_min[
2]
</dt>
1855 <dd class=
"description">Minimum variable page size
</dd>
1856 <dt>emulations
</dt>
1857 <dd class=
"description">Emulations and the code to invoke them
</dd>
1859 <dd class=
"description">Filter strings...
</dd>
1860 <dt>flip_duplex
<span class=
"info"> DEPRECATED
 </span></dt>
1861 <dd class=
"description">1 = Flip page for back sides
</dd>
1863 <dd class=
"description">Pre-loaded fonts
</dd>
1865 <dd class=
"description">UI groups
</dd>
1867 <dd class=
"description">Start JCL commands
</dd>
1869 <dd class=
"description">End JCL commands
</dd>
1871 <dd class=
"description">Enter PostScript interpreter
</dd>
1873 <dd class=
"description">-
90 or
90</dd>
1874 <dt>lang_encoding
</dt>
1875 <dd class=
"description">Language encoding
</dd>
1876 <dt>lang_version
</dt>
1877 <dd class=
"description">Language version (English, Spanish, etc.)
</dd>
1878 <dt>language_level
</dt>
1879 <dd class=
"description">Language level of device
</dd>
1880 <dt>manual_copies
</dt>
1881 <dd class=
"description">1 = Copies done manually,
0 = hardware
</dd>
1882 <dt>manufacturer
</dt>
1883 <dd class=
"description">Manufacturer name
</dd>
1884 <dt>model_number
</dt>
1885 <dd class=
"description">Device-specific model number
</dd>
1887 <dd class=
"description">Model name (general)
</dd>
1889 <dd class=
"description">Nickname (specific)
</dd>
1890 <dt>num_consts
</dt>
1891 <dd class=
"description">Number of UI/Non-UI constraints
</dd>
1892 <dt>num_emulations
</dt>
1893 <dd class=
"description">Number of emulations supported
</dd>
1894 <dt>num_filters
</dt>
1895 <dd class=
"description">Number of filters
</dd>
1897 <dd class=
"description">Number of pre-loaded fonts
</dd>
1898 <dt>num_groups
</dt>
1899 <dd class=
"description">Number of UI groups
</dd>
1900 <dt>num_profiles
<span class=
"info"> DEPRECATED
 </span></dt>
1901 <dd class=
"description">Number of sRGB color profiles
</dd>
1903 <dd class=
"description">Number of page sizes
</dd>
1905 <dd class=
"description">Patch commands to be sent to printer
</dd>
1906 <dt>pcfilename
<span class=
"info"> CUPS
1.1.19/macOS
10.3 </span></dt>
1907 <dd class=
"description">PCFileName string
</dd>
1909 <dd class=
"description">Product name (from PS RIP/interpreter)
</dd>
1910 <dt>profiles
<span class=
"info"> DEPRECATED
 </span></dt>
1911 <dd class=
"description">sRGB color profiles
</dd>
1912 <dt>protocols
<span class=
"info"> CUPS
1.1.19/macOS
10.3 </span></dt>
1913 <dd class=
"description">Protocols (BCP, TBCP) string
</dd>
1914 <dt>shortnickname
</dt>
1915 <dd class=
"description">Short version of nickname
</dd>
1917 <dd class=
"description">Page sizes
</dd>
1918 <dt>throughput
</dt>
1919 <dd class=
"description">Pages per minute
</dd>
1920 <dt>ttrasterizer
</dt>
1921 <dd class=
"description">Truetype rasterizer
</dd>
1922 <dt>variable_sizes
</dt>
1923 <dd class=
"description">1 = supports variable sizes,
0 = doesn't
</dd>
1925 <h3 class=
"struct"><a id=
"ppd_group_s">ppd_group_s
</a></h3>
1926 <p class=
"description">Groups
</p>
1927 <p class=
"code">struct ppd_group_s {
<br />
1928     char text[PPD_MAX_TEXT - PPD_MAX_NAME];
<br />
1929     char name[PPD_MAX_NAME];
<br />
1930     int num_options;
<br />
1931     int num_subgroups;
<br />
1932     <a href=
"#ppd_option_t">ppd_option_t
</a> *options;
<br />
1933     struct
<a href=
"#ppd_group_s">ppd_group_s
</a> *subgroups;
<br />
1935 <h4 class=
"members">Members
</h4>
1937 <dt>PPD_MAX_NAME]
</dt>
1938 <dd class=
"description">Human-readable group name
</dd>
1939 <dt>name[PPD_MAX_NAME]
<span class=
"info"> CUPS
1.1.18/macOS
10.3 </span></dt>
1940 <dd class=
"description">Group name
</dd>
1941 <dt>num_options
</dt>
1942 <dd class=
"description">Number of options
</dd>
1943 <dt>num_subgroups
</dt>
1944 <dd class=
"description">Number of sub-groups
</dd>
1946 <dd class=
"description">Options
</dd>
1948 <dd class=
"description">Sub-groups (max depth =
1)
</dd>
1950 <h3 class=
"struct"><a id=
"ppd_option_s">ppd_option_s
</a></h3>
1951 <p class=
"description">Options
</p>
1952 <p class=
"code">struct ppd_option_s {
<br />
1953     <a href=
"#ppd_choice_t">ppd_choice_t
</a> *choices;
<br />
1954     char conflicted;
<br />
1955     char defchoice[PPD_MAX_NAME];
<br />
1956     char keyword[PPD_MAX_NAME];
<br />
1957     int num_choices;
<br />
1958     float order;
<br />
1959     <a href=
"#ppd_section_t">ppd_section_t
</a> section;
<br />
1960     char text[PPD_MAX_TEXT];
<br />
1961     <a href=
"#ppd_ui_t">ppd_ui_t
</a> ui;
<br />
1963 <h4 class=
"members">Members
</h4>
1966 <dd class=
"description">Option choices
</dd>
1967 <dt>conflicted
</dt>
1968 <dd class=
"description">0 if no conflicts exist,
1 otherwise
</dd>
1969 <dt>defchoice[PPD_MAX_NAME]
</dt>
1970 <dd class=
"description">Default option choice
</dd>
1971 <dt>keyword[PPD_MAX_NAME]
</dt>
1972 <dd class=
"description">Option keyword name (
"PageSize
", etc.)
</dd>
1973 <dt>num_choices
</dt>
1974 <dd class=
"description">Number of option choices
</dd>
1976 <dd class=
"description">Order number
</dd>
1978 <dd class=
"description">Section for command
</dd>
1979 <dt>text[PPD_MAX_TEXT]
</dt>
1980 <dd class=
"description">Human-readable text
</dd>
1982 <dd class=
"description">Type of UI option
</dd>
1984 <h3 class=
"struct"><a id=
"ppd_profile_s">ppd_profile_s
</a></h3>
1985 <p class=
"description">sRGB Color Profiles
</p>
1986 <p class=
"code">struct ppd_profile_s {
<br />
1987     float density;
<br />
1988     float gamma;
<br />
1989     float matrix[
3][
3];
<br />
1990     char media_type[PPD_MAX_NAME];
<br />
1991     char resolution[PPD_MAX_NAME];
<br />
1993 <h4 class=
"members">Members
</h4>
1996 <dd class=
"description">Ink density to use
</dd>
1998 <dd class=
"description">Gamma correction to use
</dd>
1999 <dt>matrix[
3][
3]
</dt>
2000 <dd class=
"description">Transform matrix
</dd>
2001 <dt>media_type[PPD_MAX_NAME]
</dt>
2002 <dd class=
"description">Media type or
"-
"</dd>
2003 <dt>resolution[PPD_MAX_NAME]
</dt>
2004 <dd class=
"description">Resolution or
"-
"</dd>
2006 <h3 class=
"struct"><a id=
"ppd_size_s">ppd_size_s
</a></h3>
2007 <p class=
"description">Page Sizes
</p>
2008 <p class=
"code">struct ppd_size_s {
<br />
2009     float bottom;
<br />
2010     float left;
<br />
2011     float length;
<br />
2012     int marked;
<br />
2013     char name[PPD_MAX_NAME];
<br />
2014     float right;
<br />
2015     float top;
<br />
2016     float width;
<br />
2018 <h4 class=
"members">Members
</h4>
2021 <dd class=
"description">Bottom printable margin in points
</dd>
2023 <dd class=
"description">Left printable margin in points
</dd>
2025 <dd class=
"description">Length of media in points
</dd>
2027 <dd class=
"description">Page size selected?
</dd>
2028 <dt>name[PPD_MAX_NAME]
</dt>
2029 <dd class=
"description">Media size option
</dd>
2031 <dd class=
"description">Right printable margin in points
</dd>
2033 <dd class=
"description">Top printable margin in points
</dd>
2035 <dd class=
"description">Width of media in points
</dd>
2037 <h2 class=
"title"><a id=
"UNIONS">Unions
</a></h2>
2038 <h3 class=
"union"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppd_cplimit_u">ppd_cplimit_u
</a></h3>
2039 <p class=
"description">Custom Parameter Limit
</p>
2040 <p class=
"code">union ppd_cplimit_u {
<br />
2041     float custom_curve;
<br />
2042     int custom_int;
<br />
2043     float custom_invcurve;
<br />
2044     int custom_passcode;
<br />
2045     int custom_password;
<br />
2046     float custom_points;
<br />
2047     float custom_real;
<br />
2048     int custom_string;
<br />
2050 <h4 class=
"members">Members
</h4>
2052 <dt>custom_curve
</dt>
2053 <dd class=
"description">Gamma value
</dd>
2054 <dt>custom_int
</dt>
2055 <dd class=
"description">Integer value
</dd>
2056 <dt>custom_invcurve
</dt>
2057 <dd class=
"description">Gamma value
</dd>
2058 <dt>custom_passcode
</dt>
2059 <dd class=
"description">Passcode length
</dd>
2060 <dt>custom_password
</dt>
2061 <dd class=
"description">Password length
</dd>
2062 <dt>custom_points
</dt>
2063 <dd class=
"description">Measurement value
</dd>
2064 <dt>custom_real
</dt>
2065 <dd class=
"description">Real value
</dd>
2066 <dt>custom_string
</dt>
2067 <dd class=
"description">String length
</dd>
2069 <h3 class=
"union"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ppd_cpvalue_u">ppd_cpvalue_u
</a></h3>
2070 <p class=
"description">Custom Parameter Value
</p>
2071 <p class=
"code">union ppd_cpvalue_u {
<br />
2072     float custom_curve;
<br />
2073     int custom_int;
<br />
2074     float custom_invcurve;
<br />
2075     char *custom_passcode;
<br />
2076     char *custom_password;
<br />
2077     float custom_points;
<br />
2078     float custom_real;
<br />
2079     char *custom_string;
<br />
2081 <h4 class=
"members">Members
</h4>
2083 <dt>custom_curve
</dt>
2084 <dd class=
"description">Gamma value
</dd>
2085 <dt>custom_int
</dt>
2086 <dd class=
"description">Integer value
</dd>
2087 <dt>custom_invcurve
</dt>
2088 <dd class=
"description">Gamma value
</dd>
2089 <dt>custom_passcode
</dt>
2090 <dd class=
"description">Passcode value
</dd>
2091 <dt>custom_password
</dt>
2092 <dd class=
"description">Password value
</dd>
2093 <dt>custom_points
</dt>
2094 <dd class=
"description">Measurement value
</dd>
2095 <dt>custom_real
</dt>
2096 <dd class=
"description">Real value
</dd>
2097 <dt>custom_string
</dt>
2098 <dd class=
"description">String value
</dd>
2100 <h2 class=
"title"><a id=
"ENUMERATIONS">Constants
</a></h2>
2101 <h3 class=
"enumeration"><a id=
"ppd_conform_e"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span>ppd_conform_e
</a></h3>
2102 <p class=
"description">Conformance Levels
</p>
2103 <h4 class=
"constants">Constants
</h4>
2105 <dt>PPD_CONFORM_RELAXED
</dt>
2106 <dd class=
"description">Relax whitespace and control char
</dd>
2107 <dt>PPD_CONFORM_STRICT
</dt>
2108 <dd class=
"description">Require strict conformance
</dd>
2110 <h3 class=
"enumeration"><a id=
"ppd_cs_e">ppd_cs_e
</a></h3>
2111 <p class=
"description">Colorspaces
</p>
2112 <h4 class=
"constants">Constants
</h4>
2114 <dt>PPD_CS_CMY
</dt>
2115 <dd class=
"description">CMY colorspace
</dd>
2116 <dt>PPD_CS_CMYK
</dt>
2117 <dd class=
"description">CMYK colorspace
</dd>
2118 <dt>PPD_CS_GRAY
</dt>
2119 <dd class=
"description">Grayscale colorspace
</dd>
2121 <dd class=
"description">DeviceN colorspace
</dd>
2122 <dt>PPD_CS_RGB
</dt>
2123 <dd class=
"description">RGB colorspace
</dd>
2124 <dt>PPD_CS_RGBK
</dt>
2125 <dd class=
"description">RGBK (K = gray) colorspace
</dd>
2127 <h3 class=
"enumeration"><a id=
"ppd_section_e">ppd_section_e
</a></h3>
2128 <p class=
"description">Order dependency sections
</p>
2129 <h4 class=
"constants">Constants
</h4>
2131 <dt>PPD_ORDER_ANY
</dt>
2132 <dd class=
"description">Option code can be anywhere in the file
</dd>
2133 <dt>PPD_ORDER_DOCUMENT
</dt>
2134 <dd class=
"description">... must be in the DocumentSetup section
</dd>
2135 <dt>PPD_ORDER_EXIT
</dt>
2136 <dd class=
"description">... must be sent prior to the document
</dd>
2137 <dt>PPD_ORDER_JCL
</dt>
2138 <dd class=
"description">... must be sent as a JCL command
</dd>
2139 <dt>PPD_ORDER_PAGE
</dt>
2140 <dd class=
"description">... must be in the PageSetup section
</dd>
2141 <dt>PPD_ORDER_PROLOG
</dt>
2142 <dd class=
"description">... must be in the Prolog section
</dd>
2144 <h3 class=
"enumeration"><a id=
"ppd_status_e"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span>ppd_status_e
</a></h3>
2145 <p class=
"description">Status Codes
</p>
2146 <h4 class=
"constants">Constants
</h4>
2148 <dt>PPD_ALLOC_ERROR
</dt>
2149 <dd class=
"description">Memory allocation error
</dd>
2150 <dt>PPD_BAD_CUSTOM_PARAM
</dt>
2151 <dd class=
"description">Bad custom parameter
</dd>
2152 <dt>PPD_BAD_OPEN_GROUP
</dt>
2153 <dd class=
"description">Bad OpenGroup
</dd>
2154 <dt>PPD_BAD_OPEN_UI
</dt>
2155 <dd class=
"description">Bad OpenUI/JCLOpenUI
</dd>
2156 <dt>PPD_BAD_ORDER_DEPENDENCY
</dt>
2157 <dd class=
"description">Bad OrderDependency
</dd>
2158 <dt>PPD_BAD_UI_CONSTRAINTS
</dt>
2159 <dd class=
"description">Bad UIConstraints
</dd>
2160 <dt>PPD_BAD_VALUE
</dt>
2161 <dd class=
"description">Bad value string
</dd>
2162 <dt>PPD_FILE_OPEN_ERROR
</dt>
2163 <dd class=
"description">Unable to open PPD file
</dd>
2164 <dt>PPD_ILLEGAL_CHARACTER
</dt>
2165 <dd class=
"description">Illegal control character
</dd>
2166 <dt>PPD_ILLEGAL_MAIN_KEYWORD
</dt>
2167 <dd class=
"description">Illegal main keyword string
</dd>
2168 <dt>PPD_ILLEGAL_OPTION_KEYWORD
</dt>
2169 <dd class=
"description">Illegal option keyword string
</dd>
2170 <dt>PPD_ILLEGAL_TRANSLATION
</dt>
2171 <dd class=
"description">Illegal translation string
</dd>
2172 <dt>PPD_ILLEGAL_WHITESPACE
</dt>
2173 <dd class=
"description">Illegal whitespace character
</dd>
2174 <dt>PPD_INTERNAL_ERROR
</dt>
2175 <dd class=
"description">Internal error
</dd>
2176 <dt>PPD_LINE_TOO_LONG
</dt>
2177 <dd class=
"description">Line longer than
255 chars
</dd>
2178 <dt>PPD_MISSING_ASTERISK
</dt>
2179 <dd class=
"description">Missing asterisk in column
0</dd>
2180 <dt>PPD_MISSING_CLOSE_GROUP
</dt>
2181 <dd class=
"description">Missing CloseGroup
</dd>
2182 <dt>PPD_MISSING_OPTION_KEYWORD
</dt>
2183 <dd class=
"description">Missing option keyword
</dd>
2184 <dt>PPD_MISSING_PPDADOBE4
</dt>
2185 <dd class=
"description">Missing PPD-Adobe-
4.x header
</dd>
2186 <dt>PPD_MISSING_VALUE
</dt>
2187 <dd class=
"description">Missing value string
</dd>
2188 <dt>PPD_NESTED_OPEN_GROUP
</dt>
2189 <dd class=
"description">OpenGroup without a CloseGroup first
</dd>
2190 <dt>PPD_NESTED_OPEN_UI
</dt>
2191 <dd class=
"description">OpenUI/JCLOpenUI without a CloseUI/JCLCloseUI first
</dd>
2192 <dt>PPD_NULL_FILE
</dt>
2193 <dd class=
"description">NULL PPD file pointer
</dd>
2195 <dd class=
"description">OK
</dd>
2197 <h3 class=
"enumeration"><a id=
"ppd_ui_e">ppd_ui_e
</a></h3>
2198 <p class=
"description">UI Types
</p>
2199 <h4 class=
"constants">Constants
</h4>
2201 <dt>PPD_UI_BOOLEAN
</dt>
2202 <dd class=
"description">True or False option
</dd>
2203 <dt>PPD_UI_PICKMANY
</dt>
2204 <dd class=
"description">Pick zero or more from a list
</dd>
2205 <dt>PPD_UI_PICKONE
</dt>
2206 <dd class=
"description">Pick one from a list
</dd>