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;
58 text-decoration: none;
62 A:link:hover, A:visited:hover, A:active {
63 text-decoration: underline;
72 border: solid thin #999999;
73 border-collapse: collapse;
89 border: solid thin #cccccc;
96 border-bottom: solid thin #999999;
105 caption-side: bottom;
125 border: thin solid #000000;
133 H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
139 border-bottom: solid 2pt #000000;
157 font-family: monaco, courier, monospace;
166 border: solid thin #999999;
167 border-collapse: collapse;
172 DIV.summary TABLE TD, DIV.summary TABLE TH {
173 border: solid thin #999999;
179 DIV.summary TABLE THEAD TH {
183 /* API documentation styles... */
190 div.body h3, div.body h4, div.body h5 {
191 margin-bottom: 0.5em;
194 .class, .enumeration, .function, .struct, .typedef, .union {
195 border-bottom: solid thin #999999;
202 code, p.code, pre, ul.code li {
203 font-family: monaco, courier, monospace;
206 ul.code, ul.contents, ul.subcontents {
207 list-style-type: none;
217 ul.contents li ul.code, ul.contents li ul.subcontents {
230 margin-bottom: 0.5em;
233 /* This is just for the HTML files generated with the framedhelp target */
236 border: solid thin black;
245 div.contents ul.contents {
248 div.contents ul.subcontents li {
257 "$Id: api-ppd.header 7278 2008-01-31 01:23:09Z mike $"
259 PPD API header for the Common UNIX Printing System (CUPS).
261 Copyright 2008 by Apple Inc.
263 These coded instructions, statements, and computer programs are the
264 property of Apple Inc. and are protected by Federal copyright
265 law. Distribution and use rights are outlined in the file "LICENSE.txt"
266 which should have been included with this file. If this file is
267 file is missing or damaged, see the license at "http://www.cups.org/".
270 <h1 class=
"title">PPD API
</h1>
272 <div class='summary'
><table summary='General Information'
>
286 <td>Programming:
<a href='api-overview.html' target='_top'
>Introduction to CUPS Programming
</a><br>
287 Programming:
<a href='api-cups.html' target='_top'
>CUPS API
</a><br>
288 Reference:
<a href='spec-ppd.html' target='_top'
>CUPS PPD Specification
</a></td>
292 <h2 class=
"title">Contents
</h2>
293 <ul class=
"contents">
295 <li><a href=
"#OVERVIEW">Overview
</a><ul class=
"subcontents">
296 <li><a href=
"#LOADING">Loading a PPD File
</a></li>
297 <li><a href=
"#OPTIONS_AND_GROUPS">Options and Groups
</a></li>
298 <li><a href=
"#CONSTRAINTS">Constraints
</a></li>
299 <li><a href=
"#PAGE_SIZES">Page Sizes
</a></li>
300 <li><a href=
"#ATTRIBUTES">Attributes
</a></li>
302 <li><a href=
"#FUNCTIONS">Functions
</a><ul class=
"code">
303 <li><a href=
"#cupsMarkOptions" title=
"Mark command-line options in a PPD file.">cupsMarkOptions
</a></li>
304 <li><a href=
"#ppdClose" title=
"Free all memory used by the PPD file.">ppdClose
</a></li>
305 <li><a href=
"#ppdCollect" title=
"Collect all marked options that reside in the specified
306 section.">ppdCollect
</a></li>
307 <li><a href=
"#ppdCollect2" title=
"Collect all marked options that reside in the
308 specified section and minimum order.">ppdCollect2
</a></li>
309 <li><a href=
"#ppdConflicts" title=
"Check to see if there are any conflicts among the
310 marked option choices.">ppdConflicts
</a></li>
311 <li><a href=
"#ppdEmit" title=
"Emit code for marked options to a file.">ppdEmit
</a></li>
312 <li><a href=
"#ppdEmitAfterOrder" title=
"Emit a subset of the code for marked options to a file.">ppdEmitAfterOrder
</a></li>
313 <li><a href=
"#ppdEmitFd" title=
"Emit code for marked options to a file.">ppdEmitFd
</a></li>
314 <li><a href=
"#ppdEmitJCL" title=
"Emit code for JCL options to a file.">ppdEmitJCL
</a></li>
315 <li><a href=
"#ppdEmitJCLEnd" title=
"Emit JCLEnd code to a file.">ppdEmitJCLEnd
</a></li>
316 <li><a href=
"#ppdEmitString" title=
"Get a string containing the code for marked options.">ppdEmitString
</a></li>
317 <li><a href=
"#ppdErrorString" title=
"Returns the text assocated with a status.">ppdErrorString
</a></li>
318 <li><a href=
"#ppdFindAttr" title=
"Find the first matching attribute.">ppdFindAttr
</a></li>
319 <li><a href=
"#ppdFindChoice" title=
"Return a pointer to an option choice.">ppdFindChoice
</a></li>
320 <li><a href=
"#ppdFindCustomOption" title=
"Find a custom option.">ppdFindCustomOption
</a></li>
321 <li><a href=
"#ppdFindCustomParam" title=
"Find a parameter for a custom option.">ppdFindCustomParam
</a></li>
322 <li><a href=
"#ppdFindMarkedChoice" title=
"Return the marked choice for the specified option.">ppdFindMarkedChoice
</a></li>
323 <li><a href=
"#ppdFindNextAttr" title=
"Find the next matching attribute.">ppdFindNextAttr
</a></li>
324 <li><a href=
"#ppdFindOption" title=
"Return a pointer to the specified option.">ppdFindOption
</a></li>
325 <li><a href=
"#ppdFirstCustomParam" title=
"Return the first parameter for a custom option.">ppdFirstCustomParam
</a></li>
326 <li><a href=
"#ppdFirstOption" title=
"Return the first option in the PPD file.">ppdFirstOption
</a></li>
327 <li><a href=
"#ppdIsMarked" title=
"Check to see if an option is marked.">ppdIsMarked
</a></li>
328 <li><a href=
"#ppdLastError" title=
"Return the status from the last ppdOpen*().">ppdLastError
</a></li>
329 <li><a href=
"#ppdLocalize" title=
"Localize the PPD file to the current locale.">ppdLocalize
</a></li>
330 <li><a href=
"#ppdLocalizeIPPReason" title=
"Get the localized version of a cupsIPPReason
331 attribute.">ppdLocalizeIPPReason
</a></li>
332 <li><a href=
"#ppdLocalizeMarkerName" title=
"Get the localized version of a marker-names
333 attribute value.">ppdLocalizeMarkerName
</a></li>
334 <li><a href=
"#ppdMarkDefaults" title=
"Mark all default options in the PPD file.">ppdMarkDefaults
</a></li>
335 <li><a href=
"#ppdMarkOption" title=
"Mark an option in a PPD file.">ppdMarkOption
</a></li>
336 <li><a href=
"#ppdNextCustomParam" title=
"Return the next parameter for a custom option.">ppdNextCustomParam
</a></li>
337 <li><a href=
"#ppdNextOption" title=
"Return the next option in the PPD file.">ppdNextOption
</a></li>
338 <li><a href=
"#ppdOpen" title=
"Read a PPD file into memory.">ppdOpen
</a></li>
339 <li><a href=
"#ppdOpen2" title=
"Read a PPD file into memory.">ppdOpen2
</a></li>
340 <li><a href=
"#ppdOpenFd" title=
"Read a PPD file into memory.">ppdOpenFd
</a></li>
341 <li><a href=
"#ppdOpenFile" title=
"Read a PPD file into memory.">ppdOpenFile
</a></li>
342 <li><a href=
"#ppdPageLength" title=
"Get the page length for the given size.">ppdPageLength
</a></li>
343 <li><a href=
"#ppdPageSize" title=
"Get the page size record for the given size.">ppdPageSize
</a></li>
344 <li><a href=
"#ppdPageWidth" title=
"Get the page width for the given size.">ppdPageWidth
</a></li>
345 <li><a href=
"#ppdSetConformance" title=
"Set the conformance level for PPD files.">ppdSetConformance
</a></li>
347 <li><a href=
"#TYPES">Data Types
</a><ul class=
"code">
348 <li><a href=
"#ppd_attr_t" title=
"PPD Attribute Structure ">ppd_attr_t
</a></li>
349 <li><a href=
"#ppd_choice_t" title=
"Option choices">ppd_choice_t
</a></li>
350 <li><a href=
"#ppd_conform_t" title=
"Conformance Levels ">ppd_conform_t
</a></li>
351 <li><a href=
"#ppd_const_t" title=
"Constraints">ppd_const_t
</a></li>
352 <li><a href=
"#ppd_coption_t" title=
"Custom Option ">ppd_coption_t
</a></li>
353 <li><a href=
"#ppd_cparam_t" title=
"Custom Parameter ">ppd_cparam_t
</a></li>
354 <li><a href=
"#ppd_cplimit_t" title=
"Custom Parameter Limit ">ppd_cplimit_t
</a></li>
355 <li><a href=
"#ppd_cptype_t" title=
"Custom Parameter Type ">ppd_cptype_t
</a></li>
356 <li><a href=
"#ppd_cpvalue_t" title=
"Custom Parameter Value ">ppd_cpvalue_t
</a></li>
357 <li><a href=
"#ppd_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_ui_t" title=
"UI Types">ppd_ui_t
</a></li>
366 <li><a href=
"#STRUCTURES">Structures
</a><ul class=
"code">
367 <li><a href=
"#ppd_attr_s" title=
"PPD Attribute Structure ">ppd_attr_s
</a></li>
368 <li><a href=
"#ppd_choice_s" title=
"Option choices">ppd_choice_s
</a></li>
369 <li><a href=
"#ppd_const_s" title=
"Constraints">ppd_const_s
</a></li>
370 <li><a href=
"#ppd_coption_s" title=
"Custom Option ">ppd_coption_s
</a></li>
371 <li><a href=
"#ppd_cparam_s" title=
"Custom Parameter ">ppd_cparam_s
</a></li>
372 <li><a href=
"#ppd_emul_s" title=
"Emulators">ppd_emul_s
</a></li>
373 <li><a href=
"#ppd_file_s" title=
"PPD File">ppd_file_s
</a></li>
374 <li><a href=
"#ppd_group_s" title=
"Groups">ppd_group_s
</a></li>
375 <li><a href=
"#ppd_option_s" title=
"Options">ppd_option_s
</a></li>
376 <li><a href=
"#ppd_profile_s" title=
"sRGB Color Profiles">ppd_profile_s
</a></li>
377 <li><a href=
"#ppd_size_s" title=
"Page Sizes">ppd_size_s
</a></li>
379 <li><a href=
"#UNIONS">Unions
</a><ul class=
"code">
380 <li><a href=
"#ppd_cplimit_u" title=
"Custom Parameter Limit ">ppd_cplimit_u
</a></li>
381 <li><a href=
"#ppd_cpvalue_u" title=
"Custom Parameter Value ">ppd_cpvalue_u
</a></li>
383 <li><a href=
"#ENUMERATIONS">Constants
</a><ul class=
"code">
384 <li><a href=
"#ppd_conform_e" title=
"">ppd_conform_e
</a></li>
385 <li><a href=
"#ppd_cptype_e" title=
"Custom Parameter Type ">ppd_cptype_e
</a></li>
386 <li><a href=
"#ppd_cs_e" title=
"Colorspaces">ppd_cs_e
</a></li>
387 <li><a href=
"#ppd_section_e" title=
"Order dependency sections">ppd_section_e
</a></li>
388 <li><a href=
"#ppd_status_e" title=
"Types and structures...">ppd_status_e
</a></li>
389 <li><a href=
"#ppd_ui_e" title=
"UI Types">ppd_ui_e
</a></li>
393 "$Id: api-ppd.shtml 7278 2008-01-31 01:23:09Z mike $"
395 PPD API introduction for the Common UNIX Printing System (CUPS).
397 Copyright 2007 by Apple Inc.
398 Copyright 1997-2006 by Easy Software Products, all rights reserved.
400 These coded instructions, statements, and computer programs are the
401 property of Apple Inc. and are protected by Federal copyright
402 law. Distribution and use rights are outlined in the file "LICENSE.txt"
403 which should have been included with this file. If this file is
404 file is missing or damaged, see the license at "http://www.cups.org/".
407 <h2 class='title'
><a name='OVERVIEW'
>Overview
</a></h2>
409 <p>The CUPS PPD API provides read-only access the data in PostScript Printer
410 Description (
"PPD") files which are used for all printers with a driver. With
411 it you can display printer options to users, mark option choices and check for
412 conflicting choices, and output marked choices in PostScript output. The
413 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure contains all of
414 the information in a PPD file.
</p>
416 <h3><a name=
"LOADING">Loading a PPD File
</a></h3>
418 <p>The
<a href=
"#ppdOpenFile"><code>ppdOpenFile
</code></a> function
"opens" a
419 PPD file and loads it into memory. For example, the following code opens the
420 current printer's PPD file in a CUPS filter:
</p>
422 <pre class=
"example">
423 #include
<cups/ppd.h
>
425 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd =
<a href=
"#ppdOpenFile">ppdOpenFile
</a>(getenv(
"PPD"));
428 <p>The return value is a pointer to a new
429 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure or
<code>NULL
</code>
430 if the PPD file does not exist or cannot be loaded. The
431 <a href=
"#ppdClose"><code>ppdClose
</code></a> function frees the memory used
432 by the structure:
</p>
434 <pre class=
"example">
435 #include
<cups/ppd.h
>
437 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
439 <a href=
"#ppdClose">ppdClose
</a>(ppd);
442 <h3><a name=
"OPTIONS_AND_GROUPS">Options and Groups
</a></h3>
444 <p>PPD files support multiple options, which are stored in arrays of
445 <a href=
"#ppd_option_t"><code>ppd_option_t
</code></a> and
446 <a href=
"#ppd_choice_t"><code>ppd_choice_t
</code></a> structures.
</p>
448 <p>Each option in turn is associated with a group stored in a
449 <a href=
"#ppd_group_t"><code>ppd_group_t
</code></a> structure. Groups can be
450 specified in the PPD file; if an option is not associated with a group
451 then it is put in an automatically-generated
"General" group. Groups can also
452 have sub-groups, however CUPS currently ignores sub-groups because of past
453 abuses of this functionality.
</p>
455 <p>Options are selected by marking them using one of three functions. The
456 first is
<a href=
"#ppdMarkDefaults"><code>ppdMarkDefaults
</code></a> which
457 selects all of the default options in the PPD file:
</p>
459 <pre class=
"example">
460 #include
<cups/ppd.h
>
462 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
464 <a href=
"#ppdMarkDefaults">ppdMarkDefaults
</a>(ppd);
467 <p>The second is
<a href=
"#ppdMarkOption"><code>ppdMarkOption
</code></a>
468 which selects a single option choice in the PPD file. For example, the following
469 code selects the manual feed media source:
</p>
471 <pre class=
"example">
472 #include
<cups/ppd.h
>
474 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
476 <a href=
"#ppdMarkOption">ppdMarkOption
</a>(ppd,
"InputSlot",
"ManualFeed");
479 <p>The last function is
480 <a href=
"#cupsMarkOptions"><code>cupsMarkOptions
</code></a> which selects
481 multiple option choices in the PPD file from an array of CUPS options, mapping
482 IPP attributes like
"media" and
"sides" to their corresponding PPD options. You
483 typically use this function in a print filter with
484 <code>cupsParseOptions
</code> and
485 <a href=
"#ppdMarkDefaults"><code>ppdMarkDefaults
</code></a> to select all of
486 the option choices needed for the job, for example:
</p>
488 <pre class=
"example">
489 #include
<cups/ppd.h
>
491 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd =
<a href=
"#ppdOpenFile">ppdOpenFile
</a>(getenv(
"PPD"));
492 cups_option_t *options = NULL;
493 int num_options = cupsParseOptions(argv[
5],
0,
&options);
495 <a href=
"#ppdMarkDefaults">ppdMarkDefaults
</a>(ppd);
496 <a href=
"#cupsMarkOptions">cupsMarkOptions
</a>(ppd, num_options, options);
499 <h3><a name=
"CONSTRAINTS">Constraints
</a></h3>
501 <p>PPD files support specification of conflict conditions, called
502 constraints, between different options. Constraints are stored in an array of
503 <a href=
"#ppd_const_t"><code>ppd_const_t
</code></a> structures which specify
504 the options and choices that conflict with each other. The
505 <a href=
"#ppdConflicts"><code>ppdConflicts
</code></a> function tells you
506 how many of the selected options are incompatible.
</p>
508 <h3><a name=
"PAGE_SIZES">Page Sizes
</a></h3>
510 <p>Page sizes are special options which have physical dimensions and margins
511 associated with them. The size information is stored in
512 <a href=
"#ppd_size_t"><code>ppd_size_t
</code></a> structures and is available
513 by looking up the named size with the
514 <a href=
"#ppdPageSize"><code>ppdPageSize
</code></a> function. The page size and
515 margins are returned in units called points; there are
72 points per inch. If
516 you pass
<code>NULL
</code> for the size, the currently selected size is
519 <pre class=
"example">
520 #include
<cups/ppd.h
>
522 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
523 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd, NULL);
526 <p>Besides the standard page sizes listed in a PPD file, some printers
527 support variable or custom page sizes. Custom page sizes are supported if the
528 <code>variables_sizes
</code> member of the
529 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure is non-zero.
530 The
<code>custom_min
</code>,
<code>custom_max
</code>, and
531 <code>custom_margins
</code> members of the
532 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure define the limits
533 of the printable area. To get the resulting media size, use a page size string
534 of the form
"Custom.<I>width</I>x<I>length</I>", where
"width" and
"length" are
535 in points. Custom page size names can also be specified in inches
536 (
"Custom.<i>width</i>x<i>height</i>in"), centimeters
537 (
"Custom.<i>width</i>x<i>height</i>cm"), or millimeters
538 (
"Custom.<i>width</i>x<i>height</i>mm"):
</p>
540 <pre class=
"example">
541 #include
<cups/ppd.h
>
543 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
545 /* Get an
576x720 point custom page size */
546 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.576x720");
548 /* Get an
8x10 inch custom page size */
549 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.8x10in");
551 /* Get a
100x200 millimeter custom page size */
552 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.100x200mm");
554 /* Get a
12.7x34.5 centimeter custom page size */
555 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.12.7x34.5cm");
558 <h3><a name=
"ATTRIBUTES">Attributes
</a></h3>
560 <p>Every PPD file is composed of one or more attributes. Most of these
561 attributes are used to define groups, options, choices, and page sizes,
562 however several informations attributes are available which you may need
563 to access in your program or filter. Attributes normally look like one of
564 the following examples in a PPD file:
</p>
566 <pre class=
"example">
569 *name spec/text:
"value"
572 <p>The
<a href=
"#ppdFindAttr"><code>ppdFindAttr
</code></a> and
573 <a href=
"#ppdFindNextAttr"><code>ppdFindNextAttr
</code></a> functions find the
574 first and next instances, respectively, of the named attribute with the given
575 "spec" string and return a
<a href=
"#ppd_attr_t"><code>ppd_attr_t
</code></a>
576 structure. If you provide a NULL specifier string, all attributes with the
577 given name will be returned. For example, the following code lists all of the
578 <code>Product
</code> attributes in a PPD file:
</p>
580 <pre class=
"example">
581 #include
<cups/ppd.h
>
583 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
584 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *attr;
586 for (attr =
<a href=
"#ppdFindAttr">ppdFindAttr
</a>(ppd,
"Product", NULL);
588 attr =
<a href=
"#ppdFindNextAttr">ppdFindNextAttr
</a>(ppd,
"Product", NULL))
591 <h2 class=
"title"><a name=
"FUNCTIONS">Functions
</a></h2>
592 <h3 class=
"function"><a name=
"cupsMarkOptions">cupsMarkOptions
</a></h3>
593 <p class=
"description">Mark command-line options in a PPD file.
</p>
595 int cupsMarkOptions (
<br>
596 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
597 int num_options,
<br>
598 cups_option_t *options
<br>
600 <h4 class=
"parameters">Parameters
</h4>
603 <dd class=
"description">PPD file
</dd>
605 <dd class=
"description">Number of options
</dd>
607 <dd class=
"description">Options
</dd>
609 <h4 class=
"returnvalue">Return Value
</h4>
610 <p class=
"description">1 if conflicting
</p>
611 <h4 class=
"discussion">Discussion
</h4>
612 <p class=
"discussion">This function maps the IPP
"finishings
",
"media
",
"mirror
",
613 "multiple-document-handling
",
"output-bin
",
"printer-resolution
", and
614 "sides
" attributes to their corresponding PPD options and choices.
</p>
615 <h3 class=
"function"><a name=
"ppdClose">ppdClose
</a></h3>
616 <p class=
"description">Free all memory used by the PPD file.
</p>
619 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
621 <h4 class=
"parameters">Parameters
</h4>
624 <dd class=
"description">PPD file record
</dd>
626 <h3 class=
"function"><a name=
"ppdCollect">ppdCollect
</a></h3>
627 <p class=
"description">Collect all marked options that reside in the specified
631 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
632 <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br>
633 <a href=
"#ppd_choice_t">ppd_choice_t
</a> ***choices
<br>
635 <h4 class=
"parameters">Parameters
</h4>
638 <dd class=
"description">PPD file data
</dd>
640 <dd class=
"description">Section to collect
</dd>
642 <dd class=
"description">Pointers to choices
</dd>
644 <h4 class=
"returnvalue">Return Value
</h4>
645 <p class=
"description">Number of options marked
</p>
646 <h4 class=
"discussion">Discussion
</h4>
647 <p class=
"discussion">The choices array should be freed using
<code>free
</code> when you are
648 finished with it.
</p>
649 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdCollect2">ppdCollect2
</a></h3>
650 <p class=
"description">Collect all marked options that reside in the
651 specified section and minimum order.
</p>
653 int ppdCollect2 (
<br>
654 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
655 <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br>
656 float min_order,
<br>
657 <a href=
"#ppd_choice_t">ppd_choice_t
</a> ***choices
<br>
659 <h4 class=
"parameters">Parameters
</h4>
662 <dd class=
"description">PPD file data
</dd>
664 <dd class=
"description">Section to collect
</dd>
666 <dd class=
"description">Minimum OrderDependency value
</dd>
668 <dd class=
"description">Pointers to choices
</dd>
670 <h4 class=
"returnvalue">Return Value
</h4>
671 <p class=
"description">Number of options marked
</p>
672 <h4 class=
"discussion">Discussion
</h4>
673 <p class=
"discussion">The choices array should be freed using
<code>free
</code> when you are
677 <h3 class=
"function"><a name=
"ppdConflicts">ppdConflicts
</a></h3>
678 <p class=
"description">Check to see if there are any conflicts among the
679 marked option choices.
</p>
681 int ppdConflicts (
<br>
682 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
684 <h4 class=
"parameters">Parameters
</h4>
687 <dd class=
"description">PPD to check
</dd>
689 <h4 class=
"returnvalue">Return Value
</h4>
690 <p class=
"description">Number of conflicts found
</p>
691 <h4 class=
"discussion">Discussion
</h4>
692 <p class=
"discussion">The returned value is the same as returned by
<a href=
"#ppdMarkOption"><code>ppdMarkOption
</code></a>.
</p>
693 <h3 class=
"function"><a name=
"ppdEmit">ppdEmit
</a></h3>
694 <p class=
"description">Emit code for marked options to a file.
</p>
697 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
698 FILE *fp,
<br>
699 <a href=
"#ppd_section_t">ppd_section_t
</a> section
<br>
701 <h4 class=
"parameters">Parameters
</h4>
704 <dd class=
"description">PPD file record
</dd>
706 <dd class=
"description">File to write to
</dd>
708 <dd class=
"description">Section to write
</dd>
710 <h4 class=
"returnvalue">Return Value
</h4>
711 <p class=
"description">0 on success, -
1 on failure
</p>
712 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdEmitAfterOrder">ppdEmitAfterOrder
</a></h3>
713 <p class=
"description">Emit a subset of the code for marked options to a file.
</p>
715 int ppdEmitAfterOrder (
<br>
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>
719 int limit,
<br>
720 float min_order
<br>
722 <h4 class=
"parameters">Parameters
</h4>
725 <dd class=
"description">PPD file record
</dd>
727 <dd class=
"description">File to write to
</dd>
729 <dd class=
"description">Section to write
</dd>
731 <dd class=
"description">Non-zero to use min_order
</dd>
733 <dd class=
"description">Lowest OrderDependency
</dd>
735 <h4 class=
"returnvalue">Return Value
</h4>
736 <p class=
"description">0 on success, -
1 on failure
</p>
737 <h4 class=
"discussion">Discussion
</h4>
738 <p class=
"discussion">When
"limit
" is non-zero, this function only emits options whose
739 OrderDependency value is greater than or equal to
"min_order
".
<br>
741 When
"limit
" is zero, this function is identical to ppdEmit().
744 <h3 class=
"function"><a name=
"ppdEmitFd">ppdEmitFd
</a></h3>
745 <p class=
"description">Emit code for marked options to a file.
</p>
748 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
749 int fd,
<br>
750 <a href=
"#ppd_section_t">ppd_section_t
</a> section
<br>
752 <h4 class=
"parameters">Parameters
</h4>
755 <dd class=
"description">PPD file record
</dd>
757 <dd class=
"description">File to write to
</dd>
759 <dd class=
"description">Section to write
</dd>
761 <h4 class=
"returnvalue">Return Value
</h4>
762 <p class=
"description">0 on success, -
1 on failure
</p>
763 <h3 class=
"function"><a name=
"ppdEmitJCL">ppdEmitJCL
</a></h3>
764 <p class=
"description">Emit code for JCL options to a file.
</p>
767 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
768 FILE *fp,
<br>
769 int job_id,
<br>
770 const char *user,
<br>
771 const char *title
<br>
773 <h4 class=
"parameters">Parameters
</h4>
776 <dd class=
"description">PPD file record
</dd>
778 <dd class=
"description">File to write to
</dd>
780 <dd class=
"description">Job ID
</dd>
782 <dd class=
"description">Username
</dd>
784 <dd class=
"description">Title
</dd>
786 <h4 class=
"returnvalue">Return Value
</h4>
787 <p class=
"description">0 on success, -
1 on failure
</p>
788 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdEmitJCLEnd">ppdEmitJCLEnd
</a></h3>
789 <p class=
"description">Emit JCLEnd code to a file.
</p>
791 int ppdEmitJCLEnd (
<br>
792 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
793 FILE *fp
<br>
795 <h4 class=
"parameters">Parameters
</h4>
798 <dd class=
"description">PPD file record
</dd>
800 <dd class=
"description">File to write to
</dd>
802 <h4 class=
"returnvalue">Return Value
</h4>
803 <p class=
"description">0 on success, -
1 on failure
</p>
804 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdEmitString">ppdEmitString
</a></h3>
805 <p class=
"description">Get a string containing the code for marked options.
</p>
807 char *ppdEmitString (
<br>
808 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
809 <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br>
810 float min_order
<br>
812 <h4 class=
"parameters">Parameters
</h4>
815 <dd class=
"description">PPD file record
</dd>
817 <dd class=
"description">Section to write
</dd>
819 <dd class=
"description">Lowest OrderDependency
</dd>
821 <h4 class=
"returnvalue">Return Value
</h4>
822 <p class=
"description">String containing option code or
<code>NULL
</code> if there is no option code
</p>
823 <h4 class=
"discussion">Discussion
</h4>
824 <p class=
"discussion">When
"min_order
" is greater than zero, this function only includes options
825 whose OrderDependency value is greater than or equal to
"min_order
".
826 Otherwise, all options in the specified section are included in the
829 The return string is allocated on the heap and should be freed using
830 <code>free
</code> when you are done with it.
833 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppdErrorString">ppdErrorString
</a></h3>
834 <p class=
"description">Returns the text assocated with a status.
</p>
836 const char *ppdErrorString (
<br>
837 ppd_status_t status
<br>
839 <h4 class=
"parameters">Parameters
</h4>
842 <dd class=
"description">PPD status
</dd>
844 <h4 class=
"returnvalue">Return Value
</h4>
845 <p class=
"description">Status string
</p>
846 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppdFindAttr">ppdFindAttr
</a></h3>
847 <p class=
"description">Find the first matching attribute.
</p>
849 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *ppdFindAttr (
<br>
850 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
851 const char *name,
<br>
852 const char *spec
<br>
854 <h4 class=
"parameters">Parameters
</h4>
857 <dd class=
"description">PPD file data
</dd>
859 <dd class=
"description">Attribute name
</dd>
861 <dd class=
"description">Specifier string or
<code>NULL
</code></dd>
863 <h4 class=
"returnvalue">Return Value
</h4>
864 <p class=
"description">Attribute or
<code>NULL
</code> if not found
</p>
865 <h3 class=
"function"><a name=
"ppdFindChoice">ppdFindChoice
</a></h3>
866 <p class=
"description">Return a pointer to an option choice.
</p>
868 <a href=
"#ppd_choice_t">ppd_choice_t
</a> *ppdFindChoice (
<br>
869 <a href=
"#ppd_option_t">ppd_option_t
</a> *o,
<br>
870 const char *choice
<br>
872 <h4 class=
"parameters">Parameters
</h4>
875 <dd class=
"description">Pointer to option
</dd>
877 <dd class=
"description">Name of choice
</dd>
879 <h4 class=
"returnvalue">Return Value
</h4>
880 <p class=
"description">Choice pointer or
<code>NULL
</code></p>
881 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdFindCustomOption">ppdFindCustomOption
</a></h3>
882 <p class=
"description">Find a custom option.
</p>
884 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *ppdFindCustomOption (
<br>
885 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
886 const char *keyword
<br>
888 <h4 class=
"parameters">Parameters
</h4>
891 <dd class=
"description">PPD file
</dd>
893 <dd class=
"description">Custom option name
</dd>
895 <h4 class=
"returnvalue">Return Value
</h4>
896 <p class=
"description">Custom option or NULL
</p>
897 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdFindCustomParam">ppdFindCustomParam
</a></h3>
898 <p class=
"description">Find a parameter for a custom option.
</p>
900 <a href=
"#ppd_cparam_t">ppd_cparam_t
</a> *ppdFindCustomParam (
<br>
901 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *opt,
<br>
902 const char *name
<br>
904 <h4 class=
"parameters">Parameters
</h4>
907 <dd class=
"description">Custom option
</dd>
909 <dd class=
"description">Parameter name
</dd>
911 <h4 class=
"returnvalue">Return Value
</h4>
912 <p class=
"description">Custom parameter or NULL
</p>
913 <h3 class=
"function"><a name=
"ppdFindMarkedChoice">ppdFindMarkedChoice
</a></h3>
914 <p class=
"description">Return the marked choice for the specified option.
</p>
916 <a href=
"#ppd_choice_t">ppd_choice_t
</a> *ppdFindMarkedChoice (
<br>
917 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
918 const char *option
<br>
920 <h4 class=
"parameters">Parameters
</h4>
923 <dd class=
"description">PPD file
</dd>
925 <dd class=
"description">Keyword/option name
</dd>
927 <h4 class=
"returnvalue">Return Value
</h4>
928 <p class=
"description">Pointer to choice or
<code>NULL
</code></p>
929 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppdFindNextAttr">ppdFindNextAttr
</a></h3>
930 <p class=
"description">Find the next matching attribute.
</p>
932 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *ppdFindNextAttr (
<br>
933 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
934 const char *name,
<br>
935 const char *spec
<br>
937 <h4 class=
"parameters">Parameters
</h4>
940 <dd class=
"description">PPD file data
</dd>
942 <dd class=
"description">Attribute name
</dd>
944 <dd class=
"description">Specifier string or
<code>NULL
</code></dd>
946 <h4 class=
"returnvalue">Return Value
</h4>
947 <p class=
"description">Attribute or
<code>NULL
</code> if not found
</p>
948 <h3 class=
"function"><a name=
"ppdFindOption">ppdFindOption
</a></h3>
949 <p class=
"description">Return a pointer to the specified option.
</p>
951 <a href=
"#ppd_option_t">ppd_option_t
</a> *ppdFindOption (
<br>
952 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
953 const char *option
<br>
955 <h4 class=
"parameters">Parameters
</h4>
958 <dd class=
"description">PPD file data
</dd>
960 <dd class=
"description">Option/Keyword name
</dd>
962 <h4 class=
"returnvalue">Return Value
</h4>
963 <p class=
"description">Pointer to option or
<code>NULL
</code></p>
964 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdFirstCustomParam">ppdFirstCustomParam
</a></h3>
965 <p class=
"description">Return the first parameter for a custom option.
</p>
967 <a href=
"#ppd_cparam_t">ppd_cparam_t
</a> *ppdFirstCustomParam (
<br>
968 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *opt
<br>
970 <h4 class=
"parameters">Parameters
</h4>
973 <dd class=
"description">Custom option
</dd>
975 <h4 class=
"returnvalue">Return Value
</h4>
976 <p class=
"description">Custom parameter or NULL
</p>
977 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdFirstOption">ppdFirstOption
</a></h3>
978 <p class=
"description">Return the first option in the PPD file.
</p>
980 <a href=
"#ppd_option_t">ppd_option_t
</a> *ppdFirstOption (
<br>
981 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
983 <h4 class=
"parameters">Parameters
</h4>
986 <dd class=
"description">PPD file
</dd>
988 <h4 class=
"returnvalue">Return Value
</h4>
989 <p class=
"description">First option or
<code>NULL
</code></p>
990 <h4 class=
"discussion">Discussion
</h4>
991 <p class=
"discussion">Options are returned from all groups in ascending alphanumeric order.
994 <h3 class=
"function"><a name=
"ppdIsMarked">ppdIsMarked
</a></h3>
995 <p class=
"description">Check to see if an option is marked.
</p>
997 int ppdIsMarked (
<br>
998 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
999 const char *option,
<br>
1000 const char *choice
<br>
1002 <h4 class=
"parameters">Parameters
</h4>
1005 <dd class=
"description">PPD file data
</dd>
1007 <dd class=
"description">Option/Keyword name
</dd>
1009 <dd class=
"description">Choice name
</dd>
1011 <h4 class=
"returnvalue">Return Value
</h4>
1012 <p class=
"description">Non-zero if option is marked
</p>
1013 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppdLastError">ppdLastError
</a></h3>
1014 <p class=
"description">Return the status from the last ppdOpen*().
</p>
1016 ppd_status_t ppdLastError (
<br>
1017 int *line
<br>
1019 <h4 class=
"parameters">Parameters
</h4>
1022 <dd class=
"description">Line number
</dd>
1024 <h4 class=
"returnvalue">Return Value
</h4>
1025 <p class=
"description">Status code
</p>
1026 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdLocalize">ppdLocalize
</a></h3>
1027 <p class=
"description">Localize the PPD file to the current locale.
</p>
1029 int ppdLocalize (
<br>
1030 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
1032 <h4 class=
"parameters">Parameters
</h4>
1035 <dd class=
"description">PPD file
</dd>
1037 <h4 class=
"returnvalue">Return Value
</h4>
1038 <p class=
"description">0 on success, -
1 on error
</p>
1039 <h4 class=
"discussion">Discussion
</h4>
1040 <p class=
"discussion">All groups, options, and choices are localized, as are ICC profile
1041 descriptions, printer presets, and custom option parameters. Each
1042 localized string uses the UTF-
8 character encoding.
1045 <h3 class=
"function"><span class=
"info"> CUPS
1.3 </span><a name=
"ppdLocalizeIPPReason">ppdLocalizeIPPReason
</a></h3>
1046 <p class=
"description">Get the localized version of a cupsIPPReason
1049 const char *ppdLocalizeIPPReason (
<br>
1050 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1051 const char *reason,
<br>
1052 const char *scheme,
<br>
1053 char *buffer,
<br>
1054 size_t bufsize
<br>
1056 <h4 class=
"parameters">Parameters
</h4>
1059 <dd class=
"description">PPD file
</dd>
1061 <dd class=
"description">IPP reason keyword to look up
</dd>
1063 <dd class=
"description">URI scheme or NULL for text
</dd>
1065 <dd class=
"description">Value buffer
</dd>
1067 <dd class=
"description">Size of value buffer
</dd>
1069 <h4 class=
"returnvalue">Return Value
</h4>
1070 <p class=
"description">Value or NULL if not found
</p>
1071 <h4 class=
"discussion">Discussion
</h4>
1072 <p class=
"discussion">This function uses the current locale to find the corresponding reason
1073 text or URI from the attribute value. If
"scheme
" is NULL or
"text
",
1074 the returned value contains human-readable (UTF-
8) text from the translation
1075 string or attribute value. Otherwise the corresponding URI is returned.
<br>
1077 If no value of the requested scheme can be found, NULL is returned.
1080 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"ppdLocalizeMarkerName">ppdLocalizeMarkerName
</a></h3>
1081 <p class=
"description">Get the localized version of a marker-names
1082 attribute value.
</p>
1084 const char *ppdLocalizeMarkerName (
<br>
1085 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1086 const char *name
<br>
1088 <h4 class=
"parameters">Parameters
</h4>
1091 <dd class=
"description">PPD file
</dd>
1093 <dd class=
"description">Marker name to look up
</dd>
1095 <h4 class=
"returnvalue">Return Value
</h4>
1096 <p class=
"description">Value or
<code>NULL
</code> if not found
</p>
1097 <h4 class=
"discussion">Discussion
</h4>
1098 <p class=
"discussion">This function uses the current locale to find the corresponding name
1099 text from the attribute value. If no localized text for the requested
1100 name can be found,
<code>NULL
</code> is returned.
1103 <h3 class=
"function"><a name=
"ppdMarkDefaults">ppdMarkDefaults
</a></h3>
1104 <p class=
"description">Mark all default options in the PPD file.
</p>
1106 void ppdMarkDefaults (
<br>
1107 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
1109 <h4 class=
"parameters">Parameters
</h4>
1112 <dd class=
"description">PPD file record
</dd>
1114 <h3 class=
"function"><a name=
"ppdMarkOption">ppdMarkOption
</a></h3>
1115 <p class=
"description">Mark an option in a PPD file.
</p>
1117 int ppdMarkOption (
<br>
1118 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1119 const char *option,
<br>
1120 const char *choice
<br>
1122 <h4 class=
"parameters">Parameters
</h4>
1125 <dd class=
"description">PPD file record
</dd>
1127 <dd class=
"description">Keyword
</dd>
1129 <dd class=
"description">Option name
</dd>
1131 <h4 class=
"returnvalue">Return Value
</h4>
1132 <p class=
"description">Number of conflicts
</p>
1133 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdNextCustomParam">ppdNextCustomParam
</a></h3>
1134 <p class=
"description">Return the next parameter for a custom option.
</p>
1136 <a href=
"#ppd_cparam_t">ppd_cparam_t
</a> *ppdNextCustomParam (
<br>
1137 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *opt
<br>
1139 <h4 class=
"parameters">Parameters
</h4>
1142 <dd class=
"description">Custom option
</dd>
1144 <h4 class=
"returnvalue">Return Value
</h4>
1145 <p class=
"description">Custom parameter or NULL
</p>
1146 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdNextOption">ppdNextOption
</a></h3>
1147 <p class=
"description">Return the next option in the PPD file.
</p>
1149 <a href=
"#ppd_option_t">ppd_option_t
</a> *ppdNextOption (
<br>
1150 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
1152 <h4 class=
"parameters">Parameters
</h4>
1155 <dd class=
"description">PPD file
</dd>
1157 <h4 class=
"returnvalue">Return Value
</h4>
1158 <p class=
"description">Next option or
<code>NULL
</code></p>
1159 <h4 class=
"discussion">Discussion
</h4>
1160 <p class=
"discussion">Options are returned from all groups in ascending alphanumeric order.
1163 <h3 class=
"function"><a name=
"ppdOpen">ppdOpen
</a></h3>
1164 <p class=
"description">Read a PPD file into memory.
</p>
1166 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppdOpen (
<br>
1167 FILE *fp
<br>
1169 <h4 class=
"parameters">Parameters
</h4>
1172 <dd class=
"description">File to read from
</dd>
1174 <h4 class=
"returnvalue">Return Value
</h4>
1175 <p class=
"description">PPD file record
</p>
1176 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdOpen2">ppdOpen2
</a></h3>
1177 <p class=
"description">Read a PPD file into memory.
</p>
1179 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppdOpen2 (
<br>
1180 cups_file_t *fp
<br>
1182 <h4 class=
"parameters">Parameters
</h4>
1185 <dd class=
"description">File to read from
</dd>
1187 <h4 class=
"returnvalue">Return Value
</h4>
1188 <p class=
"description">PPD file record or
<code>NULL
</code> if the PPD file could not be opened.
</p>
1189 <h3 class=
"function"><a name=
"ppdOpenFd">ppdOpenFd
</a></h3>
1190 <p class=
"description">Read a PPD file into memory.
</p>
1192 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppdOpenFd (
<br>
1193 int fd
<br>
1195 <h4 class=
"parameters">Parameters
</h4>
1198 <dd class=
"description">File to read from
</dd>
1200 <h4 class=
"returnvalue">Return Value
</h4>
1201 <p class=
"description">PPD file record or
<code>NULL
</code> if the PPD file could not be opened.
</p>
1202 <h3 class=
"function"><a name=
"ppdOpenFile">ppdOpenFile
</a></h3>
1203 <p class=
"description">Read a PPD file into memory.
</p>
1205 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppdOpenFile (
<br>
1206 const char *filename
<br>
1208 <h4 class=
"parameters">Parameters
</h4>
1211 <dd class=
"description">File to read from
</dd>
1213 <h4 class=
"returnvalue">Return Value
</h4>
1214 <p class=
"description">PPD file record or
<code>NULL
</code> if the PPD file could not be opened.
</p>
1215 <h3 class=
"function"><a name=
"ppdPageLength">ppdPageLength
</a></h3>
1216 <p class=
"description">Get the page length for the given size.
</p>
1218 float ppdPageLength (
<br>
1219 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1220 const char *name
<br>
1222 <h4 class=
"parameters">Parameters
</h4>
1225 <dd class=
"description">PPD file
</dd>
1227 <dd class=
"description">Size name
</dd>
1229 <h4 class=
"returnvalue">Return Value
</h4>
1230 <p class=
"description">Length of page in points or
0.0</p>
1231 <h3 class=
"function"><a name=
"ppdPageSize">ppdPageSize
</a></h3>
1232 <p class=
"description">Get the page size record for the given size.
</p>
1234 <a href=
"#ppd_size_t">ppd_size_t
</a> *ppdPageSize (
<br>
1235 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1236 const char *name
<br>
1238 <h4 class=
"parameters">Parameters
</h4>
1241 <dd class=
"description">PPD file record
</dd>
1243 <dd class=
"description">Size name
</dd>
1245 <h4 class=
"returnvalue">Return Value
</h4>
1246 <p class=
"description">Size record for page or NULL
</p>
1247 <h3 class=
"function"><a name=
"ppdPageWidth">ppdPageWidth
</a></h3>
1248 <p class=
"description">Get the page width for the given size.
</p>
1250 float ppdPageWidth (
<br>
1251 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1252 const char *name
<br>
1254 <h4 class=
"parameters">Parameters
</h4>
1257 <dd class=
"description">PPD file record
</dd>
1259 <dd class=
"description">Size name
</dd>
1261 <h4 class=
"returnvalue">Return Value
</h4>
1262 <p class=
"description">Width of page in points or
0.0</p>
1263 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20 </span><a name=
"ppdSetConformance">ppdSetConformance
</a></h3>
1264 <p class=
"description">Set the conformance level for PPD files.
</p>
1266 void ppdSetConformance (
<br>
1267 <a href=
"#ppd_conform_t">ppd_conform_t
</a> c
<br>
1269 <h4 class=
"parameters">Parameters
</h4>
1272 <dd class=
"description">Conformance level
</dd>
1274 <h2 class=
"title"><a name=
"TYPES">Data Types
</a></h2>
1275 <h3 class=
"typedef"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppd_attr_t">ppd_attr_t
</a></h3>
1276 <p class=
"description">PPD Attribute Structure
</p>
1278 typedef struct
<a href=
"#ppd_attr_s">ppd_attr_s
</a> ppd_attr_t;
1280 <h3 class=
"typedef"><a name=
"ppd_choice_t">ppd_choice_t
</a></h3>
1281 <p class=
"description">Option choices
</p>
1283 typedef struct
<a href=
"#ppd_choice_s">ppd_choice_s
</a> ppd_choice_t;
1285 <h3 class=
"typedef"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppd_conform_t">ppd_conform_t
</a></h3>
1286 <p class=
"description">Conformance Levels
</p>
1288 typedef enum
<a href=
"#ppd_conform_e">ppd_conform_e
</a> ppd_conform_t;
1290 <h3 class=
"typedef"><a name=
"ppd_const_t">ppd_const_t
</a></h3>
1291 <p class=
"description">Constraints
</p>
1293 typedef struct
<a href=
"#ppd_const_s">ppd_const_s
</a> ppd_const_t;
1295 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_coption_t">ppd_coption_t
</a></h3>
1296 <p class=
"description">Custom Option
</p>
1298 typedef struct
<a href=
"#ppd_coption_s">ppd_coption_s
</a> ppd_coption_t;
1300 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cparam_t">ppd_cparam_t
</a></h3>
1301 <p class=
"description">Custom Parameter
</p>
1303 typedef struct
<a href=
"#ppd_cparam_s">ppd_cparam_s
</a> ppd_cparam_t;
1305 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cplimit_t">ppd_cplimit_t
</a></h3>
1306 <p class=
"description">Custom Parameter Limit
</p>
1308 typedef union
<a href=
"#ppd_cplimit_u">ppd_cplimit_u
</a> ppd_cplimit_t;
1310 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cptype_t">ppd_cptype_t
</a></h3>
1311 <p class=
"description">Custom Parameter Type
</p>
1313 typedef enum
<a href=
"#ppd_cptype_e">ppd_cptype_e
</a> ppd_cptype_t;
1315 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cpvalue_t">ppd_cpvalue_t
</a></h3>
1316 <p class=
"description">Custom Parameter Value
</p>
1318 typedef union
<a href=
"#ppd_cpvalue_u">ppd_cpvalue_u
</a> ppd_cpvalue_t;
1320 <h3 class=
"typedef"><a name=
"ppd_emul_t">ppd_emul_t
</a></h3>
1321 <p class=
"description">Emulators
</p>
1323 typedef struct
<a href=
"#ppd_emul_s">ppd_emul_s
</a> ppd_emul_t;
1325 <h3 class=
"typedef"><a name=
"ppd_file_t">ppd_file_t
</a></h3>
1326 <p class=
"description">PPD File
</p>
1328 typedef struct
<a href=
"#ppd_file_s">ppd_file_s
</a> ppd_file_t;
1330 <h3 class=
"typedef"><a name=
"ppd_group_t">ppd_group_t
</a></h3>
1331 <p class=
"description">Groups
</p>
1333 typedef struct
<a href=
"#ppd_group_s">ppd_group_s
</a> ppd_group_t;
1335 <h3 class=
"typedef"><a name=
"ppd_option_t">ppd_option_t
</a></h3>
1336 <p class=
"description">Options
</p>
1338 typedef struct
<a href=
"#ppd_option_s">ppd_option_s
</a> ppd_option_t;
1340 <h3 class=
"typedef"><a name=
"ppd_profile_t">ppd_profile_t
</a></h3>
1341 <p class=
"description">sRGB Color Profiles
</p>
1343 typedef struct
<a href=
"#ppd_profile_s">ppd_profile_s
</a> ppd_profile_t;
1345 <h3 class=
"typedef"><a name=
"ppd_section_t">ppd_section_t
</a></h3>
1346 <p class=
"description">Order dependency sections
</p>
1348 typedef enum
<a href=
"#ppd_section_e">ppd_section_e
</a> ppd_section_t;
1350 <h3 class=
"typedef"><a name=
"ppd_size_t">ppd_size_t
</a></h3>
1351 <p class=
"description">Page Sizes
</p>
1353 typedef struct
<a href=
"#ppd_size_s">ppd_size_s
</a> ppd_size_t;
1355 <h3 class=
"typedef"><a name=
"ppd_ui_t">ppd_ui_t
</a></h3>
1356 <p class=
"description">UI Types
</p>
1358 typedef enum
<a href=
"#ppd_ui_e">ppd_ui_e
</a> ppd_ui_t;
1360 <h2 class=
"title"><a name=
"STRUCTURES">Structures
</a></h2>
1361 <h3 class=
"struct"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppd_attr_s">ppd_attr_s
</a></h3>
1362 <p class=
"description">PPD Attribute Structure
</p>
1363 <p class=
"code">struct ppd_attr_s {
<br>
1364 char name[PPD_MAX_NAME];
<br>
1365 char spec[PPD_MAX_NAME];
<br>
1366 char text[PPD_MAX_TEXT];
<br>
1367 char *value;
<br>
1369 <h4 class=
"members">Members
</h4>
1371 <dt>name[PPD_MAX_NAME]
</dt>
1372 <dd class=
"description">Name of attribute (cupsXYZ)
</dd>
1373 <dt>spec[PPD_MAX_NAME]
</dt>
1374 <dd class=
"description">Specifier string, if any
</dd>
1375 <dt>text[PPD_MAX_TEXT]
</dt>
1376 <dd class=
"description">Human-readable text, if any
</dd>
1378 <dd class=
"description">Value string
</dd>
1380 <h3 class=
"struct"><a name=
"ppd_choice_s">ppd_choice_s
</a></h3>
1381 <p class=
"description">Option choices
</p>
1382 <p class=
"code">struct ppd_choice_s {
<br>
1383 char choice[PPD_MAX_NAME];
<br>
1384 char *code;
<br>
1385 char marked;
<br>
1386 <a href=
"#ppd_option_t">ppd_option_t
</a> *option;
<br>
1387 char text[PPD_MAX_TEXT];
<br>
1389 <h4 class=
"members">Members
</h4>
1391 <dt>choice[PPD_MAX_NAME]
</dt>
1392 <dd class=
"description">Computer-readable option name
</dd>
1394 <dd class=
"description">Code to send for this option
</dd>
1396 <dd class=
"description">0 if not selected,
1 otherwise
</dd>
1398 <dd class=
"description">Pointer to parent option structure
</dd>
1399 <dt>text[PPD_MAX_TEXT]
</dt>
1400 <dd class=
"description">Human-readable option name
</dd>
1402 <h3 class=
"struct"><a name=
"ppd_const_s">ppd_const_s
</a></h3>
1403 <p class=
"description">Constraints
</p>
1404 <p class=
"code">struct ppd_const_s {
<br>
1405 char choice1[PPD_MAX_NAME];
<br>
1406 char choice2[PPD_MAX_NAME];
<br>
1407 char option1[PPD_MAX_NAME];
<br>
1408 char option2[PPD_MAX_NAME];
<br>
1410 <h4 class=
"members">Members
</h4>
1412 <dt>choice1[PPD_MAX_NAME]
</dt>
1413 <dd class=
"description">First option/choice (blank for all)
</dd>
1414 <dt>choice2[PPD_MAX_NAME]
</dt>
1415 <dd class=
"description">Second option/choice (blank for all)
</dd>
1416 <dt>option1[PPD_MAX_NAME]
</dt>
1417 <dd class=
"description">First keyword
</dd>
1418 <dt>option2[PPD_MAX_NAME]
</dt>
1419 <dd class=
"description">Second keyword
</dd>
1421 <h3 class=
"struct"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_coption_s">ppd_coption_s
</a></h3>
1422 <p class=
"description">Custom Option
</p>
1423 <p class=
"code">struct ppd_coption_s {
<br>
1424 char keyword[PPD_MAX_NAME];
<br>
1425 int marked;
<br>
1426 <a href=
"#ppd_option_t">ppd_option_t
</a> *option;
<br>
1427 cups_array_t *params;
<br>
1429 <h4 class=
"members">Members
</h4>
1431 <dt>keyword[PPD_MAX_NAME]
</dt>
1432 <dd class=
"description">Name of option that is being extended...
</dd>
1434 <dd class=
"description">Extended option is marked
</dd>
1436 <dd class=
"description">Option that is being extended...
</dd>
1438 <dd class=
"description">Parameters
</dd>
1440 <h3 class=
"struct"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cparam_s">ppd_cparam_s
</a></h3>
1441 <p class=
"description">Custom Parameter
</p>
1442 <p class=
"code">struct ppd_cparam_s {
<br>
1443 <a href=
"#ppd_cpvalue_t">ppd_cpvalue_t
</a> current;
<br>
1444 <a href=
"#ppd_cplimit_t">ppd_cplimit_t
</a> minimum, maximum;
<br>
1445 char name[PPD_MAX_NAME];
<br>
1446 int order;
<br>
1447 char text[PPD_MAX_TEXT];
<br>
1448 <a href=
"#ppd_cptype_t">ppd_cptype_t
</a> type;
<br>
1450 <h4 class=
"members">Members
</h4>
1453 <dd class=
"description">Current value
</dd>
1455 <dd class=
"description">Maximum value
</dd>
1456 <dt>name[PPD_MAX_NAME]
</dt>
1457 <dd class=
"description">Parameter name
</dd>
1459 <dd class=
"description">Order (
0 to N)
</dd>
1460 <dt>text[PPD_MAX_TEXT]
</dt>
1461 <dd class=
"description">Human-readable text
</dd>
1463 <dd class=
"description">Parameter type
</dd>
1465 <h3 class=
"struct"><a name=
"ppd_emul_s">ppd_emul_s
</a></h3>
1466 <p class=
"description">Emulators
</p>
1467 <p class=
"code">struct ppd_emul_s {
<br>
1468 char name[PPD_MAX_NAME];
<br>
1469 char *start;
<br>
1470 char *stop;
<br>
1472 <h4 class=
"members">Members
</h4>
1474 <dt>name[PPD_MAX_NAME]
</dt>
1475 <dd class=
"description">Emulator name
</dd>
1477 <dd class=
"description">Code to switch to this emulation
</dd>
1479 <dd class=
"description">Code to stop this emulation
</dd>
1481 <h3 class=
"struct"><a name=
"ppd_file_s">ppd_file_s
</a></h3>
1482 <p class=
"description">PPD File
</p>
1483 <p class=
"code">struct ppd_file_s {
<br>
1484 int accurate_screens;
<br>
1485 int color_device;
<br>
1486 ppd_cs_t colorspace;
<br>
1487 <a href=
"#ppd_const_t">ppd_const_t
</a> *consts;
<br>
1488 int contone_only;
<br>
1489 float custom_margins[
4];
<br>
1490 float custom_max[
2];
<br>
1491 float custom_min[
2];
<br>
1492 <a href=
"#ppd_emul_t">ppd_emul_t
</a> *emulations;
<br>
1493 char **filters;
<br>
1494 int flip_duplex;
<br>
1495 char **fonts;
<br>
1496 <a href=
"#ppd_group_t">ppd_group_t
</a> *groups;
<br>
1497 char *jcl_begin;
<br>
1498 char *jcl_end;
<br>
1499 char *jcl_ps;
<br>
1500 int landscape;
<br>
1501 char *lang_encoding;
<br>
1502 char *lang_version;
<br>
1503 int language_level;
<br>
1504 int manual_copies;
<br>
1505 char *manufacturer;
<br>
1506 int model_number;
<br>
1507 char *modelname;
<br>
1508 char *nickname;
<br>
1509 int num_consts;
<br>
1510 int num_emulations;
<br>
1511 int num_filters;
<br>
1512 int num_fonts;
<br>
1513 int num_groups;
<br>
1514 int num_profiles;
<br>
1515 int num_sizes;
<br>
1516 char *patches;
<br>
1517 char *pcfilename;
<br>
1518 char *product;
<br>
1519 <a href=
"#ppd_profile_t">ppd_profile_t
</a> *profiles;
<br>
1520 char *protocols;
<br>
1521 char *shortnickname;
<br>
1522 <a href=
"#ppd_size_t">ppd_size_t
</a> *sizes;
<br>
1523 int throughput;
<br>
1524 char *ttrasterizer;
<br>
1525 int variable_sizes;
<br>
1527 <h4 class=
"members">Members
</h4>
1529 <dt>accurate_screens
</dt>
1530 <dd class=
"description">1 = supports accurate screens,
0 = not
</dd>
1531 <dt>color_device
</dt>
1532 <dd class=
"description">1 = color device,
0 = grayscale
</dd>
1533 <dt>colorspace
</dt>
1534 <dd class=
"description">Default colorspace
</dd>
1536 <dd class=
"description">UI/Non-UI constraints
</dd>
1537 <dt>contone_only
</dt>
1538 <dd class=
"description">1 = continuous tone only,
0 = not
</dd>
1539 <dt>custom_margins[
4]
</dt>
1540 <dd class=
"description">Margins around page
</dd>
1541 <dt>custom_max[
2]
</dt>
1542 <dd class=
"description">Maximum variable page size
</dd>
1543 <dt>custom_min[
2]
</dt>
1544 <dd class=
"description">Minimum variable page size
</dd>
1545 <dt>emulations
</dt>
1546 <dd class=
"description">Emulations and the code to invoke them
</dd>
1548 <dd class=
"description">Filter strings...
</dd>
1549 <dt>flip_duplex
<span class=
"info"> DEPRECATED
</span></dt>
1550 <dd class=
"description">1 = Flip page for back sides
</dd>
1552 <dd class=
"description">Pre-loaded fonts
</dd>
1554 <dd class=
"description">UI groups
</dd>
1556 <dd class=
"description">Start JCL commands
</dd>
1558 <dd class=
"description">End JCL commands
</dd>
1560 <dd class=
"description">Enter PostScript interpreter
</dd>
1562 <dd class=
"description">-
90 or
90</dd>
1563 <dt>lang_encoding
</dt>
1564 <dd class=
"description">Language encoding
</dd>
1565 <dt>lang_version
</dt>
1566 <dd class=
"description">Language version (English, Spanish, etc.)
</dd>
1567 <dt>language_level
</dt>
1568 <dd class=
"description">Language level of device
</dd>
1569 <dt>manual_copies
</dt>
1570 <dd class=
"description">1 = Copies done manually,
0 = hardware
</dd>
1571 <dt>manufacturer
</dt>
1572 <dd class=
"description">Manufacturer name
</dd>
1573 <dt>model_number
</dt>
1574 <dd class=
"description">Device-specific model number
</dd>
1576 <dd class=
"description">Model name (general)
</dd>
1578 <dd class=
"description">Nickname (specific)
</dd>
1579 <dt>num_consts
</dt>
1580 <dd class=
"description">Number of UI/Non-UI constraints
</dd>
1581 <dt>num_emulations
</dt>
1582 <dd class=
"description">Number of emulations supported
</dd>
1583 <dt>num_filters
</dt>
1584 <dd class=
"description">Number of filters
</dd>
1586 <dd class=
"description">Number of pre-loaded fonts
</dd>
1587 <dt>num_groups
</dt>
1588 <dd class=
"description">Number of UI groups
</dd>
1589 <dt>num_profiles
</dt>
1590 <dd class=
"description">Number of sRGB color profiles
</dd>
1592 <dd class=
"description">Number of page sizes
</dd>
1594 <dd class=
"description">Patch commands to be sent to printer
</dd>
1595 <dt>pcfilename
<span class=
"info"> CUPS
1.1.19 </span></dt>
1596 <dd class=
"description">PCFileName string
</dd>
1598 <dd class=
"description">Product name (from PS RIP/interpreter)
</dd>
1600 <dd class=
"description">sRGB color profiles
</dd>
1601 <dt>protocols
<span class=
"info"> CUPS
1.1.19 </span></dt>
1602 <dd class=
"description">Protocols (BCP, TBCP) string
</dd>
1603 <dt>shortnickname
</dt>
1604 <dd class=
"description">Short version of nickname
</dd>
1606 <dd class=
"description">Page sizes
</dd>
1607 <dt>throughput
</dt>
1608 <dd class=
"description">Pages per minute
</dd>
1609 <dt>ttrasterizer
</dt>
1610 <dd class=
"description">Truetype rasterizer
</dd>
1611 <dt>variable_sizes
</dt>
1612 <dd class=
"description">1 = supports variable sizes,
0 = doesn't
</dd>
1614 <h3 class=
"struct"><a name=
"ppd_group_s">ppd_group_s
</a></h3>
1615 <p class=
"description">Groups
</p>
1616 <p class=
"code">struct ppd_group_s {
<br>
1617 char text[PPD_MAX_TEXT - PPD_MAX_NAME];
<br>
1618 char name[PPD_MAX_NAME];
<br>
1619 int num_options;
<br>
1620 int num_subgroups;
<br>
1621 <a href=
"#ppd_option_t">ppd_option_t
</a> *options;
<br>
1622 struct
<a href=
"#ppd_group_s">ppd_group_s
</a> *subgroups;
<br>
1624 <h4 class=
"members">Members
</h4>
1626 <dt>PPD_MAX_NAME]
</dt>
1627 <dd class=
"description">Human-readable group name
</dd>
1628 <dt>name[PPD_MAX_NAME]
<span class=
"info"> CUPS
1.1.18 </span></dt>
1629 <dd class=
"description">Group name
</dd>
1630 <dt>num_options
</dt>
1631 <dd class=
"description">Number of options
</dd>
1632 <dt>num_subgroups
</dt>
1633 <dd class=
"description">Number of sub-groups
</dd>
1635 <dd class=
"description">Options
</dd>
1637 <dd class=
"description">Sub-groups (max depth =
1)
</dd>
1639 <h3 class=
"struct"><a name=
"ppd_option_s">ppd_option_s
</a></h3>
1640 <p class=
"description">Options
</p>
1641 <p class=
"code">struct ppd_option_s {
<br>
1642 <a href=
"#ppd_choice_t">ppd_choice_t
</a> *choices;
<br>
1643 char conflicted;
<br>
1644 char defchoice[PPD_MAX_NAME];
<br>
1645 char keyword[PPD_MAX_NAME];
<br>
1646 int num_choices;
<br>
1647 float order;
<br>
1648 <a href=
"#ppd_section_t">ppd_section_t
</a> section;
<br>
1649 char text[PPD_MAX_TEXT];
<br>
1650 <a href=
"#ppd_ui_t">ppd_ui_t
</a> ui;
<br>
1652 <h4 class=
"members">Members
</h4>
1655 <dd class=
"description">Option choices
</dd>
1656 <dt>conflicted
</dt>
1657 <dd class=
"description">0 if no conflicts exist,
1 otherwise
</dd>
1658 <dt>defchoice[PPD_MAX_NAME]
</dt>
1659 <dd class=
"description">Default option choice
</dd>
1660 <dt>keyword[PPD_MAX_NAME]
</dt>
1661 <dd class=
"description">Option keyword name (
"PageSize
", etc.)
</dd>
1662 <dt>num_choices
</dt>
1663 <dd class=
"description">Number of option choices
</dd>
1665 <dd class=
"description">Order number
</dd>
1667 <dd class=
"description">Section for command
</dd>
1668 <dt>text[PPD_MAX_TEXT]
</dt>
1669 <dd class=
"description">Human-readable text
</dd>
1671 <dd class=
"description">Type of UI option
</dd>
1673 <h3 class=
"struct"><a name=
"ppd_profile_s">ppd_profile_s
</a></h3>
1674 <p class=
"description">sRGB Color Profiles
</p>
1675 <p class=
"code">struct ppd_profile_s {
<br>
1676 float density;
<br>
1677 float gamma;
<br>
1678 float matrix[
3][
3];
<br>
1679 char media_type[PPD_MAX_NAME];
<br>
1680 char resolution[PPD_MAX_NAME];
<br>
1682 <h4 class=
"members">Members
</h4>
1685 <dd class=
"description">Ink density to use
</dd>
1687 <dd class=
"description">Gamma correction to use
</dd>
1688 <dt>matrix[
3][
3]
</dt>
1689 <dd class=
"description">Transform matrix
</dd>
1690 <dt>media_type[PPD_MAX_NAME]
</dt>
1691 <dd class=
"description">Media type or
"-
"</dd>
1692 <dt>resolution[PPD_MAX_NAME]
</dt>
1693 <dd class=
"description">Resolution or
"-
"</dd>
1695 <h3 class=
"struct"><a name=
"ppd_size_s">ppd_size_s
</a></h3>
1696 <p class=
"description">Page Sizes
</p>
1697 <p class=
"code">struct ppd_size_s {
<br>
1698 float bottom;
<br>
1699 float left;
<br>
1700 float length;
<br>
1701 int marked;
<br>
1702 char name[PPD_MAX_NAME];
<br>
1703 float right;
<br>
1704 float top;
<br>
1705 float width;
<br>
1707 <h4 class=
"members">Members
</h4>
1710 <dd class=
"description">Bottom printable margin in points
</dd>
1712 <dd class=
"description">Left printable margin in points
</dd>
1714 <dd class=
"description">Length of media in points
</dd>
1716 <dd class=
"description">Page size selected?
</dd>
1717 <dt>name[PPD_MAX_NAME]
</dt>
1718 <dd class=
"description">Media size option
</dd>
1720 <dd class=
"description">Right printable margin in points
</dd>
1722 <dd class=
"description">Top printable margin in points
</dd>
1724 <dd class=
"description">Width of media in points
</dd>
1726 <h2 class=
"title"><a name=
"UNIONS">Unions
</a></h2>
1727 <h3 class=
"union"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cplimit_u">ppd_cplimit_u
</a></h3>
1728 <p class=
"description">Custom Parameter Limit
</p>
1729 <p class=
"code">union ppd_cplimit_u {
<br>
1730 float custom_curve;
<br>
1731 int custom_int;
<br>
1732 float custom_invcurve;
<br>
1733 int custom_passcode;
<br>
1734 int custom_password;
<br>
1735 float custom_points;
<br>
1736 float custom_real;
<br>
1737 int custom_string;
<br>
1739 <h4 class=
"members">Members
</h4>
1741 <dt>custom_curve
</dt>
1742 <dd class=
"description">Gamma value
</dd>
1743 <dt>custom_int
</dt>
1744 <dd class=
"description">Integer value
</dd>
1745 <dt>custom_invcurve
</dt>
1746 <dd class=
"description">Gamma value
</dd>
1747 <dt>custom_passcode
</dt>
1748 <dd class=
"description">Passcode length
</dd>
1749 <dt>custom_password
</dt>
1750 <dd class=
"description">Password length
</dd>
1751 <dt>custom_points
</dt>
1752 <dd class=
"description">Measurement value
</dd>
1753 <dt>custom_real
</dt>
1754 <dd class=
"description">Real value
</dd>
1755 <dt>custom_string
</dt>
1756 <dd class=
"description">String length
</dd>
1758 <h3 class=
"union"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cpvalue_u">ppd_cpvalue_u
</a></h3>
1759 <p class=
"description">Custom Parameter Value
</p>
1760 <p class=
"code">union ppd_cpvalue_u {
<br>
1761 float custom_curve;
<br>
1762 int custom_int;
<br>
1763 float custom_invcurve;
<br>
1764 char *custom_passcode;
<br>
1765 char *custom_password;
<br>
1766 float custom_points;
<br>
1767 float custom_real;
<br>
1768 char *custom_string;
<br>
1770 <h4 class=
"members">Members
</h4>
1772 <dt>custom_curve
</dt>
1773 <dd class=
"description">Gamma value
</dd>
1774 <dt>custom_int
</dt>
1775 <dd class=
"description">Integer value
</dd>
1776 <dt>custom_invcurve
</dt>
1777 <dd class=
"description">Gamma value
</dd>
1778 <dt>custom_passcode
</dt>
1779 <dd class=
"description">Passcode value
</dd>
1780 <dt>custom_password
</dt>
1781 <dd class=
"description">Password value
</dd>
1782 <dt>custom_points
</dt>
1783 <dd class=
"description">Measurement value
</dd>
1784 <dt>custom_real
</dt>
1785 <dd class=
"description">Real value
</dd>
1786 <dt>custom_string
</dt>
1787 <dd class=
"description">String value
</dd>
1789 <h2 class=
"title"><a name=
"ENUMERATIONS">Constants
</a></h2>
1790 <h3 class=
"enumeration"><a name=
"ppd_conform_e">ppd_conform_e
</a></h3>
1791 <p class=
"description"></p>
1792 <h4 class=
"constants">Constants
</h4>
1794 <dt>PPD_CONFORM_RELAXED
</dt>
1795 <dd class=
"description">Relax whitespace and control char
</dd>
1796 <dt>PPD_CONFORM_STRICT
</dt>
1797 <dd class=
"description">Require strict conformance
</dd>
1799 <h3 class=
"enumeration"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cptype_e">ppd_cptype_e
</a></h3>
1800 <p class=
"description">Custom Parameter Type
</p>
1801 <h4 class=
"constants">Constants
</h4>
1803 <dt>PPD_CUSTOM_CURVE
</dt>
1804 <dd class=
"description">Curve value for f(x) = x^value
</dd>
1805 <dt>PPD_CUSTOM_INT
</dt>
1806 <dd class=
"description">Integer number value
</dd>
1807 <dt>PPD_CUSTOM_INVCURVE
</dt>
1808 <dd class=
"description">Curve value for f(x) = x^(
1/value)
</dd>
1809 <dt>PPD_CUSTOM_PASSCODE
</dt>
1810 <dd class=
"description">String of (hidden) numbers
</dd>
1811 <dt>PPD_CUSTOM_PASSWORD
</dt>
1812 <dd class=
"description">String of (hidden) characters
</dd>
1813 <dt>PPD_CUSTOM_POINTS
</dt>
1814 <dd class=
"description">Measurement value in points
</dd>
1815 <dt>PPD_CUSTOM_REAL
</dt>
1816 <dd class=
"description">Real number value
</dd>
1817 <dt>PPD_CUSTOM_STRING
</dt>
1818 <dd class=
"description">String of characters
</dd>
1820 <h3 class=
"enumeration"><a name=
"ppd_cs_e">ppd_cs_e
</a></h3>
1821 <p class=
"description">Colorspaces
</p>
1822 <h4 class=
"constants">Constants
</h4>
1824 <dt>PPD_CS_CMY
</dt>
1825 <dd class=
"description">CMY colorspace
</dd>
1826 <dt>PPD_CS_CMYK
</dt>
1827 <dd class=
"description">CMYK colorspace
</dd>
1828 <dt>PPD_CS_GRAY
</dt>
1829 <dd class=
"description">Grayscale colorspace
</dd>
1831 <dd class=
"description">DeviceN colorspace
</dd>
1832 <dt>PPD_CS_RGB
</dt>
1833 <dd class=
"description">RGB colorspace
</dd>
1834 <dt>PPD_CS_RGBK
</dt>
1835 <dd class=
"description">RGBK (K = gray) colorspace
</dd>
1837 <h3 class=
"enumeration"><a name=
"ppd_section_e">ppd_section_e
</a></h3>
1838 <p class=
"description">Order dependency sections
</p>
1839 <h4 class=
"constants">Constants
</h4>
1841 <dt>PPD_ORDER_ANY
</dt>
1842 <dd class=
"description">Option code can be anywhere in the file
</dd>
1843 <dt>PPD_ORDER_DOCUMENT
</dt>
1844 <dd class=
"description">... must be in the DocumentSetup section
</dd>
1845 <dt>PPD_ORDER_EXIT
</dt>
1846 <dd class=
"description">... must be sent prior to the document
</dd>
1847 <dt>PPD_ORDER_JCL
</dt>
1848 <dd class=
"description">... must be sent as a JCL command
</dd>
1849 <dt>PPD_ORDER_PAGE
</dt>
1850 <dd class=
"description">... must be in the PageSetup section
</dd>
1851 <dt>PPD_ORDER_PROLOG
</dt>
1852 <dd class=
"description">... must be in the Prolog section
</dd>
1854 <h3 class=
"enumeration"><a name=
"ppd_status_e">ppd_status_e
</a></h3>
1855 <p class=
"description">Types and structures...
</p>
1856 <h4 class=
"constants">Constants
</h4>
1858 <dt>PPD_ALLOC_ERROR
</dt>
1859 <dd class=
"description">Memory allocation error
</dd>
1860 <dt>PPD_BAD_CUSTOM_PARAM
</dt>
1861 <dd class=
"description">Bad custom parameter
</dd>
1862 <dt>PPD_BAD_OPEN_GROUP
</dt>
1863 <dd class=
"description">Bad OpenGroup
</dd>
1864 <dt>PPD_BAD_OPEN_UI
</dt>
1865 <dd class=
"description">Bad OpenUI/JCLOpenUI
</dd>
1866 <dt>PPD_BAD_ORDER_DEPENDENCY
</dt>
1867 <dd class=
"description">Bad OrderDependency
</dd>
1868 <dt>PPD_BAD_UI_CONSTRAINTS
</dt>
1869 <dd class=
"description">Bad UIConstraints
</dd>
1870 <dt>PPD_FILE_OPEN_ERROR
</dt>
1871 <dd class=
"description">Unable to open PPD file
</dd>
1872 <dt>PPD_ILLEGAL_CHARACTER
</dt>
1873 <dd class=
"description">Illegal control character
</dd>
1874 <dt>PPD_ILLEGAL_MAIN_KEYWORD
</dt>
1875 <dd class=
"description">Illegal main keyword string
</dd>
1876 <dt>PPD_ILLEGAL_OPTION_KEYWORD
</dt>
1877 <dd class=
"description">Illegal option keyword string
</dd>
1878 <dt>PPD_ILLEGAL_TRANSLATION
</dt>
1879 <dd class=
"description">Illegal translation string
</dd>
1880 <dt>PPD_ILLEGAL_WHITESPACE
</dt>
1881 <dd class=
"description">Illegal whitespace character
</dd>
1882 <dt>PPD_INTERNAL_ERROR
</dt>
1883 <dd class=
"description">Internal error
</dd>
1884 <dt>PPD_LINE_TOO_LONG
</dt>
1885 <dd class=
"description">Line longer than
255 chars
</dd>
1886 <dt>PPD_MISSING_ASTERISK
</dt>
1887 <dd class=
"description">Missing asterisk in column
0</dd>
1888 <dt>PPD_MISSING_PPDADOBE4
</dt>
1889 <dd class=
"description">Missing PPD-Adobe-
4.x header
</dd>
1890 <dt>PPD_MISSING_VALUE
</dt>
1891 <dd class=
"description">Missing value string
</dd>
1892 <dt>PPD_NESTED_OPEN_GROUP
</dt>
1893 <dd class=
"description">OpenGroup without a CloseGroup first
</dd>
1894 <dt>PPD_NESTED_OPEN_UI
</dt>
1895 <dd class=
"description">OpenUI/JCLOpenUI without a CloseUI/JCLCloseUI first
</dd>
1896 <dt>PPD_NULL_FILE
</dt>
1897 <dd class=
"description">NULL PPD file pointer
</dd>
1899 <dd class=
"description">OK
</dd>
1901 <h3 class=
"enumeration"><a name=
"ppd_ui_e">ppd_ui_e
</a></h3>
1902 <p class=
"description">UI Types
</p>
1903 <h4 class=
"constants">Constants
</h4>
1905 <dt>PPD_UI_BOOLEAN
</dt>
1906 <dd class=
"description">True or False option
</dd>
1907 <dt>PPD_UI_PICKMANY
</dt>
1908 <dd class=
"description">Pick zero or more from a list
</dd>
1909 <dt>PPD_UI_PICKONE
</dt>
1910 <dd class=
"description">Pick one from a list
</dd>