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 Reference:
<a href='spec-ppd.html' target='_top'
>CUPS PPD Specification
</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_emul_t" title=
"Emulators">ppd_emul_t
</a></li>
357 <li><a href=
"#ppd_file_t" title=
"PPD File">ppd_file_t
</a></li>
358 <li><a href=
"#ppd_group_t" title=
"Groups">ppd_group_t
</a></li>
359 <li><a href=
"#ppd_option_t" title=
"Options">ppd_option_t
</a></li>
360 <li><a href=
"#ppd_profile_t" title=
"sRGB Color Profiles">ppd_profile_t
</a></li>
361 <li><a href=
"#ppd_section_t" title=
"Order dependency sections">ppd_section_t
</a></li>
362 <li><a href=
"#ppd_size_t" title=
"Page Sizes">ppd_size_t
</a></li>
363 <li><a href=
"#ppd_ui_t" title=
"UI Types">ppd_ui_t
</a></li>
365 <li><a href=
"#STRUCTURES">Structures
</a><ul class=
"code">
366 <li><a href=
"#ppd_attr_s" title=
"PPD Attribute Structure ">ppd_attr_s
</a></li>
367 <li><a href=
"#ppd_choice_s" title=
"Option choices">ppd_choice_s
</a></li>
368 <li><a href=
"#ppd_const_s" title=
"Constraints">ppd_const_s
</a></li>
369 <li><a href=
"#ppd_coption_s" title=
"Custom Option ">ppd_coption_s
</a></li>
370 <li><a href=
"#ppd_cparam_s" title=
"Custom Parameter ">ppd_cparam_s
</a></li>
371 <li><a href=
"#ppd_emul_s" title=
"Emulators">ppd_emul_s
</a></li>
372 <li><a href=
"#ppd_file_s" title=
"PPD File">ppd_file_s
</a></li>
373 <li><a href=
"#ppd_group_s" title=
"Groups">ppd_group_s
</a></li>
374 <li><a href=
"#ppd_option_s" title=
"Options">ppd_option_s
</a></li>
375 <li><a href=
"#ppd_profile_s" title=
"sRGB Color Profiles">ppd_profile_s
</a></li>
376 <li><a href=
"#ppd_size_s" title=
"Page Sizes">ppd_size_s
</a></li>
378 <li><a href=
"#UNIONS">Unions
</a><ul class=
"code">
379 <li><a href=
"#ppd_cplimit_u" title=
"Custom Parameter Limit ">ppd_cplimit_u
</a></li>
380 <li><a href=
"#ppd_cpvalue_u" title=
"Custom Parameter Value ">ppd_cpvalue_u
</a></li>
382 <li><a href=
"#ENUMERATIONS">Constants
</a><ul class=
"code">
383 <li><a href=
"#ppd_conform_e" title=
"">ppd_conform_e
</a></li>
384 <li><a href=
"#ppd_cptype_e" title=
"Custom Parameter Type ">ppd_cptype_e
</a></li>
385 <li><a href=
"#ppd_cs_e" title=
"Colorspaces">ppd_cs_e
</a></li>
386 <li><a href=
"#ppd_section_e" title=
"Order dependency sections">ppd_section_e
</a></li>
387 <li><a href=
"#ppd_status_e" title=
"Types and structures...">ppd_status_e
</a></li>
388 <li><a href=
"#ppd_ui_e" title=
"UI Types">ppd_ui_e
</a></li>
392 "$Id: api-ppd.shtml 7278 2008-01-31 01:23:09Z mike $"
394 PPD API introduction for the Common UNIX Printing System (CUPS).
396 Copyright 2007 by Apple Inc.
397 Copyright 1997-2006 by Easy Software Products, all rights reserved.
399 These coded instructions, statements, and computer programs are the
400 property of Apple Inc. and are protected by Federal copyright
401 law. Distribution and use rights are outlined in the file "LICENSE.txt"
402 which should have been included with this file. If this file is
403 file is missing or damaged, see the license at "http://www.cups.org/".
406 <h2 class='title'
><a name='OVERVIEW'
>Overview
</a></h2>
408 <p>The CUPS PPD API provides read-only access the data in PostScript Printer
409 Description (
"PPD") files which are used for all printers with a driver. With
410 it you can display printer options to users, mark option choices and check for
411 conflicting choices, and output marked choices in PostScript output. The
412 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure contains all of
413 the information in a PPD file.
</p>
415 <h3><a name=
"LOADING">Loading a PPD File
</a></h3>
417 <p>The
<a href=
"#ppdOpenFile"><code>ppdOpenFile
</code></a> function
"opens" a
418 PPD file and loads it into memory. For example, the following code opens the
419 current printer's PPD file in a CUPS filter:
</p>
421 <pre class=
"example">
422 #include
<cups/ppd.h
>
424 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd =
<a href=
"#ppdOpenFile">ppdOpenFile
</a>(getenv(
"PPD"));
427 <p>The return value is a pointer to a new
428 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure or
<code>NULL
</code>
429 if the PPD file does not exist or cannot be loaded. The
430 <a href=
"#ppdClose"><code>ppdClose
</code></a> function frees the memory used
431 by the structure:
</p>
433 <pre class=
"example">
434 #include
<cups/ppd.h
>
436 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
438 <a href=
"#ppdClose">ppdClose
</a>(ppd);
441 <h3><a name=
"OPTIONS_AND_GROUPS">Options and Groups
</a></h3>
443 <p>PPD files support multiple options, which are stored in arrays of
444 <a href=
"#ppd_option_t"><code>ppd_option_t
</code></a> and
445 <a href=
"#ppd_choice_t"><code>ppd_choice_t
</code></a> structures.
</p>
447 <p>Each option in turn is associated with a group stored in a
448 <a href=
"#ppd_group_t"><code>ppd_group_t
</code></a> structure. Groups can be
449 specified in the PPD file; if an option is not associated with a group
450 then it is put in an automatically-generated
"General" group. Groups can also
451 have sub-groups, however CUPS currently ignores sub-groups because of past
452 abuses of this functionality.
</p>
454 <p>Options are selected by marking them using one of three functions. The
455 first is
<a href=
"#ppdMarkDefaults"><code>ppdMarkDefaults
</code></a> which
456 selects all of the default options in the PPD file:
</p>
458 <pre class=
"example">
459 #include
<cups/ppd.h
>
461 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
463 <a href=
"#ppdMarkDefaults">ppdMarkDefaults
</a>(ppd);
466 <p>The second is
<a href=
"#ppdMarkOption"><code>ppdMarkOption
</code></a>
467 which selects a single option choice in the PPD file. For example, the following
468 code selects the manual feed media source:
</p>
470 <pre class=
"example">
471 #include
<cups/ppd.h
>
473 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
475 <a href=
"#ppdMarkOption">ppdMarkOption
</a>(ppd,
"InputSlot",
"ManualFeed");
478 <p>The last function is
479 <a href=
"#cupsMarkOptions"><code>cupsMarkOptions
</code></a> which selects
480 multiple option choices in the PPD file from an array of CUPS options, mapping
481 IPP attributes like
"media" and
"sides" to their corresponding PPD options. You
482 typically use this function in a print filter with
483 <code>cupsParseOptions
</code> and
484 <a href=
"#ppdMarkDefaults"><code>ppdMarkDefaults
</code></a> to select all of
485 the option choices needed for the job, for example:
</p>
487 <pre class=
"example">
488 #include
<cups/ppd.h
>
490 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd =
<a href=
"#ppdOpenFile">ppdOpenFile
</a>(getenv(
"PPD"));
491 cups_option_t *options = NULL;
492 int num_options = cupsParseOptions(argv[
5],
0,
&options);
494 <a href=
"#ppdMarkDefaults">ppdMarkDefaults
</a>(ppd);
495 <a href=
"#cupsMarkOptions">cupsMarkOptions
</a>(ppd, num_options, options);
498 <h3><a name=
"CONSTRAINTS">Constraints
</a></h3>
500 <p>PPD files support specification of conflict conditions, called
501 constraints, between different options. Constraints are stored in an array of
502 <a href=
"#ppd_const_t"><code>ppd_const_t
</code></a> structures which specify
503 the options and choices that conflict with each other. The
504 <a href=
"#ppdConflicts"><code>ppdConflicts
</code></a> function tells you
505 how many of the selected options are incompatible.
</p>
507 <h3><a name=
"PAGE_SIZES">Page Sizes
</a></h3>
509 <p>Page sizes are special options which have physical dimensions and margins
510 associated with them. The size information is stored in
511 <a href=
"#ppd_size_t"><code>ppd_size_t
</code></a> structures and is available
512 by looking up the named size with the
513 <a href=
"#ppdPageSize"><code>ppdPageSize
</code></a> function. The page size and
514 margins are returned in units called points; there are
72 points per inch. If
515 you pass
<code>NULL
</code> for the size, the currently selected size is
518 <pre class=
"example">
519 #include
<cups/ppd.h
>
521 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
522 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd, NULL);
525 <p>Besides the standard page sizes listed in a PPD file, some printers
526 support variable or custom page sizes. Custom page sizes are supported if the
527 <code>variables_sizes
</code> member of the
528 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure is non-zero.
529 The
<code>custom_min
</code>,
<code>custom_max
</code>, and
530 <code>custom_margins
</code> members of the
531 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure define the limits
532 of the printable area. To get the resulting media size, use a page size string
533 of the form
"Custom.<I>width</I>x<I>length</I>", where
"width" and
"length" are
534 in points. Custom page size names can also be specified in inches
535 (
"Custom.<i>width</i>x<i>height</i>in"), centimeters
536 (
"Custom.<i>width</i>x<i>height</i>cm"), or millimeters
537 (
"Custom.<i>width</i>x<i>height</i>mm"):
</p>
539 <pre class=
"example">
540 #include
<cups/ppd.h
>
542 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
544 /* Get an
576x720 point custom page size */
545 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.576x720");
547 /* Get an
8x10 inch custom page size */
548 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.8x10in");
550 /* Get a
100x200 millimeter custom page size */
551 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.100x200mm");
553 /* Get a
12.7x34.5 centimeter custom page size */
554 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.12.7x34.5cm");
557 <h3><a name=
"ATTRIBUTES">Attributes
</a></h3>
559 <p>Every PPD file is composed of one or more attributes. Most of these
560 attributes are used to define groups, options, choices, and page sizes,
561 however several informations attributes are available which you may need
562 to access in your program or filter. Attributes normally look like one of
563 the following examples in a PPD file:
</p>
565 <pre class=
"example">
568 *name spec/text:
"value"
571 <p>The
<a href=
"#ppdFindAttr"><code>ppdFindAttr
</code></a> and
572 <a href=
"#ppdFindNextAttr"><code>ppdFindNextAttr
</code></a> functions find the
573 first and next instances, respectively, of the named attribute with the given
574 "spec" string and return a
<a href=
"#ppd_attr_t"><code>ppd_attr_t
</code></a>
575 structure. If you provide a NULL specifier string, all attributes with the
576 given name will be returned. For example, the following code lists all of the
577 <code>Product
</code> attributes in a PPD file:
</p>
579 <pre class=
"example">
580 #include
<cups/ppd.h
>
582 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
583 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *attr;
585 for (attr =
<a href=
"#ppdFindAttr">ppdFindAttr
</a>(ppd,
"Product", NULL);
587 attr =
<a href=
"#ppdFindNextAttr">ppdFindNextAttr
</a>(ppd,
"Product", NULL))
590 <h2 class=
"title"><a name=
"FUNCTIONS">Functions
</a></h2>
591 <h3 class=
"function"><a name=
"cupsMarkOptions">cupsMarkOptions
</a></h3>
592 <p class=
"description">Mark command-line options in a PPD file.
</p>
594 int cupsMarkOptions (
<br>
595 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
596 int num_options,
<br>
597 cups_option_t *options
<br>
599 <h4 class=
"parameters">Parameters
</h4>
602 <dd class=
"description">PPD file
</dd>
604 <dd class=
"description">Number of options
</dd>
606 <dd class=
"description">Options
</dd>
608 <h4 class=
"returnvalue">Return Value
</h4>
609 <p class=
"description">1 if conflicting
</p>
610 <h4 class=
"discussion">Discussion
</h4>
611 <p class=
"discussion">This function maps the IPP
"finishings
",
"media
",
"mirror
",
612 "multiple-document-handling
",
"output-bin
",
"printer-resolution
", and
613 "sides
" attributes to their corresponding PPD options and choices.
</p>
614 <h3 class=
"function"><a name=
"ppdClose">ppdClose
</a></h3>
615 <p class=
"description">Free all memory used by the PPD file.
</p>
618 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
620 <h4 class=
"parameters">Parameters
</h4>
623 <dd class=
"description">PPD file record
</dd>
625 <h3 class=
"function"><a name=
"ppdCollect">ppdCollect
</a></h3>
626 <p class=
"description">Collect all marked options that reside in the specified
630 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
631 <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br>
632 <a href=
"#ppd_choice_t">ppd_choice_t
</a> ***choices
<br>
634 <h4 class=
"parameters">Parameters
</h4>
637 <dd class=
"description">PPD file data
</dd>
639 <dd class=
"description">Section to collect
</dd>
641 <dd class=
"description">Pointers to choices
</dd>
643 <h4 class=
"returnvalue">Return Value
</h4>
644 <p class=
"description">Number of options marked
</p>
645 <h4 class=
"discussion">Discussion
</h4>
646 <p class=
"discussion">The choices array should be freed using
<code>free
</code> when you are
647 finished with it.
</p>
648 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdCollect2">ppdCollect2
</a></h3>
649 <p class=
"description">Collect all marked options that reside in the
650 specified section and minimum order.
</p>
652 int ppdCollect2 (
<br>
653 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
654 <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br>
655 float min_order,
<br>
656 <a href=
"#ppd_choice_t">ppd_choice_t
</a> ***choices
<br>
658 <h4 class=
"parameters">Parameters
</h4>
661 <dd class=
"description">PPD file data
</dd>
663 <dd class=
"description">Section to collect
</dd>
665 <dd class=
"description">Minimum OrderDependency value
</dd>
667 <dd class=
"description">Pointers to choices
</dd>
669 <h4 class=
"returnvalue">Return Value
</h4>
670 <p class=
"description">Number of options marked
</p>
671 <h4 class=
"discussion">Discussion
</h4>
672 <p class=
"discussion">The choices array should be freed using
<code>free
</code> when you are
676 <h3 class=
"function"><a name=
"ppdConflicts">ppdConflicts
</a></h3>
677 <p class=
"description">Check to see if there are any conflicts among the
678 marked option choices.
</p>
680 int ppdConflicts (
<br>
681 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
683 <h4 class=
"parameters">Parameters
</h4>
686 <dd class=
"description">PPD to check
</dd>
688 <h4 class=
"returnvalue">Return Value
</h4>
689 <p class=
"description">Number of conflicts found
</p>
690 <h4 class=
"discussion">Discussion
</h4>
691 <p class=
"discussion">The returned value is the same as returned by
<a href=
"#ppdMarkOption"><code>ppdMarkOption
</code></a>.
</p>
692 <h3 class=
"function"><a name=
"ppdEmit">ppdEmit
</a></h3>
693 <p class=
"description">Emit code for marked options to a file.
</p>
696 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
697 FILE *fp,
<br>
698 <a href=
"#ppd_section_t">ppd_section_t
</a> section
<br>
700 <h4 class=
"parameters">Parameters
</h4>
703 <dd class=
"description">PPD file record
</dd>
705 <dd class=
"description">File to write to
</dd>
707 <dd class=
"description">Section to write
</dd>
709 <h4 class=
"returnvalue">Return Value
</h4>
710 <p class=
"description">0 on success, -
1 on failure
</p>
711 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdEmitAfterOrder">ppdEmitAfterOrder
</a></h3>
712 <p class=
"description">Emit a subset of the code for marked options to a file.
</p>
714 int ppdEmitAfterOrder (
<br>
715 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
716 FILE *fp,
<br>
717 <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br>
718 int limit,
<br>
719 float min_order
<br>
721 <h4 class=
"parameters">Parameters
</h4>
724 <dd class=
"description">PPD file record
</dd>
726 <dd class=
"description">File to write to
</dd>
728 <dd class=
"description">Section to write
</dd>
730 <dd class=
"description">Non-zero to use min_order
</dd>
732 <dd class=
"description">Lowest OrderDependency
</dd>
734 <h4 class=
"returnvalue">Return Value
</h4>
735 <p class=
"description">0 on success, -
1 on failure
</p>
736 <h4 class=
"discussion">Discussion
</h4>
737 <p class=
"discussion">When
"limit
" is non-zero, this function only emits options whose
738 OrderDependency value is greater than or equal to
"min_order
".
<br>
740 When
"limit
" is zero, this function is identical to ppdEmit().
743 <h3 class=
"function"><a name=
"ppdEmitFd">ppdEmitFd
</a></h3>
744 <p class=
"description">Emit code for marked options to a file.
</p>
747 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
748 int fd,
<br>
749 <a href=
"#ppd_section_t">ppd_section_t
</a> section
<br>
751 <h4 class=
"parameters">Parameters
</h4>
754 <dd class=
"description">PPD file record
</dd>
756 <dd class=
"description">File to write to
</dd>
758 <dd class=
"description">Section to write
</dd>
760 <h4 class=
"returnvalue">Return Value
</h4>
761 <p class=
"description">0 on success, -
1 on failure
</p>
762 <h3 class=
"function"><a name=
"ppdEmitJCL">ppdEmitJCL
</a></h3>
763 <p class=
"description">Emit code for JCL options to a file.
</p>
766 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
767 FILE *fp,
<br>
768 int job_id,
<br>
769 const char *user,
<br>
770 const char *title
<br>
772 <h4 class=
"parameters">Parameters
</h4>
775 <dd class=
"description">PPD file record
</dd>
777 <dd class=
"description">File to write to
</dd>
779 <dd class=
"description">Job ID
</dd>
781 <dd class=
"description">Username
</dd>
783 <dd class=
"description">Title
</dd>
785 <h4 class=
"returnvalue">Return Value
</h4>
786 <p class=
"description">0 on success, -
1 on failure
</p>
787 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdEmitJCLEnd">ppdEmitJCLEnd
</a></h3>
788 <p class=
"description">Emit JCLEnd code to a file.
</p>
790 int ppdEmitJCLEnd (
<br>
791 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
792 FILE *fp
<br>
794 <h4 class=
"parameters">Parameters
</h4>
797 <dd class=
"description">PPD file record
</dd>
799 <dd class=
"description">File to write to
</dd>
801 <h4 class=
"returnvalue">Return Value
</h4>
802 <p class=
"description">0 on success, -
1 on failure
</p>
803 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdEmitString">ppdEmitString
</a></h3>
804 <p class=
"description">Get a string containing the code for marked options.
</p>
806 char *ppdEmitString (
<br>
807 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
808 <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br>
809 float min_order
<br>
811 <h4 class=
"parameters">Parameters
</h4>
814 <dd class=
"description">PPD file record
</dd>
816 <dd class=
"description">Section to write
</dd>
818 <dd class=
"description">Lowest OrderDependency
</dd>
820 <h4 class=
"returnvalue">Return Value
</h4>
821 <p class=
"description">String containing option code or
<code>NULL
</code> if there is no option code
</p>
822 <h4 class=
"discussion">Discussion
</h4>
823 <p class=
"discussion">When
"min_order
" is greater than zero, this function only includes options
824 whose OrderDependency value is greater than or equal to
"min_order
".
825 Otherwise, all options in the specified section are included in the
828 The return string is allocated on the heap and should be freed using
829 <code>free
</code> when you are done with it.
832 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppdErrorString">ppdErrorString
</a></h3>
833 <p class=
"description">Returns the text assocated with a status.
</p>
835 const char *ppdErrorString (
<br>
836 ppd_status_t status
<br>
838 <h4 class=
"parameters">Parameters
</h4>
841 <dd class=
"description">PPD status
</dd>
843 <h4 class=
"returnvalue">Return Value
</h4>
844 <p class=
"description">Status string
</p>
845 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppdFindAttr">ppdFindAttr
</a></h3>
846 <p class=
"description">Find the first matching attribute.
</p>
848 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *ppdFindAttr (
<br>
849 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
850 const char *name,
<br>
851 const char *spec
<br>
853 <h4 class=
"parameters">Parameters
</h4>
856 <dd class=
"description">PPD file data
</dd>
858 <dd class=
"description">Attribute name
</dd>
860 <dd class=
"description">Specifier string or
<code>NULL
</code></dd>
862 <h4 class=
"returnvalue">Return Value
</h4>
863 <p class=
"description">Attribute or
<code>NULL
</code> if not found
</p>
864 <h3 class=
"function"><a name=
"ppdFindChoice">ppdFindChoice
</a></h3>
865 <p class=
"description">Return a pointer to an option choice.
</p>
867 <a href=
"#ppd_choice_t">ppd_choice_t
</a> *ppdFindChoice (
<br>
868 <a href=
"#ppd_option_t">ppd_option_t
</a> *o,
<br>
869 const char *choice
<br>
871 <h4 class=
"parameters">Parameters
</h4>
874 <dd class=
"description">Pointer to option
</dd>
876 <dd class=
"description">Name of choice
</dd>
878 <h4 class=
"returnvalue">Return Value
</h4>
879 <p class=
"description">Choice pointer or
<code>NULL
</code></p>
880 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdFindCustomOption">ppdFindCustomOption
</a></h3>
881 <p class=
"description">Find a custom option.
</p>
883 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *ppdFindCustomOption (
<br>
884 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
885 const char *keyword
<br>
887 <h4 class=
"parameters">Parameters
</h4>
890 <dd class=
"description">PPD file
</dd>
892 <dd class=
"description">Custom option name
</dd>
894 <h4 class=
"returnvalue">Return Value
</h4>
895 <p class=
"description">Custom option or NULL
</p>
896 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdFindCustomParam">ppdFindCustomParam
</a></h3>
897 <p class=
"description">Find a parameter for a custom option.
</p>
899 <a href=
"#ppd_cparam_t">ppd_cparam_t
</a> *ppdFindCustomParam (
<br>
900 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *opt,
<br>
901 const char *name
<br>
903 <h4 class=
"parameters">Parameters
</h4>
906 <dd class=
"description">Custom option
</dd>
908 <dd class=
"description">Parameter name
</dd>
910 <h4 class=
"returnvalue">Return Value
</h4>
911 <p class=
"description">Custom parameter or NULL
</p>
912 <h3 class=
"function"><a name=
"ppdFindMarkedChoice">ppdFindMarkedChoice
</a></h3>
913 <p class=
"description">Return the marked choice for the specified option.
</p>
915 <a href=
"#ppd_choice_t">ppd_choice_t
</a> *ppdFindMarkedChoice (
<br>
916 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
917 const char *option
<br>
919 <h4 class=
"parameters">Parameters
</h4>
922 <dd class=
"description">PPD file
</dd>
924 <dd class=
"description">Keyword/option name
</dd>
926 <h4 class=
"returnvalue">Return Value
</h4>
927 <p class=
"description">Pointer to choice or
<code>NULL
</code></p>
928 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppdFindNextAttr">ppdFindNextAttr
</a></h3>
929 <p class=
"description">Find the next matching attribute.
</p>
931 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *ppdFindNextAttr (
<br>
932 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
933 const char *name,
<br>
934 const char *spec
<br>
936 <h4 class=
"parameters">Parameters
</h4>
939 <dd class=
"description">PPD file data
</dd>
941 <dd class=
"description">Attribute name
</dd>
943 <dd class=
"description">Specifier string or
<code>NULL
</code></dd>
945 <h4 class=
"returnvalue">Return Value
</h4>
946 <p class=
"description">Attribute or
<code>NULL
</code> if not found
</p>
947 <h3 class=
"function"><a name=
"ppdFindOption">ppdFindOption
</a></h3>
948 <p class=
"description">Return a pointer to the specified option.
</p>
950 <a href=
"#ppd_option_t">ppd_option_t
</a> *ppdFindOption (
<br>
951 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
952 const char *option
<br>
954 <h4 class=
"parameters">Parameters
</h4>
957 <dd class=
"description">PPD file data
</dd>
959 <dd class=
"description">Option/Keyword name
</dd>
961 <h4 class=
"returnvalue">Return Value
</h4>
962 <p class=
"description">Pointer to option or
<code>NULL
</code></p>
963 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdFirstCustomParam">ppdFirstCustomParam
</a></h3>
964 <p class=
"description">Return the first parameter for a custom option.
</p>
966 <a href=
"#ppd_cparam_t">ppd_cparam_t
</a> *ppdFirstCustomParam (
<br>
967 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *opt
<br>
969 <h4 class=
"parameters">Parameters
</h4>
972 <dd class=
"description">Custom option
</dd>
974 <h4 class=
"returnvalue">Return Value
</h4>
975 <p class=
"description">Custom parameter or NULL
</p>
976 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdFirstOption">ppdFirstOption
</a></h3>
977 <p class=
"description">Return the first option in the PPD file.
</p>
979 <a href=
"#ppd_option_t">ppd_option_t
</a> *ppdFirstOption (
<br>
980 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
982 <h4 class=
"parameters">Parameters
</h4>
985 <dd class=
"description">PPD file
</dd>
987 <h4 class=
"returnvalue">Return Value
</h4>
988 <p class=
"description">First option or
<code>NULL
</code></p>
989 <h4 class=
"discussion">Discussion
</h4>
990 <p class=
"discussion">Options are returned from all groups in ascending alphanumeric order.
993 <h3 class=
"function"><a name=
"ppdIsMarked">ppdIsMarked
</a></h3>
994 <p class=
"description">Check to see if an option is marked.
</p>
996 int ppdIsMarked (
<br>
997 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
998 const char *option,
<br>
999 const char *choice
<br>
1001 <h4 class=
"parameters">Parameters
</h4>
1004 <dd class=
"description">PPD file data
</dd>
1006 <dd class=
"description">Option/Keyword name
</dd>
1008 <dd class=
"description">Choice name
</dd>
1010 <h4 class=
"returnvalue">Return Value
</h4>
1011 <p class=
"description">Non-zero if option is marked
</p>
1012 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppdLastError">ppdLastError
</a></h3>
1013 <p class=
"description">Return the status from the last ppdOpen*().
</p>
1015 ppd_status_t ppdLastError (
<br>
1016 int *line
<br>
1018 <h4 class=
"parameters">Parameters
</h4>
1021 <dd class=
"description">Line number
</dd>
1023 <h4 class=
"returnvalue">Return Value
</h4>
1024 <p class=
"description">Status code
</p>
1025 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdLocalize">ppdLocalize
</a></h3>
1026 <p class=
"description">Localize the PPD file to the current locale.
</p>
1028 int ppdLocalize (
<br>
1029 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
1031 <h4 class=
"parameters">Parameters
</h4>
1034 <dd class=
"description">PPD file
</dd>
1036 <h4 class=
"returnvalue">Return Value
</h4>
1037 <p class=
"description">0 on success, -
1 on error
</p>
1038 <h4 class=
"discussion">Discussion
</h4>
1039 <p class=
"discussion">All groups, options, and choices are localized, as are ICC profile
1040 descriptions, printer presets, and custom option parameters. Each
1041 localized string uses the UTF-
8 character encoding.
1044 <h3 class=
"function"><span class=
"info"> CUPS
1.3 </span><a name=
"ppdLocalizeIPPReason">ppdLocalizeIPPReason
</a></h3>
1045 <p class=
"description">Get the localized version of a cupsIPPReason
1048 const char *ppdLocalizeIPPReason (
<br>
1049 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1050 const char *reason,
<br>
1051 const char *scheme,
<br>
1052 char *buffer,
<br>
1053 size_t bufsize
<br>
1055 <h4 class=
"parameters">Parameters
</h4>
1058 <dd class=
"description">PPD file
</dd>
1060 <dd class=
"description">IPP reason keyword to look up
</dd>
1062 <dd class=
"description">URI scheme or NULL for text
</dd>
1064 <dd class=
"description">Value buffer
</dd>
1066 <dd class=
"description">Size of value buffer
</dd>
1068 <h4 class=
"returnvalue">Return Value
</h4>
1069 <p class=
"description">Value or NULL if not found
</p>
1070 <h4 class=
"discussion">Discussion
</h4>
1071 <p class=
"discussion">This function uses the current locale to find the corresponding reason
1072 text or URI from the attribute value. If
"scheme
" is NULL or
"text
",
1073 the returned value contains human-readable (UTF-
8) text from the translation
1074 string or attribute value. Otherwise the corresponding URI is returned.
<br>
1076 If no value of the requested scheme can be found, NULL is returned.
1079 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"ppdLocalizeMarkerName">ppdLocalizeMarkerName
</a></h3>
1080 <p class=
"description">Get the localized version of a marker-names
1081 attribute value.
</p>
1083 const char *ppdLocalizeMarkerName (
<br>
1084 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1085 const char *name
<br>
1087 <h4 class=
"parameters">Parameters
</h4>
1090 <dd class=
"description">PPD file
</dd>
1092 <dd class=
"description">Marker name to look up
</dd>
1094 <h4 class=
"returnvalue">Return Value
</h4>
1095 <p class=
"description">Value or
<code>NULL
</code> if not found
</p>
1096 <h4 class=
"discussion">Discussion
</h4>
1097 <p class=
"discussion">This function uses the current locale to find the corresponding name
1098 text from the attribute value. If no localized text for the requested
1099 name can be found,
<code>NULL
</code> is returned.
1102 <h3 class=
"function"><a name=
"ppdMarkDefaults">ppdMarkDefaults
</a></h3>
1103 <p class=
"description">Mark all default options in the PPD file.
</p>
1105 void ppdMarkDefaults (
<br>
1106 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
1108 <h4 class=
"parameters">Parameters
</h4>
1111 <dd class=
"description">PPD file record
</dd>
1113 <h3 class=
"function"><a name=
"ppdMarkOption">ppdMarkOption
</a></h3>
1114 <p class=
"description">Mark an option in a PPD file.
</p>
1116 int ppdMarkOption (
<br>
1117 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1118 const char *option,
<br>
1119 const char *choice
<br>
1121 <h4 class=
"parameters">Parameters
</h4>
1124 <dd class=
"description">PPD file record
</dd>
1126 <dd class=
"description">Keyword
</dd>
1128 <dd class=
"description">Option name
</dd>
1130 <h4 class=
"returnvalue">Return Value
</h4>
1131 <p class=
"description">Number of conflicts
</p>
1132 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdNextCustomParam">ppdNextCustomParam
</a></h3>
1133 <p class=
"description">Return the next parameter for a custom option.
</p>
1135 <a href=
"#ppd_cparam_t">ppd_cparam_t
</a> *ppdNextCustomParam (
<br>
1136 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *opt
<br>
1138 <h4 class=
"parameters">Parameters
</h4>
1141 <dd class=
"description">Custom option
</dd>
1143 <h4 class=
"returnvalue">Return Value
</h4>
1144 <p class=
"description">Custom parameter or NULL
</p>
1145 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdNextOption">ppdNextOption
</a></h3>
1146 <p class=
"description">Return the next option in the PPD file.
</p>
1148 <a href=
"#ppd_option_t">ppd_option_t
</a> *ppdNextOption (
<br>
1149 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
1151 <h4 class=
"parameters">Parameters
</h4>
1154 <dd class=
"description">PPD file
</dd>
1156 <h4 class=
"returnvalue">Return Value
</h4>
1157 <p class=
"description">Next option or
<code>NULL
</code></p>
1158 <h4 class=
"discussion">Discussion
</h4>
1159 <p class=
"discussion">Options are returned from all groups in ascending alphanumeric order.
1162 <h3 class=
"function"><a name=
"ppdOpen">ppdOpen
</a></h3>
1163 <p class=
"description">Read a PPD file into memory.
</p>
1165 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppdOpen (
<br>
1166 FILE *fp
<br>
1168 <h4 class=
"parameters">Parameters
</h4>
1171 <dd class=
"description">File to read from
</dd>
1173 <h4 class=
"returnvalue">Return Value
</h4>
1174 <p class=
"description">PPD file record
</p>
1175 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdOpen2">ppdOpen2
</a></h3>
1176 <p class=
"description">Read a PPD file into memory.
</p>
1178 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppdOpen2 (
<br>
1179 cups_file_t *fp
<br>
1181 <h4 class=
"parameters">Parameters
</h4>
1184 <dd class=
"description">File to read from
</dd>
1186 <h4 class=
"returnvalue">Return Value
</h4>
1187 <p class=
"description">PPD file record or
<code>NULL
</code> if the PPD file could not be opened.
</p>
1188 <h3 class=
"function"><a name=
"ppdOpenFd">ppdOpenFd
</a></h3>
1189 <p class=
"description">Read a PPD file into memory.
</p>
1191 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppdOpenFd (
<br>
1192 int fd
<br>
1194 <h4 class=
"parameters">Parameters
</h4>
1197 <dd class=
"description">File to read from
</dd>
1199 <h4 class=
"returnvalue">Return Value
</h4>
1200 <p class=
"description">PPD file record or
<code>NULL
</code> if the PPD file could not be opened.
</p>
1201 <h3 class=
"function"><a name=
"ppdOpenFile">ppdOpenFile
</a></h3>
1202 <p class=
"description">Read a PPD file into memory.
</p>
1204 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppdOpenFile (
<br>
1205 const char *filename
<br>
1207 <h4 class=
"parameters">Parameters
</h4>
1210 <dd class=
"description">File to read from
</dd>
1212 <h4 class=
"returnvalue">Return Value
</h4>
1213 <p class=
"description">PPD file record or
<code>NULL
</code> if the PPD file could not be opened.
</p>
1214 <h3 class=
"function"><a name=
"ppdPageLength">ppdPageLength
</a></h3>
1215 <p class=
"description">Get the page length for the given size.
</p>
1217 float ppdPageLength (
<br>
1218 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1219 const char *name
<br>
1221 <h4 class=
"parameters">Parameters
</h4>
1224 <dd class=
"description">PPD file
</dd>
1226 <dd class=
"description">Size name
</dd>
1228 <h4 class=
"returnvalue">Return Value
</h4>
1229 <p class=
"description">Length of page in points or
0.0</p>
1230 <h3 class=
"function"><a name=
"ppdPageSize">ppdPageSize
</a></h3>
1231 <p class=
"description">Get the page size record for the given size.
</p>
1233 <a href=
"#ppd_size_t">ppd_size_t
</a> *ppdPageSize (
<br>
1234 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1235 const char *name
<br>
1237 <h4 class=
"parameters">Parameters
</h4>
1240 <dd class=
"description">PPD file record
</dd>
1242 <dd class=
"description">Size name
</dd>
1244 <h4 class=
"returnvalue">Return Value
</h4>
1245 <p class=
"description">Size record for page or NULL
</p>
1246 <h3 class=
"function"><a name=
"ppdPageWidth">ppdPageWidth
</a></h3>
1247 <p class=
"description">Get the page width for the given size.
</p>
1249 float ppdPageWidth (
<br>
1250 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1251 const char *name
<br>
1253 <h4 class=
"parameters">Parameters
</h4>
1256 <dd class=
"description">PPD file record
</dd>
1258 <dd class=
"description">Size name
</dd>
1260 <h4 class=
"returnvalue">Return Value
</h4>
1261 <p class=
"description">Width of page in points or
0.0</p>
1262 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20 </span><a name=
"ppdSetConformance">ppdSetConformance
</a></h3>
1263 <p class=
"description">Set the conformance level for PPD files.
</p>
1265 void ppdSetConformance (
<br>
1266 <a href=
"#ppd_conform_t">ppd_conform_t
</a> c
<br>
1268 <h4 class=
"parameters">Parameters
</h4>
1271 <dd class=
"description">Conformance level
</dd>
1273 <h2 class=
"title"><a name=
"TYPES">Data Types
</a></h2>
1274 <h3 class=
"typedef"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppd_attr_t">ppd_attr_t
</a></h3>
1275 <p class=
"description">PPD Attribute Structure
</p>
1277 typedef struct
<a href=
"#ppd_attr_s">ppd_attr_s
</a> ppd_attr_t;
1279 <h3 class=
"typedef"><a name=
"ppd_choice_t">ppd_choice_t
</a></h3>
1280 <p class=
"description">Option choices
</p>
1282 typedef struct
<a href=
"#ppd_choice_s">ppd_choice_s
</a> ppd_choice_t;
1284 <h3 class=
"typedef"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppd_conform_t">ppd_conform_t
</a></h3>
1285 <p class=
"description">Conformance Levels
</p>
1287 typedef enum
<a href=
"#ppd_conform_e">ppd_conform_e
</a> ppd_conform_t;
1289 <h3 class=
"typedef"><a name=
"ppd_const_t">ppd_const_t
</a></h3>
1290 <p class=
"description">Constraints
</p>
1292 typedef struct
<a href=
"#ppd_const_s">ppd_const_s
</a> ppd_const_t;
1294 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_coption_t">ppd_coption_t
</a></h3>
1295 <p class=
"description">Custom Option
</p>
1297 typedef struct
<a href=
"#ppd_coption_s">ppd_coption_s
</a> ppd_coption_t;
1299 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cparam_t">ppd_cparam_t
</a></h3>
1300 <p class=
"description">Custom Parameter
</p>
1302 typedef struct
<a href=
"#ppd_cparam_s">ppd_cparam_s
</a> ppd_cparam_t;
1304 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cplimit_t">ppd_cplimit_t
</a></h3>
1305 <p class=
"description">Custom Parameter Limit
</p>
1307 typedef union
<a href=
"#ppd_cplimit_u">ppd_cplimit_u
</a> ppd_cplimit_t;
1309 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cptype_t">ppd_cptype_t
</a></h3>
1310 <p class=
"description">Custom Parameter Type
</p>
1312 typedef enum
<a href=
"#ppd_cptype_e">ppd_cptype_e
</a> ppd_cptype_t;
1314 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cpvalue_t">ppd_cpvalue_t
</a></h3>
1315 <p class=
"description">Custom Parameter Value
</p>
1317 typedef union
<a href=
"#ppd_cpvalue_u">ppd_cpvalue_u
</a> ppd_cpvalue_t;
1319 <h3 class=
"typedef"><a name=
"ppd_emul_t">ppd_emul_t
</a></h3>
1320 <p class=
"description">Emulators
</p>
1322 typedef struct
<a href=
"#ppd_emul_s">ppd_emul_s
</a> ppd_emul_t;
1324 <h3 class=
"typedef"><a name=
"ppd_file_t">ppd_file_t
</a></h3>
1325 <p class=
"description">PPD File
</p>
1327 typedef struct
<a href=
"#ppd_file_s">ppd_file_s
</a> ppd_file_t;
1329 <h3 class=
"typedef"><a name=
"ppd_group_t">ppd_group_t
</a></h3>
1330 <p class=
"description">Groups
</p>
1332 typedef struct
<a href=
"#ppd_group_s">ppd_group_s
</a> ppd_group_t;
1334 <h3 class=
"typedef"><a name=
"ppd_option_t">ppd_option_t
</a></h3>
1335 <p class=
"description">Options
</p>
1337 typedef struct
<a href=
"#ppd_option_s">ppd_option_s
</a> ppd_option_t;
1339 <h3 class=
"typedef"><a name=
"ppd_profile_t">ppd_profile_t
</a></h3>
1340 <p class=
"description">sRGB Color Profiles
</p>
1342 typedef struct
<a href=
"#ppd_profile_s">ppd_profile_s
</a> ppd_profile_t;
1344 <h3 class=
"typedef"><a name=
"ppd_section_t">ppd_section_t
</a></h3>
1345 <p class=
"description">Order dependency sections
</p>
1347 typedef enum
<a href=
"#ppd_section_e">ppd_section_e
</a> ppd_section_t;
1349 <h3 class=
"typedef"><a name=
"ppd_size_t">ppd_size_t
</a></h3>
1350 <p class=
"description">Page Sizes
</p>
1352 typedef struct
<a href=
"#ppd_size_s">ppd_size_s
</a> ppd_size_t;
1354 <h3 class=
"typedef"><a name=
"ppd_ui_t">ppd_ui_t
</a></h3>
1355 <p class=
"description">UI Types
</p>
1357 typedef enum
<a href=
"#ppd_ui_e">ppd_ui_e
</a> ppd_ui_t;
1359 <h2 class=
"title"><a name=
"STRUCTURES">Structures
</a></h2>
1360 <h3 class=
"struct"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppd_attr_s">ppd_attr_s
</a></h3>
1361 <p class=
"description">PPD Attribute Structure
</p>
1362 <p class=
"code">struct ppd_attr_s {
<br>
1363 char name[PPD_MAX_NAME];
<br>
1364 char spec[PPD_MAX_NAME];
<br>
1365 char text[PPD_MAX_TEXT];
<br>
1366 char *value;
<br>
1368 <h4 class=
"members">Members
</h4>
1370 <dt>name[PPD_MAX_NAME]
</dt>
1371 <dd class=
"description">Name of attribute (cupsXYZ)
</dd>
1372 <dt>spec[PPD_MAX_NAME]
</dt>
1373 <dd class=
"description">Specifier string, if any
</dd>
1374 <dt>text[PPD_MAX_TEXT]
</dt>
1375 <dd class=
"description">Human-readable text, if any
</dd>
1377 <dd class=
"description">Value string
</dd>
1379 <h3 class=
"struct"><a name=
"ppd_choice_s">ppd_choice_s
</a></h3>
1380 <p class=
"description">Option choices
</p>
1381 <p class=
"code">struct ppd_choice_s {
<br>
1382 char choice[PPD_MAX_NAME];
<br>
1383 char *code;
<br>
1384 char marked;
<br>
1385 <a href=
"#ppd_option_t">ppd_option_t
</a> *option;
<br>
1386 char text[PPD_MAX_TEXT];
<br>
1388 <h4 class=
"members">Members
</h4>
1390 <dt>choice[PPD_MAX_NAME]
</dt>
1391 <dd class=
"description">Computer-readable option name
</dd>
1393 <dd class=
"description">Code to send for this option
</dd>
1395 <dd class=
"description">0 if not selected,
1 otherwise
</dd>
1397 <dd class=
"description">Pointer to parent option structure
</dd>
1398 <dt>text[PPD_MAX_TEXT]
</dt>
1399 <dd class=
"description">Human-readable option name
</dd>
1401 <h3 class=
"struct"><a name=
"ppd_const_s">ppd_const_s
</a></h3>
1402 <p class=
"description">Constraints
</p>
1403 <p class=
"code">struct ppd_const_s {
<br>
1404 char choice1[PPD_MAX_NAME];
<br>
1405 char choice2[PPD_MAX_NAME];
<br>
1406 char option1[PPD_MAX_NAME];
<br>
1407 char option2[PPD_MAX_NAME];
<br>
1409 <h4 class=
"members">Members
</h4>
1411 <dt>choice1[PPD_MAX_NAME]
</dt>
1412 <dd class=
"description">First option/choice (blank for all)
</dd>
1413 <dt>choice2[PPD_MAX_NAME]
</dt>
1414 <dd class=
"description">Second option/choice (blank for all)
</dd>
1415 <dt>option1[PPD_MAX_NAME]
</dt>
1416 <dd class=
"description">First keyword
</dd>
1417 <dt>option2[PPD_MAX_NAME]
</dt>
1418 <dd class=
"description">Second keyword
</dd>
1420 <h3 class=
"struct"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_coption_s">ppd_coption_s
</a></h3>
1421 <p class=
"description">Custom Option
</p>
1422 <p class=
"code">struct ppd_coption_s {
<br>
1423 char keyword[PPD_MAX_NAME];
<br>
1424 int marked;
<br>
1425 <a href=
"#ppd_option_t">ppd_option_t
</a> *option;
<br>
1426 cups_array_t *params;
<br>
1428 <h4 class=
"members">Members
</h4>
1430 <dt>keyword[PPD_MAX_NAME]
</dt>
1431 <dd class=
"description">Name of option that is being extended...
</dd>
1433 <dd class=
"description">Extended option is marked
</dd>
1435 <dd class=
"description">Option that is being extended...
</dd>
1437 <dd class=
"description">Parameters
</dd>
1439 <h3 class=
"struct"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cparam_s">ppd_cparam_s
</a></h3>
1440 <p class=
"description">Custom Parameter
</p>
1441 <p class=
"code">struct ppd_cparam_s {
<br>
1442 <a href=
"#ppd_cpvalue_t">ppd_cpvalue_t
</a> current;
<br>
1443 <a href=
"#ppd_cplimit_t">ppd_cplimit_t
</a> minimum, maximum;
<br>
1444 char name[PPD_MAX_NAME];
<br>
1445 int order;
<br>
1446 char text[PPD_MAX_TEXT];
<br>
1447 <a href=
"#ppd_cptype_t">ppd_cptype_t
</a> type;
<br>
1449 <h4 class=
"members">Members
</h4>
1452 <dd class=
"description">Current value
</dd>
1454 <dd class=
"description">Maximum value
</dd>
1455 <dt>name[PPD_MAX_NAME]
</dt>
1456 <dd class=
"description">Parameter name
</dd>
1458 <dd class=
"description">Order (
0 to N)
</dd>
1459 <dt>text[PPD_MAX_TEXT]
</dt>
1460 <dd class=
"description">Human-readable text
</dd>
1462 <dd class=
"description">Parameter type
</dd>
1464 <h3 class=
"struct"><a name=
"ppd_emul_s">ppd_emul_s
</a></h3>
1465 <p class=
"description">Emulators
</p>
1466 <p class=
"code">struct ppd_emul_s {
<br>
1467 char name[PPD_MAX_NAME];
<br>
1468 char *start;
<br>
1469 char *stop;
<br>
1471 <h4 class=
"members">Members
</h4>
1473 <dt>name[PPD_MAX_NAME]
</dt>
1474 <dd class=
"description">Emulator name
</dd>
1476 <dd class=
"description">Code to switch to this emulation
</dd>
1478 <dd class=
"description">Code to stop this emulation
</dd>
1480 <h3 class=
"struct"><a name=
"ppd_file_s">ppd_file_s
</a></h3>
1481 <p class=
"description">PPD File
</p>
1482 <p class=
"code">struct ppd_file_s {
<br>
1483 int accurate_screens;
<br>
1484 int color_device;
<br>
1485 ppd_cs_t colorspace;
<br>
1486 <a href=
"#ppd_const_t">ppd_const_t
</a> *consts;
<br>
1487 int contone_only;
<br>
1488 float custom_margins[
4];
<br>
1489 float custom_max[
2];
<br>
1490 float custom_min[
2];
<br>
1491 <a href=
"#ppd_emul_t">ppd_emul_t
</a> *emulations;
<br>
1492 char **filters;
<br>
1493 int flip_duplex;
<br>
1494 char **fonts;
<br>
1495 <a href=
"#ppd_group_t">ppd_group_t
</a> *groups;
<br>
1496 char *jcl_begin;
<br>
1497 char *jcl_end;
<br>
1498 char *jcl_ps;
<br>
1499 int landscape;
<br>
1500 char *lang_encoding;
<br>
1501 char *lang_version;
<br>
1502 int language_level;
<br>
1503 int manual_copies;
<br>
1504 char *manufacturer;
<br>
1505 int model_number;
<br>
1506 char *modelname;
<br>
1507 char *nickname;
<br>
1508 int num_consts;
<br>
1509 int num_emulations;
<br>
1510 int num_filters;
<br>
1511 int num_fonts;
<br>
1512 int num_groups;
<br>
1513 int num_profiles;
<br>
1514 int num_sizes;
<br>
1515 char *patches;
<br>
1516 char *pcfilename;
<br>
1517 char *product;
<br>
1518 <a href=
"#ppd_profile_t">ppd_profile_t
</a> *profiles;
<br>
1519 char *protocols;
<br>
1520 char *shortnickname;
<br>
1521 <a href=
"#ppd_size_t">ppd_size_t
</a> *sizes;
<br>
1522 int throughput;
<br>
1523 char *ttrasterizer;
<br>
1524 int variable_sizes;
<br>
1526 <h4 class=
"members">Members
</h4>
1528 <dt>accurate_screens
</dt>
1529 <dd class=
"description">1 = supports accurate screens,
0 = not
</dd>
1530 <dt>color_device
</dt>
1531 <dd class=
"description">1 = color device,
0 = grayscale
</dd>
1532 <dt>colorspace
</dt>
1533 <dd class=
"description">Default colorspace
</dd>
1535 <dd class=
"description">UI/Non-UI constraints
</dd>
1536 <dt>contone_only
</dt>
1537 <dd class=
"description">1 = continuous tone only,
0 = not
</dd>
1538 <dt>custom_margins[
4]
</dt>
1539 <dd class=
"description">Margins around page
</dd>
1540 <dt>custom_max[
2]
</dt>
1541 <dd class=
"description">Maximum variable page size
</dd>
1542 <dt>custom_min[
2]
</dt>
1543 <dd class=
"description">Minimum variable page size
</dd>
1544 <dt>emulations
</dt>
1545 <dd class=
"description">Emulations and the code to invoke them
</dd>
1547 <dd class=
"description">Filter strings...
</dd>
1548 <dt>flip_duplex
<span class=
"info"> DEPRECATED
</span></dt>
1549 <dd class=
"description">1 = Flip page for back sides
</dd>
1551 <dd class=
"description">Pre-loaded fonts
</dd>
1553 <dd class=
"description">UI groups
</dd>
1555 <dd class=
"description">Start JCL commands
</dd>
1557 <dd class=
"description">End JCL commands
</dd>
1559 <dd class=
"description">Enter PostScript interpreter
</dd>
1561 <dd class=
"description">-
90 or
90</dd>
1562 <dt>lang_encoding
</dt>
1563 <dd class=
"description">Language encoding
</dd>
1564 <dt>lang_version
</dt>
1565 <dd class=
"description">Language version (English, Spanish, etc.)
</dd>
1566 <dt>language_level
</dt>
1567 <dd class=
"description">Language level of device
</dd>
1568 <dt>manual_copies
</dt>
1569 <dd class=
"description">1 = Copies done manually,
0 = hardware
</dd>
1570 <dt>manufacturer
</dt>
1571 <dd class=
"description">Manufacturer name
</dd>
1572 <dt>model_number
</dt>
1573 <dd class=
"description">Device-specific model number
</dd>
1575 <dd class=
"description">Model name (general)
</dd>
1577 <dd class=
"description">Nickname (specific)
</dd>
1578 <dt>num_consts
</dt>
1579 <dd class=
"description">Number of UI/Non-UI constraints
</dd>
1580 <dt>num_emulations
</dt>
1581 <dd class=
"description">Number of emulations supported
</dd>
1582 <dt>num_filters
</dt>
1583 <dd class=
"description">Number of filters
</dd>
1585 <dd class=
"description">Number of pre-loaded fonts
</dd>
1586 <dt>num_groups
</dt>
1587 <dd class=
"description">Number of UI groups
</dd>
1588 <dt>num_profiles
</dt>
1589 <dd class=
"description">Number of sRGB color profiles
</dd>
1591 <dd class=
"description">Number of page sizes
</dd>
1593 <dd class=
"description">Patch commands to be sent to printer
</dd>
1594 <dt>pcfilename
<span class=
"info"> CUPS
1.1.19 </span></dt>
1595 <dd class=
"description">PCFileName string
</dd>
1597 <dd class=
"description">Product name (from PS RIP/interpreter)
</dd>
1599 <dd class=
"description">sRGB color profiles
</dd>
1600 <dt>protocols
<span class=
"info"> CUPS
1.1.19 </span></dt>
1601 <dd class=
"description">Protocols (BCP, TBCP) string
</dd>
1602 <dt>shortnickname
</dt>
1603 <dd class=
"description">Short version of nickname
</dd>
1605 <dd class=
"description">Page sizes
</dd>
1606 <dt>throughput
</dt>
1607 <dd class=
"description">Pages per minute
</dd>
1608 <dt>ttrasterizer
</dt>
1609 <dd class=
"description">Truetype rasterizer
</dd>
1610 <dt>variable_sizes
</dt>
1611 <dd class=
"description">1 = supports variable sizes,
0 = doesn't
</dd>
1613 <h3 class=
"struct"><a name=
"ppd_group_s">ppd_group_s
</a></h3>
1614 <p class=
"description">Groups
</p>
1615 <p class=
"code">struct ppd_group_s {
<br>
1616 char text[PPD_MAX_TEXT - PPD_MAX_NAME];
<br>
1617 char name[PPD_MAX_NAME];
<br>
1618 int num_options;
<br>
1619 int num_subgroups;
<br>
1620 <a href=
"#ppd_option_t">ppd_option_t
</a> *options;
<br>
1621 struct
<a href=
"#ppd_group_s">ppd_group_s
</a> *subgroups;
<br>
1623 <h4 class=
"members">Members
</h4>
1625 <dt>PPD_MAX_NAME]
</dt>
1626 <dd class=
"description">Human-readable group name
</dd>
1627 <dt>name[PPD_MAX_NAME]
<span class=
"info"> CUPS
1.1.18 </span></dt>
1628 <dd class=
"description">Group name
</dd>
1629 <dt>num_options
</dt>
1630 <dd class=
"description">Number of options
</dd>
1631 <dt>num_subgroups
</dt>
1632 <dd class=
"description">Number of sub-groups
</dd>
1634 <dd class=
"description">Options
</dd>
1636 <dd class=
"description">Sub-groups (max depth =
1)
</dd>
1638 <h3 class=
"struct"><a name=
"ppd_option_s">ppd_option_s
</a></h3>
1639 <p class=
"description">Options
</p>
1640 <p class=
"code">struct ppd_option_s {
<br>
1641 <a href=
"#ppd_choice_t">ppd_choice_t
</a> *choices;
<br>
1642 char conflicted;
<br>
1643 char defchoice[PPD_MAX_NAME];
<br>
1644 char keyword[PPD_MAX_NAME];
<br>
1645 int num_choices;
<br>
1646 float order;
<br>
1647 <a href=
"#ppd_section_t">ppd_section_t
</a> section;
<br>
1648 char text[PPD_MAX_TEXT];
<br>
1649 <a href=
"#ppd_ui_t">ppd_ui_t
</a> ui;
<br>
1651 <h4 class=
"members">Members
</h4>
1654 <dd class=
"description">Option choices
</dd>
1655 <dt>conflicted
</dt>
1656 <dd class=
"description">0 if no conflicts exist,
1 otherwise
</dd>
1657 <dt>defchoice[PPD_MAX_NAME]
</dt>
1658 <dd class=
"description">Default option choice
</dd>
1659 <dt>keyword[PPD_MAX_NAME]
</dt>
1660 <dd class=
"description">Option keyword name (
"PageSize
", etc.)
</dd>
1661 <dt>num_choices
</dt>
1662 <dd class=
"description">Number of option choices
</dd>
1664 <dd class=
"description">Order number
</dd>
1666 <dd class=
"description">Section for command
</dd>
1667 <dt>text[PPD_MAX_TEXT]
</dt>
1668 <dd class=
"description">Human-readable text
</dd>
1670 <dd class=
"description">Type of UI option
</dd>
1672 <h3 class=
"struct"><a name=
"ppd_profile_s">ppd_profile_s
</a></h3>
1673 <p class=
"description">sRGB Color Profiles
</p>
1674 <p class=
"code">struct ppd_profile_s {
<br>
1675 float density;
<br>
1676 float gamma;
<br>
1677 float matrix[
3][
3];
<br>
1678 char media_type[PPD_MAX_NAME];
<br>
1679 char resolution[PPD_MAX_NAME];
<br>
1681 <h4 class=
"members">Members
</h4>
1684 <dd class=
"description">Ink density to use
</dd>
1686 <dd class=
"description">Gamma correction to use
</dd>
1687 <dt>matrix[
3][
3]
</dt>
1688 <dd class=
"description">Transform matrix
</dd>
1689 <dt>media_type[PPD_MAX_NAME]
</dt>
1690 <dd class=
"description">Media type or
"-
"</dd>
1691 <dt>resolution[PPD_MAX_NAME]
</dt>
1692 <dd class=
"description">Resolution or
"-
"</dd>
1694 <h3 class=
"struct"><a name=
"ppd_size_s">ppd_size_s
</a></h3>
1695 <p class=
"description">Page Sizes
</p>
1696 <p class=
"code">struct ppd_size_s {
<br>
1697 float bottom;
<br>
1698 float left;
<br>
1699 float length;
<br>
1700 int marked;
<br>
1701 char name[PPD_MAX_NAME];
<br>
1702 float right;
<br>
1703 float top;
<br>
1704 float width;
<br>
1706 <h4 class=
"members">Members
</h4>
1709 <dd class=
"description">Bottom printable margin in points
</dd>
1711 <dd class=
"description">Left printable margin in points
</dd>
1713 <dd class=
"description">Length of media in points
</dd>
1715 <dd class=
"description">Page size selected?
</dd>
1716 <dt>name[PPD_MAX_NAME]
</dt>
1717 <dd class=
"description">Media size option
</dd>
1719 <dd class=
"description">Right printable margin in points
</dd>
1721 <dd class=
"description">Top printable margin in points
</dd>
1723 <dd class=
"description">Width of media in points
</dd>
1725 <h2 class=
"title"><a name=
"UNIONS">Unions
</a></h2>
1726 <h3 class=
"union"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cplimit_u">ppd_cplimit_u
</a></h3>
1727 <p class=
"description">Custom Parameter Limit
</p>
1728 <p class=
"code">union ppd_cplimit_u {
<br>
1729 float custom_curve;
<br>
1730 int custom_int;
<br>
1731 float custom_invcurve;
<br>
1732 int custom_passcode;
<br>
1733 int custom_password;
<br>
1734 float custom_points;
<br>
1735 float custom_real;
<br>
1736 int custom_string;
<br>
1738 <h4 class=
"members">Members
</h4>
1740 <dt>custom_curve
</dt>
1741 <dd class=
"description">Gamma value
</dd>
1742 <dt>custom_int
</dt>
1743 <dd class=
"description">Integer value
</dd>
1744 <dt>custom_invcurve
</dt>
1745 <dd class=
"description">Gamma value
</dd>
1746 <dt>custom_passcode
</dt>
1747 <dd class=
"description">Passcode length
</dd>
1748 <dt>custom_password
</dt>
1749 <dd class=
"description">Password length
</dd>
1750 <dt>custom_points
</dt>
1751 <dd class=
"description">Measurement value
</dd>
1752 <dt>custom_real
</dt>
1753 <dd class=
"description">Real value
</dd>
1754 <dt>custom_string
</dt>
1755 <dd class=
"description">String length
</dd>
1757 <h3 class=
"union"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cpvalue_u">ppd_cpvalue_u
</a></h3>
1758 <p class=
"description">Custom Parameter Value
</p>
1759 <p class=
"code">union ppd_cpvalue_u {
<br>
1760 float custom_curve;
<br>
1761 int custom_int;
<br>
1762 float custom_invcurve;
<br>
1763 char *custom_passcode;
<br>
1764 char *custom_password;
<br>
1765 float custom_points;
<br>
1766 float custom_real;
<br>
1767 char *custom_string;
<br>
1769 <h4 class=
"members">Members
</h4>
1771 <dt>custom_curve
</dt>
1772 <dd class=
"description">Gamma value
</dd>
1773 <dt>custom_int
</dt>
1774 <dd class=
"description">Integer value
</dd>
1775 <dt>custom_invcurve
</dt>
1776 <dd class=
"description">Gamma value
</dd>
1777 <dt>custom_passcode
</dt>
1778 <dd class=
"description">Passcode value
</dd>
1779 <dt>custom_password
</dt>
1780 <dd class=
"description">Password value
</dd>
1781 <dt>custom_points
</dt>
1782 <dd class=
"description">Measurement value
</dd>
1783 <dt>custom_real
</dt>
1784 <dd class=
"description">Real value
</dd>
1785 <dt>custom_string
</dt>
1786 <dd class=
"description">String value
</dd>
1788 <h2 class=
"title"><a name=
"ENUMERATIONS">Constants
</a></h2>
1789 <h3 class=
"enumeration"><a name=
"ppd_conform_e">ppd_conform_e
</a></h3>
1790 <p class=
"description"></p>
1791 <h4 class=
"constants">Constants
</h4>
1793 <dt>PPD_CONFORM_RELAXED
</dt>
1794 <dd class=
"description">Relax whitespace and control char
</dd>
1795 <dt>PPD_CONFORM_STRICT
</dt>
1796 <dd class=
"description">Require strict conformance
</dd>
1798 <h3 class=
"enumeration"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cptype_e">ppd_cptype_e
</a></h3>
1799 <p class=
"description">Custom Parameter Type
</p>
1800 <h4 class=
"constants">Constants
</h4>
1802 <dt>PPD_CUSTOM_CURVE
</dt>
1803 <dd class=
"description">Curve value for f(x) = x^value
</dd>
1804 <dt>PPD_CUSTOM_INT
</dt>
1805 <dd class=
"description">Integer number value
</dd>
1806 <dt>PPD_CUSTOM_INVCURVE
</dt>
1807 <dd class=
"description">Curve value for f(x) = x^(
1/value)
</dd>
1808 <dt>PPD_CUSTOM_PASSCODE
</dt>
1809 <dd class=
"description">String of (hidden) numbers
</dd>
1810 <dt>PPD_CUSTOM_PASSWORD
</dt>
1811 <dd class=
"description">String of (hidden) characters
</dd>
1812 <dt>PPD_CUSTOM_POINTS
</dt>
1813 <dd class=
"description">Measurement value in points
</dd>
1814 <dt>PPD_CUSTOM_REAL
</dt>
1815 <dd class=
"description">Real number value
</dd>
1816 <dt>PPD_CUSTOM_STRING
</dt>
1817 <dd class=
"description">String of characters
</dd>
1819 <h3 class=
"enumeration"><a name=
"ppd_cs_e">ppd_cs_e
</a></h3>
1820 <p class=
"description">Colorspaces
</p>
1821 <h4 class=
"constants">Constants
</h4>
1823 <dt>PPD_CS_CMY
</dt>
1824 <dd class=
"description">CMY colorspace
</dd>
1825 <dt>PPD_CS_CMYK
</dt>
1826 <dd class=
"description">CMYK colorspace
</dd>
1827 <dt>PPD_CS_GRAY
</dt>
1828 <dd class=
"description">Grayscale colorspace
</dd>
1830 <dd class=
"description">DeviceN colorspace
</dd>
1831 <dt>PPD_CS_RGB
</dt>
1832 <dd class=
"description">RGB colorspace
</dd>
1833 <dt>PPD_CS_RGBK
</dt>
1834 <dd class=
"description">RGBK (K = gray) colorspace
</dd>
1836 <h3 class=
"enumeration"><a name=
"ppd_section_e">ppd_section_e
</a></h3>
1837 <p class=
"description">Order dependency sections
</p>
1838 <h4 class=
"constants">Constants
</h4>
1840 <dt>PPD_ORDER_ANY
</dt>
1841 <dd class=
"description">Option code can be anywhere in the file
</dd>
1842 <dt>PPD_ORDER_DOCUMENT
</dt>
1843 <dd class=
"description">... must be in the DocumentSetup section
</dd>
1844 <dt>PPD_ORDER_EXIT
</dt>
1845 <dd class=
"description">... must be sent prior to the document
</dd>
1846 <dt>PPD_ORDER_JCL
</dt>
1847 <dd class=
"description">... must be sent as a JCL command
</dd>
1848 <dt>PPD_ORDER_PAGE
</dt>
1849 <dd class=
"description">... must be in the PageSetup section
</dd>
1850 <dt>PPD_ORDER_PROLOG
</dt>
1851 <dd class=
"description">... must be in the Prolog section
</dd>
1853 <h3 class=
"enumeration"><a name=
"ppd_status_e">ppd_status_e
</a></h3>
1854 <p class=
"description">Types and structures...
</p>
1855 <h4 class=
"constants">Constants
</h4>
1857 <dt>PPD_ALLOC_ERROR
</dt>
1858 <dd class=
"description">Memory allocation error
</dd>
1859 <dt>PPD_BAD_CUSTOM_PARAM
</dt>
1860 <dd class=
"description">Bad custom parameter
</dd>
1861 <dt>PPD_BAD_OPEN_GROUP
</dt>
1862 <dd class=
"description">Bad OpenGroup
</dd>
1863 <dt>PPD_BAD_OPEN_UI
</dt>
1864 <dd class=
"description">Bad OpenUI/JCLOpenUI
</dd>
1865 <dt>PPD_BAD_ORDER_DEPENDENCY
</dt>
1866 <dd class=
"description">Bad OrderDependency
</dd>
1867 <dt>PPD_BAD_UI_CONSTRAINTS
</dt>
1868 <dd class=
"description">Bad UIConstraints
</dd>
1869 <dt>PPD_FILE_OPEN_ERROR
</dt>
1870 <dd class=
"description">Unable to open PPD file
</dd>
1871 <dt>PPD_ILLEGAL_CHARACTER
</dt>
1872 <dd class=
"description">Illegal control character
</dd>
1873 <dt>PPD_ILLEGAL_MAIN_KEYWORD
</dt>
1874 <dd class=
"description">Illegal main keyword string
</dd>
1875 <dt>PPD_ILLEGAL_OPTION_KEYWORD
</dt>
1876 <dd class=
"description">Illegal option keyword string
</dd>
1877 <dt>PPD_ILLEGAL_TRANSLATION
</dt>
1878 <dd class=
"description">Illegal translation string
</dd>
1879 <dt>PPD_ILLEGAL_WHITESPACE
</dt>
1880 <dd class=
"description">Illegal whitespace character
</dd>
1881 <dt>PPD_INTERNAL_ERROR
</dt>
1882 <dd class=
"description">Internal error
</dd>
1883 <dt>PPD_LINE_TOO_LONG
</dt>
1884 <dd class=
"description">Line longer than
255 chars
</dd>
1885 <dt>PPD_MISSING_ASTERISK
</dt>
1886 <dd class=
"description">Missing asterisk in column
0</dd>
1887 <dt>PPD_MISSING_PPDADOBE4
</dt>
1888 <dd class=
"description">Missing PPD-Adobe-
4.x header
</dd>
1889 <dt>PPD_MISSING_VALUE
</dt>
1890 <dd class=
"description">Missing value string
</dd>
1891 <dt>PPD_NESTED_OPEN_GROUP
</dt>
1892 <dd class=
"description">OpenGroup without a CloseGroup first
</dd>
1893 <dt>PPD_NESTED_OPEN_UI
</dt>
1894 <dd class=
"description">OpenUI/JCLOpenUI without a CloseUI/JCLCloseUI first
</dd>
1895 <dt>PPD_NULL_FILE
</dt>
1896 <dd class=
"description">NULL PPD file pointer
</dd>
1898 <dd class=
"description">OK
</dd>
1900 <h3 class=
"enumeration"><a name=
"ppd_ui_e">ppd_ui_e
</a></h3>
1901 <p class=
"description">UI Types
</p>
1902 <h4 class=
"constants">Constants
</h4>
1904 <dt>PPD_UI_BOOLEAN
</dt>
1905 <dd class=
"description">True or False option
</dd>
1906 <dt>PPD_UI_PICKMANY
</dt>
1907 <dd class=
"description">Pick zero or more from a list
</dd>
1908 <dt>PPD_UI_PICKONE
</dt>
1909 <dd class=
"description">Pick one from a list
</dd>