1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
3 <!-- SECTION: Programming -->
6 <meta name=
"keywords" content=
"Programming">
7 <meta name=
"creator" content=
"Mini-XML v2.5">
8 <style type=
"text/css"><!--
10 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
13 H1, H2, H3, H4, H5, H6, P, TD, TH {
14 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
18 font-family: monaco, courier, monospace;
23 font-family: monaco, courier, monospace;
32 border: dotted thin #999999;
37 PRE.command EM, PRE.example EM {
38 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
42 font-family: monaco, courier, monospace;
53 border: solid thin #999999;
59 text-decoration: none;
62 A:link:hover, A:visited:hover, A:active {
63 text-decoration: underline;
71 border: solid thin #999999;
72 border-collapse: collapse;
88 border: solid thin #cccccc;
95 border-bottom: solid thin #999999;
104 caption-side: bottom;
124 border: thin solid #000000;
132 H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
138 border-bottom: solid 2pt #000000;
156 font-family: monaco, courier, monospace;
165 border: solid thin #999999;
166 border-collapse: collapse;
171 DIV.summary TABLE TD, DIV.summary TABLE TH {
172 border: solid thin #999999;
178 DIV.summary TABLE THEAD TH {
182 /* API documentation styles... */
189 div.body h3, div.body h4, div.body h5 {
190 margin-bottom: 0.5em;
193 .class, .enumeration, .function, .struct, .typedef, .union {
194 border-bottom: solid thin #999999;
201 code, p.code, pre, ul.code li {
202 font-family: monaco, courier, monospace;
205 ul.code, ul.contents, ul.subcontents {
206 list-style-type: none;
216 ul.contents li ul.code, ul.contents li ul.subcontents {
229 margin-bottom: 0.5em;
232 /* This is just for the HTML files generated with the framedhelp target */
235 border: solid thin black;
244 div.contents ul.contents {
247 div.contents ul.subcontents li {
256 "$Id: api-ppd.header 7278 2008-01-31 01:23:09Z mike $"
258 PPD API header for the Common UNIX Printing System (CUPS).
260 Copyright 2008 by Apple Inc.
262 These coded instructions, statements, and computer programs are the
263 property of Apple Inc. and are protected by Federal copyright
264 law. Distribution and use rights are outlined in the file "LICENSE.txt"
265 which should have been included with this file. If this file is
266 file is missing or damaged, see the license at "http://www.cups.org/".
269 <h1 class=
"title">PPD API
</h1>
271 <div class='summary'
><table summary='General Information'
>
285 <td>Programming:
<a href='api-overview.html' target='_top'
>Introduction to CUPS Programming
</a><br>
286 Programming:
<a href='api-cups.html' target='_top'
>CUPS API
</a><br>
287 Specifications:
<a href='spec-ppd.html' target='_top'
>CUPS PPD Extensions
</a></td>
291 <h2 class=
"title">Contents
</h2>
292 <ul class=
"contents">
294 <li><a href=
"#OVERVIEW">Overview
</a><ul class=
"subcontents">
295 <li><a href=
"#LOADING">Loading a PPD File
</a></li>
296 <li><a href=
"#OPTIONS_AND_GROUPS">Options and Groups
</a></li>
297 <li><a href=
"#CONSTRAINTS">Constraints
</a></li>
298 <li><a href=
"#PAGE_SIZES">Page Sizes
</a></li>
299 <li><a href=
"#ATTRIBUTES">Attributes
</a></li>
301 <li><a href=
"#FUNCTIONS">Functions
</a><ul class=
"code">
302 <li><a href=
"#cupsMarkOptions" title=
"Mark command-line options in a PPD file.">cupsMarkOptions
</a></li>
303 <li><a href=
"#ppdClose" title=
"Free all memory used by the PPD file.">ppdClose
</a></li>
304 <li><a href=
"#ppdCollect" title=
"Collect all marked options that reside in the specified
305 section.">ppdCollect
</a></li>
306 <li><a href=
"#ppdCollect2" title=
"Collect all marked options that reside in the
307 specified section and minimum order.">ppdCollect2
</a></li>
308 <li><a href=
"#ppdConflicts" title=
"Check to see if there are any conflicts among the
309 marked option choices.">ppdConflicts
</a></li>
310 <li><a href=
"#ppdEmit" title=
"Emit code for marked options to a file.">ppdEmit
</a></li>
311 <li><a href=
"#ppdEmitAfterOrder" title=
"Emit a subset of the code for marked options to a file.">ppdEmitAfterOrder
</a></li>
312 <li><a href=
"#ppdEmitFd" title=
"Emit code for marked options to a file.">ppdEmitFd
</a></li>
313 <li><a href=
"#ppdEmitJCL" title=
"Emit code for JCL options to a file.">ppdEmitJCL
</a></li>
314 <li><a href=
"#ppdEmitJCLEnd" title=
"Emit JCLEnd code to a file.">ppdEmitJCLEnd
</a></li>
315 <li><a href=
"#ppdEmitString" title=
"Get a string containing the code for marked options.">ppdEmitString
</a></li>
316 <li><a href=
"#ppdErrorString" title=
"Returns the text assocated with a status.">ppdErrorString
</a></li>
317 <li><a href=
"#ppdFindAttr" title=
"Find the first matching attribute.">ppdFindAttr
</a></li>
318 <li><a href=
"#ppdFindChoice" title=
"Return a pointer to an option choice.">ppdFindChoice
</a></li>
319 <li><a href=
"#ppdFindCustomOption" title=
"Find a custom option.">ppdFindCustomOption
</a></li>
320 <li><a href=
"#ppdFindCustomParam" title=
"Find a parameter for a custom option.">ppdFindCustomParam
</a></li>
321 <li><a href=
"#ppdFindMarkedChoice" title=
"Return the marked choice for the specified option.">ppdFindMarkedChoice
</a></li>
322 <li><a href=
"#ppdFindNextAttr" title=
"Find the next matching attribute.">ppdFindNextAttr
</a></li>
323 <li><a href=
"#ppdFindOption" title=
"Return a pointer to the specified option.">ppdFindOption
</a></li>
324 <li><a href=
"#ppdFirstCustomParam" title=
"Return the first parameter for a custom option.">ppdFirstCustomParam
</a></li>
325 <li><a href=
"#ppdFirstOption" title=
"Return the first option in the PPD file.">ppdFirstOption
</a></li>
326 <li><a href=
"#ppdIsMarked" title=
"Check to see if an option is marked.">ppdIsMarked
</a></li>
327 <li><a href=
"#ppdLastError" title=
"Return the status from the last ppdOpen*().">ppdLastError
</a></li>
328 <li><a href=
"#ppdLocalize" title=
"Localize the PPD file to the current locale.">ppdLocalize
</a></li>
329 <li><a href=
"#ppdLocalizeIPPReason" title=
"Get the localized version of a cupsIPPReason
330 attribute.">ppdLocalizeIPPReason
</a></li>
331 <li><a href=
"#ppdLocalizeMarkerName" title=
"Get the localized version of a marker-names
332 attribute value.">ppdLocalizeMarkerName
</a></li>
333 <li><a href=
"#ppdMarkDefaults" title=
"Mark all default options in the PPD file.">ppdMarkDefaults
</a></li>
334 <li><a href=
"#ppdMarkOption" title=
"Mark an option in a PPD file.">ppdMarkOption
</a></li>
335 <li><a href=
"#ppdNextCustomParam" title=
"Return the next parameter for a custom option.">ppdNextCustomParam
</a></li>
336 <li><a href=
"#ppdNextOption" title=
"Return the next option in the PPD file.">ppdNextOption
</a></li>
337 <li><a href=
"#ppdOpen" title=
"Read a PPD file into memory.">ppdOpen
</a></li>
338 <li><a href=
"#ppdOpen2" title=
"Read a PPD file into memory.">ppdOpen2
</a></li>
339 <li><a href=
"#ppdOpenFd" title=
"Read a PPD file into memory.">ppdOpenFd
</a></li>
340 <li><a href=
"#ppdOpenFile" title=
"Read a PPD file into memory.">ppdOpenFile
</a></li>
341 <li><a href=
"#ppdPageLength" title=
"Get the page length for the given size.">ppdPageLength
</a></li>
342 <li><a href=
"#ppdPageSize" title=
"Get the page size record for the given size.">ppdPageSize
</a></li>
343 <li><a href=
"#ppdPageWidth" title=
"Get the page width for the given size.">ppdPageWidth
</a></li>
344 <li><a href=
"#ppdSetConformance" title=
"Set the conformance level for PPD files.">ppdSetConformance
</a></li>
346 <li><a href=
"#TYPES">Data Types
</a><ul class=
"code">
347 <li><a href=
"#ppd_attr_t" title=
"PPD Attribute Structure ">ppd_attr_t
</a></li>
348 <li><a href=
"#ppd_choice_t" title=
"Option choices">ppd_choice_t
</a></li>
349 <li><a href=
"#ppd_conform_t" title=
"Conformance Levels ">ppd_conform_t
</a></li>
350 <li><a href=
"#ppd_const_t" title=
"Constraints">ppd_const_t
</a></li>
351 <li><a href=
"#ppd_coption_t" title=
"Custom Option ">ppd_coption_t
</a></li>
352 <li><a href=
"#ppd_cparam_t" title=
"Custom Parameter ">ppd_cparam_t
</a></li>
353 <li><a href=
"#ppd_cplimit_t" title=
"Custom Parameter Limit ">ppd_cplimit_t
</a></li>
354 <li><a href=
"#ppd_cptype_t" title=
"Custom Parameter Type ">ppd_cptype_t
</a></li>
355 <li><a href=
"#ppd_cpvalue_t" title=
"Custom Parameter Value ">ppd_cpvalue_t
</a></li>
356 <li><a href=
"#ppd_cs_t" title=
"Colorspaces">ppd_cs_t
</a></li>
357 <li><a href=
"#ppd_emul_t" title=
"Emulators">ppd_emul_t
</a></li>
358 <li><a href=
"#ppd_file_t" title=
"PPD File">ppd_file_t
</a></li>
359 <li><a href=
"#ppd_group_t" title=
"Groups">ppd_group_t
</a></li>
360 <li><a href=
"#ppd_option_t" title=
"Options">ppd_option_t
</a></li>
361 <li><a href=
"#ppd_profile_t" title=
"sRGB Color Profiles">ppd_profile_t
</a></li>
362 <li><a href=
"#ppd_section_t" title=
"Order dependency sections">ppd_section_t
</a></li>
363 <li><a href=
"#ppd_size_t" title=
"Page Sizes">ppd_size_t
</a></li>
364 <li><a href=
"#ppd_status_t" title=
"Types and structures...">ppd_status_t
</a></li>
365 <li><a href=
"#ppd_ui_t" title=
"UI Types">ppd_ui_t
</a></li>
367 <li><a href=
"#STRUCTURES">Structures
</a><ul class=
"code">
368 <li><a href=
"#ppd_attr_s" title=
"PPD Attribute Structure ">ppd_attr_s
</a></li>
369 <li><a href=
"#ppd_choice_s" title=
"Option choices">ppd_choice_s
</a></li>
370 <li><a href=
"#ppd_const_s" title=
"Constraints">ppd_const_s
</a></li>
371 <li><a href=
"#ppd_coption_s" title=
"Custom Option ">ppd_coption_s
</a></li>
372 <li><a href=
"#ppd_cparam_s" title=
"Custom Parameter ">ppd_cparam_s
</a></li>
373 <li><a href=
"#ppd_emul_s" title=
"Emulators">ppd_emul_s
</a></li>
374 <li><a href=
"#ppd_file_s" title=
"PPD File">ppd_file_s
</a></li>
375 <li><a href=
"#ppd_group_s" title=
"Groups">ppd_group_s
</a></li>
376 <li><a href=
"#ppd_option_s" title=
"Options">ppd_option_s
</a></li>
377 <li><a href=
"#ppd_profile_s" title=
"sRGB Color Profiles">ppd_profile_s
</a></li>
378 <li><a href=
"#ppd_size_s" title=
"Page Sizes">ppd_size_s
</a></li>
380 <li><a href=
"#UNIONS">Unions
</a><ul class=
"code">
381 <li><a href=
"#ppd_cplimit_u" title=
"Custom Parameter Limit ">ppd_cplimit_u
</a></li>
382 <li><a href=
"#ppd_cpvalue_u" title=
"Custom Parameter Value ">ppd_cpvalue_u
</a></li>
384 <li><a href=
"#ENUMERATIONS">Constants
</a><ul class=
"code">
385 <li><a href=
"#ppd_conform_e" title=
"">ppd_conform_e
</a></li>
386 <li><a href=
"#ppd_cptype_e" title=
"Custom Parameter Type ">ppd_cptype_e
</a></li>
387 <li><a href=
"#ppd_cs_e" title=
"Colorspaces">ppd_cs_e
</a></li>
388 <li><a href=
"#ppd_section_e" title=
"Order dependency sections">ppd_section_e
</a></li>
389 <li><a href=
"#ppd_status_e" title=
"Types and structures...">ppd_status_e
</a></li>
390 <li><a href=
"#ppd_ui_e" title=
"UI Types">ppd_ui_e
</a></li>
394 "$Id: api-ppd.shtml 7278 2008-01-31 01:23:09Z mike $"
396 PPD API introduction for the Common UNIX Printing System (CUPS).
398 Copyright 2007-2008 by Apple Inc.
399 Copyright 1997-2006 by Easy Software Products, all rights reserved.
401 These coded instructions, statements, and computer programs are the
402 property of Apple Inc. and are protected by Federal copyright
403 law. Distribution and use rights are outlined in the file "LICENSE.txt"
404 which should have been included with this file. If this file is
405 file is missing or damaged, see the license at "http://www.cups.org/".
408 <h2 class='title'
><a name='OVERVIEW'
>Overview
</a></h2>
410 <p>The CUPS PPD API provides read-only access the data in PostScript Printer
411 Description (
"PPD") files which are used for all printers with a driver. With
412 it you can obtain the data necessary to display printer options to users, mark
413 option choices and check for conflicting choices, and output marked choices in
414 PostScript output. The
<a href=
"#ppd_file_t"><code>ppd_file_t
</code></a>
415 structure contains all of the information in a PPD file.
</p>
417 <blockquote><b>Note:
</b>
419 <p>The CUPS PPD API uses the terms
"option" and
"choice" instead of the Adobe
420 terms
"MainKeyword" and
"OptionKeyword" to refer to specific printer options and
421 features. CUPS also treats option (
"MainKeyword") and choice (
"OptionKeyword")
422 values as case-insensitive strings, so option
"InputSlot" and choice
"Upper"
423 are equivalent to
"inputslot" and
"upper", respectively.
</p>
426 <h3><a name=
"LOADING">Loading a PPD File
</a></h3>
428 <p>The
<a href=
"#ppdOpenFile"><code>ppdOpenFile
</code></a> function
"opens" a
429 PPD file and loads it into memory. For example, the following code opens the
430 current printer's PPD file in a CUPS filter:
</p>
432 <pre class=
"example">
433 #include
<cups/ppd.h
>
435 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd =
<a href=
"#ppdOpenFile">ppdOpenFile
</a>(getenv(
"PPD"));
438 <p>The return value is a pointer to a new
439 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure or
<code>NULL
</code>
440 if the PPD file does not exist or cannot be loaded. The
441 <a href=
"#ppdClose"><code>ppdClose
</code></a> function frees the memory used
442 by the structure:
</p>
444 <pre class=
"example">
445 #include
<cups/ppd.h
>
447 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
449 <a href=
"#ppdClose">ppdClose
</a>(ppd);
452 <p>Once closed, pointers to the
<a href=
"#ppd_file_t"><code>ppd_file_t
</code></a>
453 structure and any data in it will no longer be valid.
</p>
455 <h3><a name=
"OPTIONS_AND_GROUPS">Options and Groups
</a></h3>
457 <p>PPD files support multiple options, which are stored in arrays of
458 <a href=
"#ppd_option_t"><code>ppd_option_t
</code></a> and
459 <a href=
"#ppd_choice_t"><code>ppd_choice_t
</code></a> structures.
</p>
461 <p>Each option in turn is associated with a group stored in a
462 <a href=
"#ppd_group_t"><code>ppd_group_t
</code></a> structure. Groups can be
463 specified in the PPD file; if an option is not associated with a group
464 then it is put in an automatically-generated
"General" group. Groups can also
465 have sub-groups, however CUPS currently ignores sub-groups because of past
466 abuses of this functionality.
</p>
468 <p>Option choices are selected by marking them using one of three functions. The
469 first is
<a href=
"#ppdMarkDefaults"><code>ppdMarkDefaults
</code></a> which
470 selects all of the default options in the PPD file:
</p>
472 <pre class=
"example">
473 #include
<cups/ppd.h
>
475 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
477 <a href=
"#ppdMarkDefaults">ppdMarkDefaults
</a>(ppd);
480 <p>The second is
<a href=
"#ppdMarkOption"><code>ppdMarkOption
</code></a>
481 which selects a single option choice in the PPD file. For example, the following
482 code selects the upper paper tray:
</p>
484 <pre class=
"example">
485 #include
<cups/ppd.h
>
487 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
489 <a href=
"#ppdMarkOption">ppdMarkOption
</a>(ppd,
"InputSlot",
"Upper");
492 <p>The last function is
493 <a href=
"#cupsMarkOptions"><code>cupsMarkOptions
</code></a> which selects
494 multiple option choices in the PPD file from an array of CUPS options, mapping
495 IPP attributes like
"media" and
"sides" to their corresponding PPD options. You
496 typically use this function in a print filter with
497 <code>cupsParseOptions
</code> and
498 <a href=
"#ppdMarkDefaults"><code>ppdMarkDefaults
</code></a> to select all of
499 the option choices needed for the job, for example:
</p>
501 <pre class=
"example">
502 #include
<cups/ppd.h
>
504 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd =
<a href=
"#ppdOpenFile">ppdOpenFile
</a>(getenv(
"PPD"));
505 cups_option_t *options = NULL;
506 int num_options = cupsParseOptions(argv[
5],
0,
&options);
508 <a href=
"#ppdMarkDefaults">ppdMarkDefaults
</a>(ppd);
509 <a href=
"#cupsMarkOptions">cupsMarkOptions
</a>(ppd, num_options, options);
510 cupsFreeOptions(num_options, options);
513 <h3><a name=
"CONSTRAINTS">Constraints
</a></h3>
515 <p>PPD files support specification of conflict conditions, called
516 constraints, between different options. Constraints are stored in an array of
517 <a href=
"#ppd_const_t"><code>ppd_const_t
</code></a> structures which specify
518 the options and choices that conflict with each other. The
519 <a href=
"#ppdConflicts"><code>ppdConflicts
</code></a> function tells you
520 how many of the selected options are incompatible. Since constraints are
521 normally specified in pairs, the returned value is typically an even number.
</p>
523 <h3><a name=
"PAGE_SIZES">Page Sizes
</a></h3>
525 <p>Page sizes are special options which have physical dimensions and margins
526 associated with them. The size information is stored in
527 <a href=
"#ppd_size_t"><code>ppd_size_t
</code></a> structures and is available
528 by looking up the named size with the
529 <a href=
"#ppdPageSize"><code>ppdPageSize
</code></a> function. The page size and
530 margins are returned in units called points; there are
72 points per inch. If
531 you pass
<code>NULL
</code> for the size, the currently selected size is
534 <pre class=
"example">
535 #include
<cups/ppd.h
>
537 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
538 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd, NULL);
541 <p>Besides the standard page sizes listed in a PPD file, some printers
542 support variable or custom page sizes. Custom page sizes are supported if the
543 <code>variables_sizes
</code> member of the
544 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure is non-zero.
545 The
<code>custom_min
</code>,
<code>custom_max
</code>, and
546 <code>custom_margins
</code> members of the
547 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure define the limits
548 of the printable area. To get the resulting media size, use a page size string
549 of the form
"Custom.<I>width</I>x<I>length</I>", where
"width" and
"length" are
550 in points. Custom page size names can also be specified in inches
551 (
"Custom.<i>width</i>x<i>height</i>in"), centimeters
552 (
"Custom.<i>width</i>x<i>height</i>cm"), or millimeters
553 (
"Custom.<i>width</i>x<i>height</i>mm"):
</p>
555 <pre class=
"example">
556 #include
<cups/ppd.h
>
558 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
560 /* Get an
576x720 point custom page size */
561 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.576x720");
563 /* Get an
8x10 inch custom page size */
564 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.8x10in");
566 /* Get a
100x200 millimeter custom page size */
567 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.100x200mm");
569 /* Get a
12.7x34.5 centimeter custom page size */
570 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.12.7x34.5cm");
573 <p>If the PPD does not support variable page sizes, the
574 <a href=
"#ppdPageSize"><code>ppdPageSize
</code></a> function will return
575 <code>NULL
</code>.
</p>
577 <h3><a name=
"ATTRIBUTES">Attributes
</a></h3>
579 <p>Every PPD file is composed of one or more attributes. Most of these
580 attributes are used to define groups, options, choices, and page sizes,
581 however several informational attributes may be present which you can access
582 in your program or filter. Attributes normally look like one of the following
583 examples in a PPD file:
</p>
585 <pre class=
"example">
588 *name spec/text:
"value"
591 <p>The
<a href=
"#ppdFindAttr"><code>ppdFindAttr
</code></a> and
592 <a href=
"#ppdFindNextAttr"><code>ppdFindNextAttr
</code></a> functions find the
593 first and next instances, respectively, of the named attribute with the given
594 "spec" string and return a
<a href=
"#ppd_attr_t"><code>ppd_attr_t
</code></a>
595 structure. If you provide a NULL specifier string, all attributes with the
596 given name will be returned. For example, the following code lists all of the
597 <code>Product
</code> attributes in a PPD file:
</p>
599 <pre class=
"example">
600 #include
<cups/ppd.h
>
602 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
603 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *attr;
605 for (attr =
<a href=
"#ppdFindAttr">ppdFindAttr
</a>(ppd,
"Product", NULL);
607 attr =
<a href=
"#ppdFindNextAttr">ppdFindNextAttr
</a>(ppd,
"Product", NULL))
610 <h2 class=
"title"><a name=
"FUNCTIONS">Functions
</a></h2>
611 <h3 class=
"function"><a name=
"cupsMarkOptions">cupsMarkOptions
</a></h3>
612 <p class=
"description">Mark command-line options in a PPD file.
</p>
614 int cupsMarkOptions (
<br>
615 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
616 int num_options,
<br>
617 cups_option_t *options
<br>
619 <h4 class=
"parameters">Parameters
</h4>
622 <dd class=
"description">PPD file
</dd>
624 <dd class=
"description">Number of options
</dd>
626 <dd class=
"description">Options
</dd>
628 <h4 class=
"returnvalue">Return Value
</h4>
629 <p class=
"description">1 if conflicting
</p>
630 <h4 class=
"discussion">Discussion
</h4>
631 <p class=
"discussion">This function maps the IPP
"finishings
",
"media
",
"mirror
",
632 "multiple-document-handling
",
"output-bin
",
"printer-resolution
", and
633 "sides
" attributes to their corresponding PPD options and choices.
</p>
634 <h3 class=
"function"><a name=
"ppdClose">ppdClose
</a></h3>
635 <p class=
"description">Free all memory used by the PPD file.
</p>
638 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
640 <h4 class=
"parameters">Parameters
</h4>
643 <dd class=
"description">PPD file record
</dd>
645 <h3 class=
"function"><a name=
"ppdCollect">ppdCollect
</a></h3>
646 <p class=
"description">Collect all marked options that reside in the specified
650 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
651 <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br>
652 <a href=
"#ppd_choice_t">ppd_choice_t
</a> ***choices
<br>
654 <h4 class=
"parameters">Parameters
</h4>
657 <dd class=
"description">PPD file data
</dd>
659 <dd class=
"description">Section to collect
</dd>
661 <dd class=
"description">Pointers to choices
</dd>
663 <h4 class=
"returnvalue">Return Value
</h4>
664 <p class=
"description">Number of options marked
</p>
665 <h4 class=
"discussion">Discussion
</h4>
666 <p class=
"discussion">The choices array should be freed using
<code>free
</code> when you are
667 finished with it.
</p>
668 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdCollect2">ppdCollect2
</a></h3>
669 <p class=
"description">Collect all marked options that reside in the
670 specified section and minimum order.
</p>
672 int ppdCollect2 (
<br>
673 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
674 <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br>
675 float min_order,
<br>
676 <a href=
"#ppd_choice_t">ppd_choice_t
</a> ***choices
<br>
678 <h4 class=
"parameters">Parameters
</h4>
681 <dd class=
"description">PPD file data
</dd>
683 <dd class=
"description">Section to collect
</dd>
685 <dd class=
"description">Minimum OrderDependency value
</dd>
687 <dd class=
"description">Pointers to choices
</dd>
689 <h4 class=
"returnvalue">Return Value
</h4>
690 <p class=
"description">Number of options marked
</p>
691 <h4 class=
"discussion">Discussion
</h4>
692 <p class=
"discussion">The choices array should be freed using
<code>free
</code> when you are
696 <h3 class=
"function"><a name=
"ppdConflicts">ppdConflicts
</a></h3>
697 <p class=
"description">Check to see if there are any conflicts among the
698 marked option choices.
</p>
700 int ppdConflicts (
<br>
701 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
703 <h4 class=
"parameters">Parameters
</h4>
706 <dd class=
"description">PPD to check
</dd>
708 <h4 class=
"returnvalue">Return Value
</h4>
709 <p class=
"description">Number of conflicts found
</p>
710 <h4 class=
"discussion">Discussion
</h4>
711 <p class=
"discussion">The returned value is the same as returned by
<a href=
"#ppdMarkOption"><code>ppdMarkOption
</code></a>.
</p>
712 <h3 class=
"function"><a name=
"ppdEmit">ppdEmit
</a></h3>
713 <p class=
"description">Emit code for marked options to a file.
</p>
716 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
717 FILE *fp,
<br>
718 <a href=
"#ppd_section_t">ppd_section_t
</a> section
<br>
720 <h4 class=
"parameters">Parameters
</h4>
723 <dd class=
"description">PPD file record
</dd>
725 <dd class=
"description">File to write to
</dd>
727 <dd class=
"description">Section to write
</dd>
729 <h4 class=
"returnvalue">Return Value
</h4>
730 <p class=
"description">0 on success, -
1 on failure
</p>
731 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdEmitAfterOrder">ppdEmitAfterOrder
</a></h3>
732 <p class=
"description">Emit a subset of the code for marked options to a file.
</p>
734 int ppdEmitAfterOrder (
<br>
735 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
736 FILE *fp,
<br>
737 <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br>
738 int limit,
<br>
739 float min_order
<br>
741 <h4 class=
"parameters">Parameters
</h4>
744 <dd class=
"description">PPD file record
</dd>
746 <dd class=
"description">File to write to
</dd>
748 <dd class=
"description">Section to write
</dd>
750 <dd class=
"description">Non-zero to use min_order
</dd>
752 <dd class=
"description">Lowest OrderDependency
</dd>
754 <h4 class=
"returnvalue">Return Value
</h4>
755 <p class=
"description">0 on success, -
1 on failure
</p>
756 <h4 class=
"discussion">Discussion
</h4>
757 <p class=
"discussion">When
"limit
" is non-zero, this function only emits options whose
758 OrderDependency value is greater than or equal to
"min_order
".
<br>
760 When
"limit
" is zero, this function is identical to ppdEmit().
763 <h3 class=
"function"><a name=
"ppdEmitFd">ppdEmitFd
</a></h3>
764 <p class=
"description">Emit code for marked options to a file.
</p>
767 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
768 int fd,
<br>
769 <a href=
"#ppd_section_t">ppd_section_t
</a> section
<br>
771 <h4 class=
"parameters">Parameters
</h4>
774 <dd class=
"description">PPD file record
</dd>
776 <dd class=
"description">File to write to
</dd>
778 <dd class=
"description">Section to write
</dd>
780 <h4 class=
"returnvalue">Return Value
</h4>
781 <p class=
"description">0 on success, -
1 on failure
</p>
782 <h3 class=
"function"><a name=
"ppdEmitJCL">ppdEmitJCL
</a></h3>
783 <p class=
"description">Emit code for JCL options to a file.
</p>
786 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
787 FILE *fp,
<br>
788 int job_id,
<br>
789 const char *user,
<br>
790 const char *title
<br>
792 <h4 class=
"parameters">Parameters
</h4>
795 <dd class=
"description">PPD file record
</dd>
797 <dd class=
"description">File to write to
</dd>
799 <dd class=
"description">Job ID
</dd>
801 <dd class=
"description">Username
</dd>
803 <dd class=
"description">Title
</dd>
805 <h4 class=
"returnvalue">Return Value
</h4>
806 <p class=
"description">0 on success, -
1 on failure
</p>
807 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdEmitJCLEnd">ppdEmitJCLEnd
</a></h3>
808 <p class=
"description">Emit JCLEnd code to a file.
</p>
810 int ppdEmitJCLEnd (
<br>
811 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
812 FILE *fp
<br>
814 <h4 class=
"parameters">Parameters
</h4>
817 <dd class=
"description">PPD file record
</dd>
819 <dd class=
"description">File to write to
</dd>
821 <h4 class=
"returnvalue">Return Value
</h4>
822 <p class=
"description">0 on success, -
1 on failure
</p>
823 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdEmitString">ppdEmitString
</a></h3>
824 <p class=
"description">Get a string containing the code for marked options.
</p>
826 char *ppdEmitString (
<br>
827 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
828 <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br>
829 float min_order
<br>
831 <h4 class=
"parameters">Parameters
</h4>
834 <dd class=
"description">PPD file record
</dd>
836 <dd class=
"description">Section to write
</dd>
838 <dd class=
"description">Lowest OrderDependency
</dd>
840 <h4 class=
"returnvalue">Return Value
</h4>
841 <p class=
"description">String containing option code or
<code>NULL
</code> if there is no option code
</p>
842 <h4 class=
"discussion">Discussion
</h4>
843 <p class=
"discussion">When
"min_order
" is greater than zero, this function only includes options
844 whose OrderDependency value is greater than or equal to
"min_order
".
845 Otherwise, all options in the specified section are included in the
848 The return string is allocated on the heap and should be freed using
849 <code>free
</code> when you are done with it.
852 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppdErrorString">ppdErrorString
</a></h3>
853 <p class=
"description">Returns the text assocated with a status.
</p>
855 const char *ppdErrorString (
<br>
856 <a href=
"#ppd_status_t">ppd_status_t
</a> status
<br>
858 <h4 class=
"parameters">Parameters
</h4>
861 <dd class=
"description">PPD status
</dd>
863 <h4 class=
"returnvalue">Return Value
</h4>
864 <p class=
"description">Status string
</p>
865 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppdFindAttr">ppdFindAttr
</a></h3>
866 <p class=
"description">Find the first matching attribute.
</p>
868 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *ppdFindAttr (
<br>
869 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
870 const char *name,
<br>
871 const char *spec
<br>
873 <h4 class=
"parameters">Parameters
</h4>
876 <dd class=
"description">PPD file data
</dd>
878 <dd class=
"description">Attribute name
</dd>
880 <dd class=
"description">Specifier string or
<code>NULL
</code></dd>
882 <h4 class=
"returnvalue">Return Value
</h4>
883 <p class=
"description">Attribute or
<code>NULL
</code> if not found
</p>
884 <h3 class=
"function"><a name=
"ppdFindChoice">ppdFindChoice
</a></h3>
885 <p class=
"description">Return a pointer to an option choice.
</p>
887 <a href=
"#ppd_choice_t">ppd_choice_t
</a> *ppdFindChoice (
<br>
888 <a href=
"#ppd_option_t">ppd_option_t
</a> *o,
<br>
889 const char *choice
<br>
891 <h4 class=
"parameters">Parameters
</h4>
894 <dd class=
"description">Pointer to option
</dd>
896 <dd class=
"description">Name of choice
</dd>
898 <h4 class=
"returnvalue">Return Value
</h4>
899 <p class=
"description">Choice pointer or
<code>NULL
</code></p>
900 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdFindCustomOption">ppdFindCustomOption
</a></h3>
901 <p class=
"description">Find a custom option.
</p>
903 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *ppdFindCustomOption (
<br>
904 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
905 const char *keyword
<br>
907 <h4 class=
"parameters">Parameters
</h4>
910 <dd class=
"description">PPD file
</dd>
912 <dd class=
"description">Custom option name
</dd>
914 <h4 class=
"returnvalue">Return Value
</h4>
915 <p class=
"description">Custom option or NULL
</p>
916 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdFindCustomParam">ppdFindCustomParam
</a></h3>
917 <p class=
"description">Find a parameter for a custom option.
</p>
919 <a href=
"#ppd_cparam_t">ppd_cparam_t
</a> *ppdFindCustomParam (
<br>
920 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *opt,
<br>
921 const char *name
<br>
923 <h4 class=
"parameters">Parameters
</h4>
926 <dd class=
"description">Custom option
</dd>
928 <dd class=
"description">Parameter name
</dd>
930 <h4 class=
"returnvalue">Return Value
</h4>
931 <p class=
"description">Custom parameter or NULL
</p>
932 <h3 class=
"function"><a name=
"ppdFindMarkedChoice">ppdFindMarkedChoice
</a></h3>
933 <p class=
"description">Return the marked choice for the specified option.
</p>
935 <a href=
"#ppd_choice_t">ppd_choice_t
</a> *ppdFindMarkedChoice (
<br>
936 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
937 const char *option
<br>
939 <h4 class=
"parameters">Parameters
</h4>
942 <dd class=
"description">PPD file
</dd>
944 <dd class=
"description">Keyword/option name
</dd>
946 <h4 class=
"returnvalue">Return Value
</h4>
947 <p class=
"description">Pointer to choice or
<code>NULL
</code></p>
948 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppdFindNextAttr">ppdFindNextAttr
</a></h3>
949 <p class=
"description">Find the next matching attribute.
</p>
951 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *ppdFindNextAttr (
<br>
952 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
953 const char *name,
<br>
954 const char *spec
<br>
956 <h4 class=
"parameters">Parameters
</h4>
959 <dd class=
"description">PPD file data
</dd>
961 <dd class=
"description">Attribute name
</dd>
963 <dd class=
"description">Specifier string or
<code>NULL
</code></dd>
965 <h4 class=
"returnvalue">Return Value
</h4>
966 <p class=
"description">Attribute or
<code>NULL
</code> if not found
</p>
967 <h3 class=
"function"><a name=
"ppdFindOption">ppdFindOption
</a></h3>
968 <p class=
"description">Return a pointer to the specified option.
</p>
970 <a href=
"#ppd_option_t">ppd_option_t
</a> *ppdFindOption (
<br>
971 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
972 const char *option
<br>
974 <h4 class=
"parameters">Parameters
</h4>
977 <dd class=
"description">PPD file data
</dd>
979 <dd class=
"description">Option/Keyword name
</dd>
981 <h4 class=
"returnvalue">Return Value
</h4>
982 <p class=
"description">Pointer to option or
<code>NULL
</code></p>
983 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdFirstCustomParam">ppdFirstCustomParam
</a></h3>
984 <p class=
"description">Return the first parameter for a custom option.
</p>
986 <a href=
"#ppd_cparam_t">ppd_cparam_t
</a> *ppdFirstCustomParam (
<br>
987 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *opt
<br>
989 <h4 class=
"parameters">Parameters
</h4>
992 <dd class=
"description">Custom option
</dd>
994 <h4 class=
"returnvalue">Return Value
</h4>
995 <p class=
"description">Custom parameter or NULL
</p>
996 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdFirstOption">ppdFirstOption
</a></h3>
997 <p class=
"description">Return the first option in the PPD file.
</p>
999 <a href=
"#ppd_option_t">ppd_option_t
</a> *ppdFirstOption (
<br>
1000 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
1002 <h4 class=
"parameters">Parameters
</h4>
1005 <dd class=
"description">PPD file
</dd>
1007 <h4 class=
"returnvalue">Return Value
</h4>
1008 <p class=
"description">First option or
<code>NULL
</code></p>
1009 <h4 class=
"discussion">Discussion
</h4>
1010 <p class=
"discussion">Options are returned from all groups in ascending alphanumeric order.
1013 <h3 class=
"function"><a name=
"ppdIsMarked">ppdIsMarked
</a></h3>
1014 <p class=
"description">Check to see if an option is marked.
</p>
1016 int ppdIsMarked (
<br>
1017 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1018 const char *option,
<br>
1019 const char *choice
<br>
1021 <h4 class=
"parameters">Parameters
</h4>
1024 <dd class=
"description">PPD file data
</dd>
1026 <dd class=
"description">Option/Keyword name
</dd>
1028 <dd class=
"description">Choice name
</dd>
1030 <h4 class=
"returnvalue">Return Value
</h4>
1031 <p class=
"description">Non-zero if option is marked
</p>
1032 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppdLastError">ppdLastError
</a></h3>
1033 <p class=
"description">Return the status from the last ppdOpen*().
</p>
1035 <a href=
"#ppd_status_t">ppd_status_t
</a> ppdLastError (
<br>
1036 int *line
<br>
1038 <h4 class=
"parameters">Parameters
</h4>
1041 <dd class=
"description">Line number
</dd>
1043 <h4 class=
"returnvalue">Return Value
</h4>
1044 <p class=
"description">Status code
</p>
1045 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdLocalize">ppdLocalize
</a></h3>
1046 <p class=
"description">Localize the PPD file to the current locale.
</p>
1048 int ppdLocalize (
<br>
1049 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
1051 <h4 class=
"parameters">Parameters
</h4>
1054 <dd class=
"description">PPD file
</dd>
1056 <h4 class=
"returnvalue">Return Value
</h4>
1057 <p class=
"description">0 on success, -
1 on error
</p>
1058 <h4 class=
"discussion">Discussion
</h4>
1059 <p class=
"discussion">All groups, options, and choices are localized, as are ICC profile
1060 descriptions, printer presets, and custom option parameters. Each
1061 localized string uses the UTF-
8 character encoding.
1064 <h3 class=
"function"><span class=
"info"> CUPS
1.3 </span><a name=
"ppdLocalizeIPPReason">ppdLocalizeIPPReason
</a></h3>
1065 <p class=
"description">Get the localized version of a cupsIPPReason
1068 const char *ppdLocalizeIPPReason (
<br>
1069 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1070 const char *reason,
<br>
1071 const char *scheme,
<br>
1072 char *buffer,
<br>
1073 size_t bufsize
<br>
1075 <h4 class=
"parameters">Parameters
</h4>
1078 <dd class=
"description">PPD file
</dd>
1080 <dd class=
"description">IPP reason keyword to look up
</dd>
1082 <dd class=
"description">URI scheme or NULL for text
</dd>
1084 <dd class=
"description">Value buffer
</dd>
1086 <dd class=
"description">Size of value buffer
</dd>
1088 <h4 class=
"returnvalue">Return Value
</h4>
1089 <p class=
"description">Value or NULL if not found
</p>
1090 <h4 class=
"discussion">Discussion
</h4>
1091 <p class=
"discussion">This function uses the current locale to find the corresponding reason
1092 text or URI from the attribute value. If
"scheme
" is NULL or
"text
",
1093 the returned value contains human-readable (UTF-
8) text from the translation
1094 string or attribute value. Otherwise the corresponding URI is returned.
<br>
1096 If no value of the requested scheme can be found, NULL is returned.
1099 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"ppdLocalizeMarkerName">ppdLocalizeMarkerName
</a></h3>
1100 <p class=
"description">Get the localized version of a marker-names
1101 attribute value.
</p>
1103 const char *ppdLocalizeMarkerName (
<br>
1104 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1105 const char *name
<br>
1107 <h4 class=
"parameters">Parameters
</h4>
1110 <dd class=
"description">PPD file
</dd>
1112 <dd class=
"description">Marker name to look up
</dd>
1114 <h4 class=
"returnvalue">Return Value
</h4>
1115 <p class=
"description">Value or
<code>NULL
</code> if not found
</p>
1116 <h4 class=
"discussion">Discussion
</h4>
1117 <p class=
"discussion">This function uses the current locale to find the corresponding name
1118 text from the attribute value. If no localized text for the requested
1119 name can be found,
<code>NULL
</code> is returned.
1122 <h3 class=
"function"><a name=
"ppdMarkDefaults">ppdMarkDefaults
</a></h3>
1123 <p class=
"description">Mark all default options in the PPD file.
</p>
1125 void ppdMarkDefaults (
<br>
1126 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
1128 <h4 class=
"parameters">Parameters
</h4>
1131 <dd class=
"description">PPD file record
</dd>
1133 <h3 class=
"function"><a name=
"ppdMarkOption">ppdMarkOption
</a></h3>
1134 <p class=
"description">Mark an option in a PPD file.
</p>
1136 int ppdMarkOption (
<br>
1137 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1138 const char *option,
<br>
1139 const char *choice
<br>
1141 <h4 class=
"parameters">Parameters
</h4>
1144 <dd class=
"description">PPD file record
</dd>
1146 <dd class=
"description">Keyword
</dd>
1148 <dd class=
"description">Option name
</dd>
1150 <h4 class=
"returnvalue">Return Value
</h4>
1151 <p class=
"description">Number of conflicts
</p>
1152 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdNextCustomParam">ppdNextCustomParam
</a></h3>
1153 <p class=
"description">Return the next parameter for a custom option.
</p>
1155 <a href=
"#ppd_cparam_t">ppd_cparam_t
</a> *ppdNextCustomParam (
<br>
1156 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *opt
<br>
1158 <h4 class=
"parameters">Parameters
</h4>
1161 <dd class=
"description">Custom option
</dd>
1163 <h4 class=
"returnvalue">Return Value
</h4>
1164 <p class=
"description">Custom parameter or NULL
</p>
1165 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdNextOption">ppdNextOption
</a></h3>
1166 <p class=
"description">Return the next option in the PPD file.
</p>
1168 <a href=
"#ppd_option_t">ppd_option_t
</a> *ppdNextOption (
<br>
1169 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
1171 <h4 class=
"parameters">Parameters
</h4>
1174 <dd class=
"description">PPD file
</dd>
1176 <h4 class=
"returnvalue">Return Value
</h4>
1177 <p class=
"description">Next option or
<code>NULL
</code></p>
1178 <h4 class=
"discussion">Discussion
</h4>
1179 <p class=
"discussion">Options are returned from all groups in ascending alphanumeric order.
1182 <h3 class=
"function"><a name=
"ppdOpen">ppdOpen
</a></h3>
1183 <p class=
"description">Read a PPD file into memory.
</p>
1185 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppdOpen (
<br>
1186 FILE *fp
<br>
1188 <h4 class=
"parameters">Parameters
</h4>
1191 <dd class=
"description">File to read from
</dd>
1193 <h4 class=
"returnvalue">Return Value
</h4>
1194 <p class=
"description">PPD file record
</p>
1195 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdOpen2">ppdOpen2
</a></h3>
1196 <p class=
"description">Read a PPD file into memory.
</p>
1198 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppdOpen2 (
<br>
1199 cups_file_t *fp
<br>
1201 <h4 class=
"parameters">Parameters
</h4>
1204 <dd class=
"description">File to read from
</dd>
1206 <h4 class=
"returnvalue">Return Value
</h4>
1207 <p class=
"description">PPD file record or
<code>NULL
</code> if the PPD file could not be opened.
</p>
1208 <h3 class=
"function"><a name=
"ppdOpenFd">ppdOpenFd
</a></h3>
1209 <p class=
"description">Read a PPD file into memory.
</p>
1211 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppdOpenFd (
<br>
1212 int fd
<br>
1214 <h4 class=
"parameters">Parameters
</h4>
1217 <dd class=
"description">File to read from
</dd>
1219 <h4 class=
"returnvalue">Return Value
</h4>
1220 <p class=
"description">PPD file record or
<code>NULL
</code> if the PPD file could not be opened.
</p>
1221 <h3 class=
"function"><a name=
"ppdOpenFile">ppdOpenFile
</a></h3>
1222 <p class=
"description">Read a PPD file into memory.
</p>
1224 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppdOpenFile (
<br>
1225 const char *filename
<br>
1227 <h4 class=
"parameters">Parameters
</h4>
1230 <dd class=
"description">File to read from
</dd>
1232 <h4 class=
"returnvalue">Return Value
</h4>
1233 <p class=
"description">PPD file record or
<code>NULL
</code> if the PPD file could not be opened.
</p>
1234 <h3 class=
"function"><a name=
"ppdPageLength">ppdPageLength
</a></h3>
1235 <p class=
"description">Get the page length for the given size.
</p>
1237 float ppdPageLength (
<br>
1238 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1239 const char *name
<br>
1241 <h4 class=
"parameters">Parameters
</h4>
1244 <dd class=
"description">PPD file
</dd>
1246 <dd class=
"description">Size name
</dd>
1248 <h4 class=
"returnvalue">Return Value
</h4>
1249 <p class=
"description">Length of page in points or
0.0</p>
1250 <h3 class=
"function"><a name=
"ppdPageSize">ppdPageSize
</a></h3>
1251 <p class=
"description">Get the page size record for the given size.
</p>
1253 <a href=
"#ppd_size_t">ppd_size_t
</a> *ppdPageSize (
<br>
1254 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1255 const char *name
<br>
1257 <h4 class=
"parameters">Parameters
</h4>
1260 <dd class=
"description">PPD file record
</dd>
1262 <dd class=
"description">Size name
</dd>
1264 <h4 class=
"returnvalue">Return Value
</h4>
1265 <p class=
"description">Size record for page or NULL
</p>
1266 <h3 class=
"function"><a name=
"ppdPageWidth">ppdPageWidth
</a></h3>
1267 <p class=
"description">Get the page width for the given size.
</p>
1269 float ppdPageWidth (
<br>
1270 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1271 const char *name
<br>
1273 <h4 class=
"parameters">Parameters
</h4>
1276 <dd class=
"description">PPD file record
</dd>
1278 <dd class=
"description">Size name
</dd>
1280 <h4 class=
"returnvalue">Return Value
</h4>
1281 <p class=
"description">Width of page in points or
0.0</p>
1282 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20 </span><a name=
"ppdSetConformance">ppdSetConformance
</a></h3>
1283 <p class=
"description">Set the conformance level for PPD files.
</p>
1285 void ppdSetConformance (
<br>
1286 <a href=
"#ppd_conform_t">ppd_conform_t
</a> c
<br>
1288 <h4 class=
"parameters">Parameters
</h4>
1291 <dd class=
"description">Conformance level
</dd>
1293 <h2 class=
"title"><a name=
"TYPES">Data Types
</a></h2>
1294 <h3 class=
"typedef"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppd_attr_t">ppd_attr_t
</a></h3>
1295 <p class=
"description">PPD Attribute Structure
</p>
1297 typedef struct
<a href=
"#ppd_attr_s">ppd_attr_s
</a> ppd_attr_t;
1299 <h3 class=
"typedef"><a name=
"ppd_choice_t">ppd_choice_t
</a></h3>
1300 <p class=
"description">Option choices
</p>
1302 typedef struct
<a href=
"#ppd_choice_s">ppd_choice_s
</a> ppd_choice_t;
1304 <h3 class=
"typedef"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppd_conform_t">ppd_conform_t
</a></h3>
1305 <p class=
"description">Conformance Levels
</p>
1307 typedef enum
<a href=
"#ppd_conform_e">ppd_conform_e
</a> ppd_conform_t;
1309 <h3 class=
"typedef"><a name=
"ppd_const_t">ppd_const_t
</a></h3>
1310 <p class=
"description">Constraints
</p>
1312 typedef struct
<a href=
"#ppd_const_s">ppd_const_s
</a> ppd_const_t;
1314 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_coption_t">ppd_coption_t
</a></h3>
1315 <p class=
"description">Custom Option
</p>
1317 typedef struct
<a href=
"#ppd_coption_s">ppd_coption_s
</a> ppd_coption_t;
1319 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cparam_t">ppd_cparam_t
</a></h3>
1320 <p class=
"description">Custom Parameter
</p>
1322 typedef struct
<a href=
"#ppd_cparam_s">ppd_cparam_s
</a> ppd_cparam_t;
1324 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cplimit_t">ppd_cplimit_t
</a></h3>
1325 <p class=
"description">Custom Parameter Limit
</p>
1327 typedef union
<a href=
"#ppd_cplimit_u">ppd_cplimit_u
</a> ppd_cplimit_t;
1329 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cptype_t">ppd_cptype_t
</a></h3>
1330 <p class=
"description">Custom Parameter Type
</p>
1332 typedef enum
<a href=
"#ppd_cptype_e">ppd_cptype_e
</a> ppd_cptype_t;
1334 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cpvalue_t">ppd_cpvalue_t
</a></h3>
1335 <p class=
"description">Custom Parameter Value
</p>
1337 typedef union
<a href=
"#ppd_cpvalue_u">ppd_cpvalue_u
</a> ppd_cpvalue_t;
1339 <h3 class=
"typedef"><a name=
"ppd_cs_t">ppd_cs_t
</a></h3>
1340 <p class=
"description">Colorspaces
</p>
1342 typedef enum
<a href=
"#ppd_cs_e">ppd_cs_e
</a> ppd_cs_t;
1344 <h3 class=
"typedef"><a name=
"ppd_emul_t">ppd_emul_t
</a></h3>
1345 <p class=
"description">Emulators
</p>
1347 typedef struct
<a href=
"#ppd_emul_s">ppd_emul_s
</a> ppd_emul_t;
1349 <h3 class=
"typedef"><a name=
"ppd_file_t">ppd_file_t
</a></h3>
1350 <p class=
"description">PPD File
</p>
1352 typedef struct
<a href=
"#ppd_file_s">ppd_file_s
</a> ppd_file_t;
1354 <h3 class=
"typedef"><a name=
"ppd_group_t">ppd_group_t
</a></h3>
1355 <p class=
"description">Groups
</p>
1357 typedef struct
<a href=
"#ppd_group_s">ppd_group_s
</a> ppd_group_t;
1359 <h3 class=
"typedef"><a name=
"ppd_option_t">ppd_option_t
</a></h3>
1360 <p class=
"description">Options
</p>
1362 typedef struct
<a href=
"#ppd_option_s">ppd_option_s
</a> ppd_option_t;
1364 <h3 class=
"typedef"><a name=
"ppd_profile_t">ppd_profile_t
</a></h3>
1365 <p class=
"description">sRGB Color Profiles
</p>
1367 typedef struct
<a href=
"#ppd_profile_s">ppd_profile_s
</a> ppd_profile_t;
1369 <h3 class=
"typedef"><a name=
"ppd_section_t">ppd_section_t
</a></h3>
1370 <p class=
"description">Order dependency sections
</p>
1372 typedef enum
<a href=
"#ppd_section_e">ppd_section_e
</a> ppd_section_t;
1374 <h3 class=
"typedef"><a name=
"ppd_size_t">ppd_size_t
</a></h3>
1375 <p class=
"description">Page Sizes
</p>
1377 typedef struct
<a href=
"#ppd_size_s">ppd_size_s
</a> ppd_size_t;
1379 <h3 class=
"typedef"><a name=
"ppd_status_t">ppd_status_t
</a></h3>
1380 <p class=
"description">Types and structures...
</p>
1382 typedef enum
<a href=
"#ppd_status_e">ppd_status_e
</a> ppd_status_t;
1384 <h3 class=
"typedef"><a name=
"ppd_ui_t">ppd_ui_t
</a></h3>
1385 <p class=
"description">UI Types
</p>
1387 typedef enum
<a href=
"#ppd_ui_e">ppd_ui_e
</a> ppd_ui_t;
1389 <h2 class=
"title"><a name=
"STRUCTURES">Structures
</a></h2>
1390 <h3 class=
"struct"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppd_attr_s">ppd_attr_s
</a></h3>
1391 <p class=
"description">PPD Attribute Structure
</p>
1392 <p class=
"code">struct ppd_attr_s {
<br>
1393 char name[PPD_MAX_NAME];
<br>
1394 char spec[PPD_MAX_NAME];
<br>
1395 char text[PPD_MAX_TEXT];
<br>
1396 char *value;
<br>
1398 <h4 class=
"members">Members
</h4>
1400 <dt>name[PPD_MAX_NAME]
</dt>
1401 <dd class=
"description">Name of attribute (cupsXYZ)
</dd>
1402 <dt>spec[PPD_MAX_NAME]
</dt>
1403 <dd class=
"description">Specifier string, if any
</dd>
1404 <dt>text[PPD_MAX_TEXT]
</dt>
1405 <dd class=
"description">Human-readable text, if any
</dd>
1407 <dd class=
"description">Value string
</dd>
1409 <h3 class=
"struct"><a name=
"ppd_choice_s">ppd_choice_s
</a></h3>
1410 <p class=
"description">Option choices
</p>
1411 <p class=
"code">struct ppd_choice_s {
<br>
1412 char choice[PPD_MAX_NAME];
<br>
1413 char *code;
<br>
1414 char marked;
<br>
1415 <a href=
"#ppd_option_t">ppd_option_t
</a> *option;
<br>
1416 char text[PPD_MAX_TEXT];
<br>
1418 <h4 class=
"members">Members
</h4>
1420 <dt>choice[PPD_MAX_NAME]
</dt>
1421 <dd class=
"description">Computer-readable option name
</dd>
1423 <dd class=
"description">Code to send for this option
</dd>
1425 <dd class=
"description">0 if not selected,
1 otherwise
</dd>
1427 <dd class=
"description">Pointer to parent option structure
</dd>
1428 <dt>text[PPD_MAX_TEXT]
</dt>
1429 <dd class=
"description">Human-readable option name
</dd>
1431 <h3 class=
"struct"><a name=
"ppd_const_s">ppd_const_s
</a></h3>
1432 <p class=
"description">Constraints
</p>
1433 <p class=
"code">struct ppd_const_s {
<br>
1434 char choice1[PPD_MAX_NAME];
<br>
1435 char choice2[PPD_MAX_NAME];
<br>
1436 char option1[PPD_MAX_NAME];
<br>
1437 char option2[PPD_MAX_NAME];
<br>
1439 <h4 class=
"members">Members
</h4>
1441 <dt>choice1[PPD_MAX_NAME]
</dt>
1442 <dd class=
"description">First option/choice (blank for all)
</dd>
1443 <dt>choice2[PPD_MAX_NAME]
</dt>
1444 <dd class=
"description">Second option/choice (blank for all)
</dd>
1445 <dt>option1[PPD_MAX_NAME]
</dt>
1446 <dd class=
"description">First keyword
</dd>
1447 <dt>option2[PPD_MAX_NAME]
</dt>
1448 <dd class=
"description">Second keyword
</dd>
1450 <h3 class=
"struct"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_coption_s">ppd_coption_s
</a></h3>
1451 <p class=
"description">Custom Option
</p>
1452 <p class=
"code">struct ppd_coption_s {
<br>
1453 char keyword[PPD_MAX_NAME];
<br>
1454 int marked;
<br>
1455 <a href=
"#ppd_option_t">ppd_option_t
</a> *option;
<br>
1456 cups_array_t *params;
<br>
1458 <h4 class=
"members">Members
</h4>
1460 <dt>keyword[PPD_MAX_NAME]
</dt>
1461 <dd class=
"description">Name of option that is being extended...
</dd>
1463 <dd class=
"description">Extended option is marked
</dd>
1465 <dd class=
"description">Option that is being extended...
</dd>
1467 <dd class=
"description">Parameters
</dd>
1469 <h3 class=
"struct"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cparam_s">ppd_cparam_s
</a></h3>
1470 <p class=
"description">Custom Parameter
</p>
1471 <p class=
"code">struct ppd_cparam_s {
<br>
1472 <a href=
"#ppd_cpvalue_t">ppd_cpvalue_t
</a> current;
<br>
1473 <a href=
"#ppd_cplimit_t">ppd_cplimit_t
</a> minimum, maximum;
<br>
1474 char name[PPD_MAX_NAME];
<br>
1475 int order;
<br>
1476 char text[PPD_MAX_TEXT];
<br>
1477 <a href=
"#ppd_cptype_t">ppd_cptype_t
</a> type;
<br>
1479 <h4 class=
"members">Members
</h4>
1482 <dd class=
"description">Current value
</dd>
1484 <dd class=
"description">Maximum value
</dd>
1485 <dt>name[PPD_MAX_NAME]
</dt>
1486 <dd class=
"description">Parameter name
</dd>
1488 <dd class=
"description">Order (
0 to N)
</dd>
1489 <dt>text[PPD_MAX_TEXT]
</dt>
1490 <dd class=
"description">Human-readable text
</dd>
1492 <dd class=
"description">Parameter type
</dd>
1494 <h3 class=
"struct"><a name=
"ppd_emul_s">ppd_emul_s
</a></h3>
1495 <p class=
"description">Emulators
</p>
1496 <p class=
"code">struct ppd_emul_s {
<br>
1497 char name[PPD_MAX_NAME];
<br>
1498 char *start;
<br>
1499 char *stop;
<br>
1501 <h4 class=
"members">Members
</h4>
1503 <dt>name[PPD_MAX_NAME]
</dt>
1504 <dd class=
"description">Emulator name
</dd>
1506 <dd class=
"description">Code to switch to this emulation
</dd>
1508 <dd class=
"description">Code to stop this emulation
</dd>
1510 <h3 class=
"struct"><a name=
"ppd_file_s">ppd_file_s
</a></h3>
1511 <p class=
"description">PPD File
</p>
1512 <p class=
"code">struct ppd_file_s {
<br>
1513 int accurate_screens;
<br>
1514 int color_device;
<br>
1515 <a href=
"#ppd_cs_t">ppd_cs_t
</a> colorspace;
<br>
1516 <a href=
"#ppd_const_t">ppd_const_t
</a> *consts;
<br>
1517 int contone_only;
<br>
1518 float custom_margins[
4];
<br>
1519 float custom_max[
2];
<br>
1520 float custom_min[
2];
<br>
1521 <a href=
"#ppd_emul_t">ppd_emul_t
</a> *emulations;
<br>
1522 char **filters;
<br>
1523 int flip_duplex;
<br>
1524 char **fonts;
<br>
1525 <a href=
"#ppd_group_t">ppd_group_t
</a> *groups;
<br>
1526 char *jcl_begin;
<br>
1527 char *jcl_end;
<br>
1528 char *jcl_ps;
<br>
1529 int landscape;
<br>
1530 char *lang_encoding;
<br>
1531 char *lang_version;
<br>
1532 int language_level;
<br>
1533 int manual_copies;
<br>
1534 char *manufacturer;
<br>
1535 int model_number;
<br>
1536 char *modelname;
<br>
1537 char *nickname;
<br>
1538 int num_consts;
<br>
1539 int num_emulations;
<br>
1540 int num_filters;
<br>
1541 int num_fonts;
<br>
1542 int num_groups;
<br>
1543 int num_profiles;
<br>
1544 int num_sizes;
<br>
1545 char *patches;
<br>
1546 char *pcfilename;
<br>
1547 char *product;
<br>
1548 <a href=
"#ppd_profile_t">ppd_profile_t
</a> *profiles;
<br>
1549 char *protocols;
<br>
1550 char *shortnickname;
<br>
1551 <a href=
"#ppd_size_t">ppd_size_t
</a> *sizes;
<br>
1552 int throughput;
<br>
1553 char *ttrasterizer;
<br>
1554 int variable_sizes;
<br>
1556 <h4 class=
"members">Members
</h4>
1558 <dt>accurate_screens
</dt>
1559 <dd class=
"description">1 = supports accurate screens,
0 = not
</dd>
1560 <dt>color_device
</dt>
1561 <dd class=
"description">1 = color device,
0 = grayscale
</dd>
1562 <dt>colorspace
</dt>
1563 <dd class=
"description">Default colorspace
</dd>
1565 <dd class=
"description">UI/Non-UI constraints
</dd>
1566 <dt>contone_only
</dt>
1567 <dd class=
"description">1 = continuous tone only,
0 = not
</dd>
1568 <dt>custom_margins[
4]
</dt>
1569 <dd class=
"description">Margins around page
</dd>
1570 <dt>custom_max[
2]
</dt>
1571 <dd class=
"description">Maximum variable page size
</dd>
1572 <dt>custom_min[
2]
</dt>
1573 <dd class=
"description">Minimum variable page size
</dd>
1574 <dt>emulations
</dt>
1575 <dd class=
"description">Emulations and the code to invoke them
</dd>
1577 <dd class=
"description">Filter strings...
</dd>
1578 <dt>flip_duplex
<span class=
"info"> DEPRECATED
</span></dt>
1579 <dd class=
"description">1 = Flip page for back sides
</dd>
1581 <dd class=
"description">Pre-loaded fonts
</dd>
1583 <dd class=
"description">UI groups
</dd>
1585 <dd class=
"description">Start JCL commands
</dd>
1587 <dd class=
"description">End JCL commands
</dd>
1589 <dd class=
"description">Enter PostScript interpreter
</dd>
1591 <dd class=
"description">-
90 or
90</dd>
1592 <dt>lang_encoding
</dt>
1593 <dd class=
"description">Language encoding
</dd>
1594 <dt>lang_version
</dt>
1595 <dd class=
"description">Language version (English, Spanish, etc.)
</dd>
1596 <dt>language_level
</dt>
1597 <dd class=
"description">Language level of device
</dd>
1598 <dt>manual_copies
</dt>
1599 <dd class=
"description">1 = Copies done manually,
0 = hardware
</dd>
1600 <dt>manufacturer
</dt>
1601 <dd class=
"description">Manufacturer name
</dd>
1602 <dt>model_number
</dt>
1603 <dd class=
"description">Device-specific model number
</dd>
1605 <dd class=
"description">Model name (general)
</dd>
1607 <dd class=
"description">Nickname (specific)
</dd>
1608 <dt>num_consts
</dt>
1609 <dd class=
"description">Number of UI/Non-UI constraints
</dd>
1610 <dt>num_emulations
</dt>
1611 <dd class=
"description">Number of emulations supported
</dd>
1612 <dt>num_filters
</dt>
1613 <dd class=
"description">Number of filters
</dd>
1615 <dd class=
"description">Number of pre-loaded fonts
</dd>
1616 <dt>num_groups
</dt>
1617 <dd class=
"description">Number of UI groups
</dd>
1618 <dt>num_profiles
</dt>
1619 <dd class=
"description">Number of sRGB color profiles
</dd>
1621 <dd class=
"description">Number of page sizes
</dd>
1623 <dd class=
"description">Patch commands to be sent to printer
</dd>
1624 <dt>pcfilename
<span class=
"info"> CUPS
1.1.19 </span></dt>
1625 <dd class=
"description">PCFileName string
</dd>
1627 <dd class=
"description">Product name (from PS RIP/interpreter)
</dd>
1629 <dd class=
"description">sRGB color profiles
</dd>
1630 <dt>protocols
<span class=
"info"> CUPS
1.1.19 </span></dt>
1631 <dd class=
"description">Protocols (BCP, TBCP) string
</dd>
1632 <dt>shortnickname
</dt>
1633 <dd class=
"description">Short version of nickname
</dd>
1635 <dd class=
"description">Page sizes
</dd>
1636 <dt>throughput
</dt>
1637 <dd class=
"description">Pages per minute
</dd>
1638 <dt>ttrasterizer
</dt>
1639 <dd class=
"description">Truetype rasterizer
</dd>
1640 <dt>variable_sizes
</dt>
1641 <dd class=
"description">1 = supports variable sizes,
0 = doesn't
</dd>
1643 <h3 class=
"struct"><a name=
"ppd_group_s">ppd_group_s
</a></h3>
1644 <p class=
"description">Groups
</p>
1645 <p class=
"code">struct ppd_group_s {
<br>
1646 char text[PPD_MAX_TEXT - PPD_MAX_NAME];
<br>
1647 char name[PPD_MAX_NAME];
<br>
1648 int num_options;
<br>
1649 int num_subgroups;
<br>
1650 <a href=
"#ppd_option_t">ppd_option_t
</a> *options;
<br>
1651 struct
<a href=
"#ppd_group_s">ppd_group_s
</a> *subgroups;
<br>
1653 <h4 class=
"members">Members
</h4>
1655 <dt>PPD_MAX_NAME]
</dt>
1656 <dd class=
"description">Human-readable group name
</dd>
1657 <dt>name[PPD_MAX_NAME]
<span class=
"info"> CUPS
1.1.18 </span></dt>
1658 <dd class=
"description">Group name
</dd>
1659 <dt>num_options
</dt>
1660 <dd class=
"description">Number of options
</dd>
1661 <dt>num_subgroups
</dt>
1662 <dd class=
"description">Number of sub-groups
</dd>
1664 <dd class=
"description">Options
</dd>
1666 <dd class=
"description">Sub-groups (max depth =
1)
</dd>
1668 <h3 class=
"struct"><a name=
"ppd_option_s">ppd_option_s
</a></h3>
1669 <p class=
"description">Options
</p>
1670 <p class=
"code">struct ppd_option_s {
<br>
1671 <a href=
"#ppd_choice_t">ppd_choice_t
</a> *choices;
<br>
1672 char conflicted;
<br>
1673 char defchoice[PPD_MAX_NAME];
<br>
1674 char keyword[PPD_MAX_NAME];
<br>
1675 int num_choices;
<br>
1676 float order;
<br>
1677 <a href=
"#ppd_section_t">ppd_section_t
</a> section;
<br>
1678 char text[PPD_MAX_TEXT];
<br>
1679 <a href=
"#ppd_ui_t">ppd_ui_t
</a> ui;
<br>
1681 <h4 class=
"members">Members
</h4>
1684 <dd class=
"description">Option choices
</dd>
1685 <dt>conflicted
</dt>
1686 <dd class=
"description">0 if no conflicts exist,
1 otherwise
</dd>
1687 <dt>defchoice[PPD_MAX_NAME]
</dt>
1688 <dd class=
"description">Default option choice
</dd>
1689 <dt>keyword[PPD_MAX_NAME]
</dt>
1690 <dd class=
"description">Option keyword name (
"PageSize
", etc.)
</dd>
1691 <dt>num_choices
</dt>
1692 <dd class=
"description">Number of option choices
</dd>
1694 <dd class=
"description">Order number
</dd>
1696 <dd class=
"description">Section for command
</dd>
1697 <dt>text[PPD_MAX_TEXT]
</dt>
1698 <dd class=
"description">Human-readable text
</dd>
1700 <dd class=
"description">Type of UI option
</dd>
1702 <h3 class=
"struct"><a name=
"ppd_profile_s">ppd_profile_s
</a></h3>
1703 <p class=
"description">sRGB Color Profiles
</p>
1704 <p class=
"code">struct ppd_profile_s {
<br>
1705 float density;
<br>
1706 float gamma;
<br>
1707 float matrix[
3][
3];
<br>
1708 char media_type[PPD_MAX_NAME];
<br>
1709 char resolution[PPD_MAX_NAME];
<br>
1711 <h4 class=
"members">Members
</h4>
1714 <dd class=
"description">Ink density to use
</dd>
1716 <dd class=
"description">Gamma correction to use
</dd>
1717 <dt>matrix[
3][
3]
</dt>
1718 <dd class=
"description">Transform matrix
</dd>
1719 <dt>media_type[PPD_MAX_NAME]
</dt>
1720 <dd class=
"description">Media type or
"-
"</dd>
1721 <dt>resolution[PPD_MAX_NAME]
</dt>
1722 <dd class=
"description">Resolution or
"-
"</dd>
1724 <h3 class=
"struct"><a name=
"ppd_size_s">ppd_size_s
</a></h3>
1725 <p class=
"description">Page Sizes
</p>
1726 <p class=
"code">struct ppd_size_s {
<br>
1727 float bottom;
<br>
1728 float left;
<br>
1729 float length;
<br>
1730 int marked;
<br>
1731 char name[PPD_MAX_NAME];
<br>
1732 float right;
<br>
1733 float top;
<br>
1734 float width;
<br>
1736 <h4 class=
"members">Members
</h4>
1739 <dd class=
"description">Bottom printable margin in points
</dd>
1741 <dd class=
"description">Left printable margin in points
</dd>
1743 <dd class=
"description">Length of media in points
</dd>
1745 <dd class=
"description">Page size selected?
</dd>
1746 <dt>name[PPD_MAX_NAME]
</dt>
1747 <dd class=
"description">Media size option
</dd>
1749 <dd class=
"description">Right printable margin in points
</dd>
1751 <dd class=
"description">Top printable margin in points
</dd>
1753 <dd class=
"description">Width of media in points
</dd>
1755 <h2 class=
"title"><a name=
"UNIONS">Unions
</a></h2>
1756 <h3 class=
"union"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cplimit_u">ppd_cplimit_u
</a></h3>
1757 <p class=
"description">Custom Parameter Limit
</p>
1758 <p class=
"code">union ppd_cplimit_u {
<br>
1759 float custom_curve;
<br>
1760 int custom_int;
<br>
1761 float custom_invcurve;
<br>
1762 int custom_passcode;
<br>
1763 int custom_password;
<br>
1764 float custom_points;
<br>
1765 float custom_real;
<br>
1766 int custom_string;
<br>
1768 <h4 class=
"members">Members
</h4>
1770 <dt>custom_curve
</dt>
1771 <dd class=
"description">Gamma value
</dd>
1772 <dt>custom_int
</dt>
1773 <dd class=
"description">Integer value
</dd>
1774 <dt>custom_invcurve
</dt>
1775 <dd class=
"description">Gamma value
</dd>
1776 <dt>custom_passcode
</dt>
1777 <dd class=
"description">Passcode length
</dd>
1778 <dt>custom_password
</dt>
1779 <dd class=
"description">Password length
</dd>
1780 <dt>custom_points
</dt>
1781 <dd class=
"description">Measurement value
</dd>
1782 <dt>custom_real
</dt>
1783 <dd class=
"description">Real value
</dd>
1784 <dt>custom_string
</dt>
1785 <dd class=
"description">String length
</dd>
1787 <h3 class=
"union"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cpvalue_u">ppd_cpvalue_u
</a></h3>
1788 <p class=
"description">Custom Parameter Value
</p>
1789 <p class=
"code">union ppd_cpvalue_u {
<br>
1790 float custom_curve;
<br>
1791 int custom_int;
<br>
1792 float custom_invcurve;
<br>
1793 char *custom_passcode;
<br>
1794 char *custom_password;
<br>
1795 float custom_points;
<br>
1796 float custom_real;
<br>
1797 char *custom_string;
<br>
1799 <h4 class=
"members">Members
</h4>
1801 <dt>custom_curve
</dt>
1802 <dd class=
"description">Gamma value
</dd>
1803 <dt>custom_int
</dt>
1804 <dd class=
"description">Integer value
</dd>
1805 <dt>custom_invcurve
</dt>
1806 <dd class=
"description">Gamma value
</dd>
1807 <dt>custom_passcode
</dt>
1808 <dd class=
"description">Passcode value
</dd>
1809 <dt>custom_password
</dt>
1810 <dd class=
"description">Password value
</dd>
1811 <dt>custom_points
</dt>
1812 <dd class=
"description">Measurement value
</dd>
1813 <dt>custom_real
</dt>
1814 <dd class=
"description">Real value
</dd>
1815 <dt>custom_string
</dt>
1816 <dd class=
"description">String value
</dd>
1818 <h2 class=
"title"><a name=
"ENUMERATIONS">Constants
</a></h2>
1819 <h3 class=
"enumeration"><a name=
"ppd_conform_e">ppd_conform_e
</a></h3>
1820 <p class=
"description"></p>
1821 <h4 class=
"constants">Constants
</h4>
1823 <dt>PPD_CONFORM_RELAXED
</dt>
1824 <dd class=
"description">Relax whitespace and control char
</dd>
1825 <dt>PPD_CONFORM_STRICT
</dt>
1826 <dd class=
"description">Require strict conformance
</dd>
1828 <h3 class=
"enumeration"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cptype_e">ppd_cptype_e
</a></h3>
1829 <p class=
"description">Custom Parameter Type
</p>
1830 <h4 class=
"constants">Constants
</h4>
1832 <dt>PPD_CUSTOM_CURVE
</dt>
1833 <dd class=
"description">Curve value for f(x) = x^value
</dd>
1834 <dt>PPD_CUSTOM_INT
</dt>
1835 <dd class=
"description">Integer number value
</dd>
1836 <dt>PPD_CUSTOM_INVCURVE
</dt>
1837 <dd class=
"description">Curve value for f(x) = x^(
1/value)
</dd>
1838 <dt>PPD_CUSTOM_PASSCODE
</dt>
1839 <dd class=
"description">String of (hidden) numbers
</dd>
1840 <dt>PPD_CUSTOM_PASSWORD
</dt>
1841 <dd class=
"description">String of (hidden) characters
</dd>
1842 <dt>PPD_CUSTOM_POINTS
</dt>
1843 <dd class=
"description">Measurement value in points
</dd>
1844 <dt>PPD_CUSTOM_REAL
</dt>
1845 <dd class=
"description">Real number value
</dd>
1846 <dt>PPD_CUSTOM_STRING
</dt>
1847 <dd class=
"description">String of characters
</dd>
1849 <h3 class=
"enumeration"><a name=
"ppd_cs_e">ppd_cs_e
</a></h3>
1850 <p class=
"description">Colorspaces
</p>
1851 <h4 class=
"constants">Constants
</h4>
1853 <dt>PPD_CS_CMY
</dt>
1854 <dd class=
"description">CMY colorspace
</dd>
1855 <dt>PPD_CS_CMYK
</dt>
1856 <dd class=
"description">CMYK colorspace
</dd>
1857 <dt>PPD_CS_GRAY
</dt>
1858 <dd class=
"description">Grayscale colorspace
</dd>
1860 <dd class=
"description">DeviceN colorspace
</dd>
1861 <dt>PPD_CS_RGB
</dt>
1862 <dd class=
"description">RGB colorspace
</dd>
1863 <dt>PPD_CS_RGBK
</dt>
1864 <dd class=
"description">RGBK (K = gray) colorspace
</dd>
1866 <h3 class=
"enumeration"><a name=
"ppd_section_e">ppd_section_e
</a></h3>
1867 <p class=
"description">Order dependency sections
</p>
1868 <h4 class=
"constants">Constants
</h4>
1870 <dt>PPD_ORDER_ANY
</dt>
1871 <dd class=
"description">Option code can be anywhere in the file
</dd>
1872 <dt>PPD_ORDER_DOCUMENT
</dt>
1873 <dd class=
"description">... must be in the DocumentSetup section
</dd>
1874 <dt>PPD_ORDER_EXIT
</dt>
1875 <dd class=
"description">... must be sent prior to the document
</dd>
1876 <dt>PPD_ORDER_JCL
</dt>
1877 <dd class=
"description">... must be sent as a JCL command
</dd>
1878 <dt>PPD_ORDER_PAGE
</dt>
1879 <dd class=
"description">... must be in the PageSetup section
</dd>
1880 <dt>PPD_ORDER_PROLOG
</dt>
1881 <dd class=
"description">... must be in the Prolog section
</dd>
1883 <h3 class=
"enumeration"><a name=
"ppd_status_e">ppd_status_e
</a></h3>
1884 <p class=
"description">Types and structures...
</p>
1885 <h4 class=
"constants">Constants
</h4>
1887 <dt>PPD_ALLOC_ERROR
</dt>
1888 <dd class=
"description">Memory allocation error
</dd>
1889 <dt>PPD_BAD_CUSTOM_PARAM
</dt>
1890 <dd class=
"description">Bad custom parameter
</dd>
1891 <dt>PPD_BAD_OPEN_GROUP
</dt>
1892 <dd class=
"description">Bad OpenGroup
</dd>
1893 <dt>PPD_BAD_OPEN_UI
</dt>
1894 <dd class=
"description">Bad OpenUI/JCLOpenUI
</dd>
1895 <dt>PPD_BAD_ORDER_DEPENDENCY
</dt>
1896 <dd class=
"description">Bad OrderDependency
</dd>
1897 <dt>PPD_BAD_UI_CONSTRAINTS
</dt>
1898 <dd class=
"description">Bad UIConstraints
</dd>
1899 <dt>PPD_FILE_OPEN_ERROR
</dt>
1900 <dd class=
"description">Unable to open PPD file
</dd>
1901 <dt>PPD_ILLEGAL_CHARACTER
</dt>
1902 <dd class=
"description">Illegal control character
</dd>
1903 <dt>PPD_ILLEGAL_MAIN_KEYWORD
</dt>
1904 <dd class=
"description">Illegal main keyword string
</dd>
1905 <dt>PPD_ILLEGAL_OPTION_KEYWORD
</dt>
1906 <dd class=
"description">Illegal option keyword string
</dd>
1907 <dt>PPD_ILLEGAL_TRANSLATION
</dt>
1908 <dd class=
"description">Illegal translation string
</dd>
1909 <dt>PPD_ILLEGAL_WHITESPACE
</dt>
1910 <dd class=
"description">Illegal whitespace character
</dd>
1911 <dt>PPD_INTERNAL_ERROR
</dt>
1912 <dd class=
"description">Internal error
</dd>
1913 <dt>PPD_LINE_TOO_LONG
</dt>
1914 <dd class=
"description">Line longer than
255 chars
</dd>
1915 <dt>PPD_MISSING_ASTERISK
</dt>
1916 <dd class=
"description">Missing asterisk in column
0</dd>
1917 <dt>PPD_MISSING_PPDADOBE4
</dt>
1918 <dd class=
"description">Missing PPD-Adobe-
4.x header
</dd>
1919 <dt>PPD_MISSING_VALUE
</dt>
1920 <dd class=
"description">Missing value string
</dd>
1921 <dt>PPD_NESTED_OPEN_GROUP
</dt>
1922 <dd class=
"description">OpenGroup without a CloseGroup first
</dd>
1923 <dt>PPD_NESTED_OPEN_UI
</dt>
1924 <dd class=
"description">OpenUI/JCLOpenUI without a CloseUI/JCLCloseUI first
</dd>
1925 <dt>PPD_NULL_FILE
</dt>
1926 <dd class=
"description">NULL PPD file pointer
</dd>
1928 <dd class=
"description">OK
</dd>
1930 <h3 class=
"enumeration"><a name=
"ppd_ui_e">ppd_ui_e
</a></h3>
1931 <p class=
"description">UI Types
</p>
1932 <h4 class=
"constants">Constants
</h4>
1934 <dt>PPD_UI_BOOLEAN
</dt>
1935 <dd class=
"description">True or False option
</dd>
1936 <dt>PPD_UI_PICKMANY
</dt>
1937 <dd class=
"description">Pick zero or more from a list
</dd>
1938 <dt>PPD_UI_PICKONE
</dt>
1939 <dd class=
"description">Pick one from a list
</dd>