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 7616 2008-05-28 00:34:13Z mike $"
258 PPD API header for the Common UNIX Printing System (CUPS).
260 Copyright 2008 by Apple Inc.
262 These coded instructions, statements, and computer programs are the
263 property of Apple Inc. and are protected by Federal copyright
264 law. Distribution and use rights are outlined in the file "LICENSE.txt"
265 which should have been included with this file. If this file is
266 file is missing or damaged, see the license at "http://www.cups.org/".
269 <h1 class=
"title">PPD API
</h1>
271 <div class='summary'
><table summary='General Information'
>
285 <td>Programming:
<a href='api-overview.html' target='_top'
>Introduction to CUPS Programming
</a><br>
286 Programming:
<a href='api-cups.html' target='_top'
>CUPS API
</a><br>
287 Specifications:
<a href='spec-ppd.html' target='_top'
>CUPS PPD Extensions
</a></td>
291 <h2 class=
"title">Contents
</h2>
292 <ul class=
"contents">
294 <li><a href=
"#OVERVIEW">Overview
</a><ul class=
"subcontents">
295 <li><a href=
"#LOADING">Loading a PPD File
</a></li>
296 <li><a href=
"#OPTIONS_AND_GROUPS">Options and Groups
</a></li>
297 <li><a href=
"#CONSTRAINTS">Constraints
</a></li>
298 <li><a href=
"#PAGE_SIZES">Page Sizes
</a></li>
299 <li><a href=
"#ATTRIBUTES">Attributes
</a></li>
301 <li><a href=
"#FUNCTIONS">Functions
</a><ul class=
"code">
302 <li><a href=
"#cupsMarkOptions" title=
"Mark command-line options in a PPD file.">cupsMarkOptions
</a></li>
303 <li><a href=
"#cupsResolveConflicts" title=
"Resolve conflicts in a marked PPD.">cupsResolveConflicts
</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=
"#ppdInstallableConflict" title=
"Test whether an option choice conflicts with
328 an installable option.">ppdInstallableConflict
</a></li>
329 <li><a href=
"#ppdIsMarked" title=
"Check to see if an option is marked.">ppdIsMarked
</a></li>
330 <li><a href=
"#ppdLastError" title=
"Return the status from the last ppdOpen*().">ppdLastError
</a></li>
331 <li><a href=
"#ppdLocalize" title=
"Localize the PPD file to the current locale.">ppdLocalize
</a></li>
332 <li><a href=
"#ppdLocalizeAttr" title=
"Localize an attribute.">ppdLocalizeAttr
</a></li>
333 <li><a href=
"#ppdLocalizeIPPReason" title=
"Get the localized version of a cupsIPPReason
334 attribute.">ppdLocalizeIPPReason
</a></li>
335 <li><a href=
"#ppdLocalizeMarkerName" title=
"Get the localized version of a marker-names
336 attribute value.">ppdLocalizeMarkerName
</a></li>
337 <li><a href=
"#ppdMarkDefaults" title=
"Mark all default options in the PPD file.">ppdMarkDefaults
</a></li>
338 <li><a href=
"#ppdMarkOption" title=
"Mark an option in a PPD file and return the number of
339 conflicts.">ppdMarkOption
</a></li>
340 <li><a href=
"#ppdNextCustomParam" title=
"Return the next parameter for a custom option.">ppdNextCustomParam
</a></li>
341 <li><a href=
"#ppdNextOption" title=
"Return the next option in the PPD file.">ppdNextOption
</a></li>
342 <li><a href=
"#ppdOpen" title=
"Read a PPD file into memory.">ppdOpen
</a></li>
343 <li><a href=
"#ppdOpen2" title=
"Read a PPD file into memory.">ppdOpen2
</a></li>
344 <li><a href=
"#ppdOpenFd" title=
"Read a PPD file into memory.">ppdOpenFd
</a></li>
345 <li><a href=
"#ppdOpenFile" title=
"Read a PPD file into memory.">ppdOpenFile
</a></li>
346 <li><a href=
"#ppdPageLength" title=
"Get the page length for the given size.">ppdPageLength
</a></li>
347 <li><a href=
"#ppdPageSize" title=
"Get the page size record for the given size.">ppdPageSize
</a></li>
348 <li><a href=
"#ppdPageSizeLimits" title=
"Return the custom page size limits.">ppdPageSizeLimits
</a></li>
349 <li><a href=
"#ppdPageWidth" title=
"Get the page width for the given size.">ppdPageWidth
</a></li>
350 <li><a href=
"#ppdSetConformance" title=
"Set the conformance level for PPD files.">ppdSetConformance
</a></li>
352 <li><a href=
"#TYPES">Data Types
</a><ul class=
"code">
353 <li><a href=
"#ppd_attr_t" title=
"PPD Attribute Structure ">ppd_attr_t
</a></li>
354 <li><a href=
"#ppd_choice_t" title=
"Option choices">ppd_choice_t
</a></li>
355 <li><a href=
"#ppd_conform_t" title=
"Conformance Levels ">ppd_conform_t
</a></li>
356 <li><a href=
"#ppd_const_t" title=
"Constraints">ppd_const_t
</a></li>
357 <li><a href=
"#ppd_coption_t" title=
"Custom Option ">ppd_coption_t
</a></li>
358 <li><a href=
"#ppd_cparam_t" title=
"Custom Parameter ">ppd_cparam_t
</a></li>
359 <li><a href=
"#ppd_cplimit_t" title=
"Custom Parameter Limit ">ppd_cplimit_t
</a></li>
360 <li><a href=
"#ppd_cptype_t" title=
"Custom Parameter Type ">ppd_cptype_t
</a></li>
361 <li><a href=
"#ppd_cpvalue_t" title=
"Custom Parameter Value ">ppd_cpvalue_t
</a></li>
362 <li><a href=
"#ppd_cs_t" title=
"Colorspaces">ppd_cs_t
</a></li>
363 <li><a href=
"#ppd_emul_t" title=
"Emulators">ppd_emul_t
</a></li>
364 <li><a href=
"#ppd_file_t" title=
"PPD File">ppd_file_t
</a></li>
365 <li><a href=
"#ppd_group_t" title=
"Groups">ppd_group_t
</a></li>
366 <li><a href=
"#ppd_option_t" title=
"Options">ppd_option_t
</a></li>
367 <li><a href=
"#ppd_profile_t" title=
"sRGB Color Profiles">ppd_profile_t
</a></li>
368 <li><a href=
"#ppd_section_t" title=
"Order dependency sections">ppd_section_t
</a></li>
369 <li><a href=
"#ppd_size_t" title=
"Page Sizes">ppd_size_t
</a></li>
370 <li><a href=
"#ppd_status_t" title=
"Types and structures...">ppd_status_t
</a></li>
371 <li><a href=
"#ppd_ui_t" title=
"UI Types">ppd_ui_t
</a></li>
373 <li><a href=
"#STRUCTURES">Structures
</a><ul class=
"code">
374 <li><a href=
"#ppd_attr_s" title=
"PPD Attribute Structure ">ppd_attr_s
</a></li>
375 <li><a href=
"#ppd_choice_s" title=
"Option choices">ppd_choice_s
</a></li>
376 <li><a href=
"#ppd_const_s" title=
"Constraints">ppd_const_s
</a></li>
377 <li><a href=
"#ppd_coption_s" title=
"Custom Option ">ppd_coption_s
</a></li>
378 <li><a href=
"#ppd_cparam_s" title=
"Custom Parameter ">ppd_cparam_s
</a></li>
379 <li><a href=
"#ppd_emul_s" title=
"Emulators">ppd_emul_s
</a></li>
380 <li><a href=
"#ppd_file_s" title=
"PPD File">ppd_file_s
</a></li>
381 <li><a href=
"#ppd_group_s" title=
"Groups">ppd_group_s
</a></li>
382 <li><a href=
"#ppd_option_s" title=
"Options">ppd_option_s
</a></li>
383 <li><a href=
"#ppd_profile_s" title=
"sRGB Color Profiles">ppd_profile_s
</a></li>
384 <li><a href=
"#ppd_size_s" title=
"Page Sizes">ppd_size_s
</a></li>
386 <li><a href=
"#UNIONS">Unions
</a><ul class=
"code">
387 <li><a href=
"#ppd_cplimit_u" title=
"Custom Parameter Limit ">ppd_cplimit_u
</a></li>
388 <li><a href=
"#ppd_cpvalue_u" title=
"Custom Parameter Value ">ppd_cpvalue_u
</a></li>
390 <li><a href=
"#ENUMERATIONS">Constants
</a><ul class=
"code">
391 <li><a href=
"#ppd_conform_e" title=
"">ppd_conform_e
</a></li>
392 <li><a href=
"#ppd_cptype_e" title=
"Custom Parameter Type ">ppd_cptype_e
</a></li>
393 <li><a href=
"#ppd_cs_e" title=
"Colorspaces">ppd_cs_e
</a></li>
394 <li><a href=
"#ppd_section_e" title=
"Order dependency sections">ppd_section_e
</a></li>
395 <li><a href=
"#ppd_status_e" title=
"Types and structures...">ppd_status_e
</a></li>
396 <li><a href=
"#ppd_ui_e" title=
"UI Types">ppd_ui_e
</a></li>
400 "$Id: api-ppd.shtml 7616 2008-05-28 00:34:13Z mike $"
402 PPD API introduction for the Common UNIX Printing System (CUPS).
404 Copyright 2007-2008 by Apple Inc.
405 Copyright 1997-2006 by Easy Software Products, all rights reserved.
407 These coded instructions, statements, and computer programs are the
408 property of Apple Inc. and are protected by Federal copyright
409 law. Distribution and use rights are outlined in the file "LICENSE.txt"
410 which should have been included with this file. If this file is
411 file is missing or damaged, see the license at "http://www.cups.org/".
414 <h2 class='title'
><a name='OVERVIEW'
>Overview
</a></h2>
416 <p>The CUPS PPD API provides read-only access the data in PostScript Printer
417 Description (
"PPD") files which are used for all printers with a driver. With
418 it you can obtain the data necessary to display printer options to users, mark
419 option choices and check for conflicting choices, and output marked choices in
420 PostScript output. The
<a href=
"#ppd_file_t"><code>ppd_file_t
</code></a>
421 structure contains all of the information in a PPD file.
</p>
423 <blockquote><b>Note:
</b>
425 <p>The CUPS PPD API uses the terms
"option" and
"choice" instead of the Adobe
426 terms
"MainKeyword" and
"OptionKeyword" to refer to specific printer options and
427 features. CUPS also treats option (
"MainKeyword") and choice (
"OptionKeyword")
428 values as case-insensitive strings, so option
"InputSlot" and choice
"Upper"
429 are equivalent to
"inputslot" and
"upper", respectively.
</p>
432 <h3><a name=
"LOADING">Loading a PPD File
</a></h3>
434 <p>The
<a href=
"#ppdOpenFile"><code>ppdOpenFile
</code></a> function
"opens" a
435 PPD file and loads it into memory. For example, the following code opens the
436 current printer's PPD file in a CUPS filter:
</p>
438 <pre class=
"example">
439 #include
<cups/ppd.h
>
441 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd =
<a href=
"#ppdOpenFile">ppdOpenFile
</a>(getenv(
"PPD"));
444 <p>The return value is a pointer to a new
445 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure or
<code>NULL
</code>
446 if the PPD file does not exist or cannot be loaded. The
447 <a href=
"#ppdClose"><code>ppdClose
</code></a> function frees the memory used
448 by the structure:
</p>
450 <pre class=
"example">
451 #include
<cups/ppd.h
>
453 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
455 <a href=
"#ppdClose">ppdClose
</a>(ppd);
458 <p>Once closed, pointers to the
<a href=
"#ppd_file_t"><code>ppd_file_t
</code></a>
459 structure and any data in it will no longer be valid.
</p>
461 <h3><a name=
"OPTIONS_AND_GROUPS">Options and Groups
</a></h3>
463 <p>PPD files support multiple options, which are stored in arrays of
464 <a href=
"#ppd_option_t"><code>ppd_option_t
</code></a> and
465 <a href=
"#ppd_choice_t"><code>ppd_choice_t
</code></a> structures.
</p>
467 <p>Each option in turn is associated with a group stored in a
468 <a href=
"#ppd_group_t"><code>ppd_group_t
</code></a> structure. Groups can be
469 specified in the PPD file; if an option is not associated with a group
470 then it is put in an automatically-generated
"General" group. Groups can also
471 have sub-groups, however CUPS currently ignores sub-groups because of past
472 abuses of this functionality.
</p>
474 <p>Option choices are selected by marking them using one of three functions. The
475 first is
<a href=
"#ppdMarkDefaults"><code>ppdMarkDefaults
</code></a> which
476 selects all of the default options in the PPD file:
</p>
478 <pre class=
"example">
479 #include
<cups/ppd.h
>
481 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
483 <a href=
"#ppdMarkDefaults">ppdMarkDefaults
</a>(ppd);
486 <p>The second is
<a href=
"#ppdMarkOption"><code>ppdMarkOption
</code></a>
487 which selects a single option choice in the PPD file. For example, the following
488 code selects the upper paper tray:
</p>
490 <pre class=
"example">
491 #include
<cups/ppd.h
>
493 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
495 <a href=
"#ppdMarkOption">ppdMarkOption
</a>(ppd,
"InputSlot",
"Upper");
498 <p>The last function is
499 <a href=
"#cupsMarkOptions"><code>cupsMarkOptions
</code></a> which selects
500 multiple option choices in the PPD file from an array of CUPS options, mapping
501 IPP attributes like
"media" and
"sides" to their corresponding PPD options. You
502 typically use this function in a print filter with
503 <code>cupsParseOptions
</code> and
504 <a href=
"#ppdMarkDefaults"><code>ppdMarkDefaults
</code></a> to select all of
505 the option choices needed for the job, for example:
</p>
507 <pre class=
"example">
508 #include
<cups/ppd.h
>
510 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd =
<a href=
"#ppdOpenFile">ppdOpenFile
</a>(getenv(
"PPD"));
511 cups_option_t *options = NULL;
512 int num_options = cupsParseOptions(argv[
5],
0,
&options);
514 <a href=
"#ppdMarkDefaults">ppdMarkDefaults
</a>(ppd);
515 <a href=
"#cupsMarkOptions">cupsMarkOptions
</a>(ppd, num_options, options);
516 cupsFreeOptions(num_options, options);
519 <h3><a name=
"CONSTRAINTS">Constraints
</a></h3>
521 <p>PPD files support specification of conflict conditions, called
522 constraints, between different options. Constraints are stored in an array of
523 <a href=
"#ppd_const_t"><code>ppd_const_t
</code></a> structures which specify
524 the options and choices that conflict with each other. The
525 <a href=
"#ppdConflicts"><code>ppdConflicts
</code></a> function tells you
526 how many of the selected options are incompatible. Since constraints are
527 normally specified in pairs, the returned value is typically an even number.
</p>
529 <h3><a name=
"PAGE_SIZES">Page Sizes
</a></h3>
531 <p>Page sizes are special options which have physical dimensions and margins
532 associated with them. The size information is stored in
533 <a href=
"#ppd_size_t"><code>ppd_size_t
</code></a> structures and is available
534 by looking up the named size with the
535 <a href=
"#ppdPageSize"><code>ppdPageSize
</code></a> function. The page size and
536 margins are returned in units called points; there are
72 points per inch. If
537 you pass
<code>NULL
</code> for the size, the currently selected size is
540 <pre class=
"example">
541 #include
<cups/ppd.h
>
543 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
544 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd, NULL);
547 <p>Besides the standard page sizes listed in a PPD file, some printers
548 support variable or custom page sizes. Custom page sizes are supported if the
549 <code>variables_sizes
</code> member of the
550 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure is non-zero.
551 The
<code>custom_min
</code>,
<code>custom_max
</code>, and
552 <code>custom_margins
</code> members of the
553 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure define the limits
554 of the printable area. To get the resulting media size, use a page size string
555 of the form
"Custom.<I>width</I>x<I>length</I>", where
"width" and
"length" are
556 in points. Custom page size names can also be specified in inches
557 (
"Custom.<i>width</i>x<i>height</i>in"), centimeters
558 (
"Custom.<i>width</i>x<i>height</i>cm"), or millimeters
559 (
"Custom.<i>width</i>x<i>height</i>mm"):
</p>
561 <pre class=
"example">
562 #include
<cups/ppd.h
>
564 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
566 /* Get an
576x720 point custom page size */
567 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.576x720");
569 /* Get an
8x10 inch custom page size */
570 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.8x10in");
572 /* Get a
100x200 millimeter custom page size */
573 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.100x200mm");
575 /* Get a
12.7x34.5 centimeter custom page size */
576 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.12.7x34.5cm");
579 <p>If the PPD does not support variable page sizes, the
580 <a href=
"#ppdPageSize"><code>ppdPageSize
</code></a> function will return
581 <code>NULL
</code>.
</p>
583 <h3><a name=
"ATTRIBUTES">Attributes
</a></h3>
585 <p>Every PPD file is composed of one or more attributes. Most of these
586 attributes are used to define groups, options, choices, and page sizes,
587 however several informational attributes may be present which you can access
588 in your program or filter. Attributes normally look like one of the following
589 examples in a PPD file:
</p>
591 <pre class=
"example">
594 *name spec/text:
"value"
597 <p>The
<a href=
"#ppdFindAttr"><code>ppdFindAttr
</code></a> and
598 <a href=
"#ppdFindNextAttr"><code>ppdFindNextAttr
</code></a> functions find the
599 first and next instances, respectively, of the named attribute with the given
600 "spec" string and return a
<a href=
"#ppd_attr_t"><code>ppd_attr_t
</code></a>
601 structure. If you provide a NULL specifier string, all attributes with the
602 given name will be returned. For example, the following code lists all of the
603 <code>Product
</code> attributes in a PPD file:
</p>
605 <pre class=
"example">
606 #include
<cups/ppd.h
>
608 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
609 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *attr;
611 for (attr =
<a href=
"#ppdFindAttr">ppdFindAttr
</a>(ppd,
"Product", NULL);
613 attr =
<a href=
"#ppdFindNextAttr">ppdFindNextAttr
</a>(ppd,
"Product", NULL))
616 <h2 class=
"title"><a name=
"FUNCTIONS">Functions
</a></h2>
617 <h3 class=
"function"><a name=
"cupsMarkOptions">cupsMarkOptions
</a></h3>
618 <p class=
"description">Mark command-line options in a PPD file.
</p>
620 int cupsMarkOptions (
<br>
621 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
622 int num_options,
<br>
623 cups_option_t *options
<br>
625 <h4 class=
"parameters">Parameters
</h4>
628 <dd class=
"description">PPD file
</dd>
630 <dd class=
"description">Number of options
</dd>
632 <dd class=
"description">Options
</dd>
634 <h4 class=
"returnvalue">Return Value
</h4>
635 <p class=
"description">1 if conflicts exist,
0 otherwise
</p>
636 <h4 class=
"discussion">Discussion
</h4>
637 <p class=
"discussion">This function maps the IPP
"finishings
",
"media
",
"mirror
",
638 "multiple-document-handling
",
"output-bin
",
"printer-resolution
", and
639 "sides
" attributes to their corresponding PPD options and choices.
</p>
640 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"cupsResolveConflicts">cupsResolveConflicts
</a></h3>
641 <p class=
"description">Resolve conflicts in a marked PPD.
</p>
643 int cupsResolveConflicts (
<br>
644 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
645 const char *option,
<br>
646 const char *choice,
<br>
647 int *num_options,
<br>
648 cups_option_t **options
<br>
650 <h4 class=
"parameters">Parameters
</h4>
653 <dd class=
"description">PPD file
</dd>
655 <dd class=
"description">Newly selected option or
<code>NULL
</code> for none
</dd>
657 <dd class=
"description">Newly selected choice or
<code>NULL
</code> for none
</dd>
659 <dd class=
"description">Number of additional selected options
</dd>
661 <dd class=
"description">Additional selected options
</dd>
663 <h4 class=
"returnvalue">Return Value
</h4>
664 <p class=
"description">1 on success,
0 on failure
</p>
665 <h4 class=
"discussion">Discussion
</h4>
666 <p class=
"discussion">This function attempts to resolve any conflicts in a marked PPD, returning
667 a list of option changes that are required to resolve them. On input,
668 "num_options
" and
"options
" contain any pending option changes that have
669 not yet been marked, while
"option
" and
"choice
" contain the most recent
670 selection which may or may not be in
"num_options
" or
"options
".
<br>
672 On successful return,
"num_options
" and
"options
" are updated to contain
673 "option
" and
"choice
" along with any changes required to resolve conflicts
674 specified in the PPD file and
1 is returned.
<br>
676 If option conflicts cannot be resolved,
"num_options
" and
"options
" are not
677 changed and
0 is returned.
<br>
679 When resolving conflicts,
<code>cupsResolveConflicts
</code> does not consider
680 changes to the current page size (
<code>media
</code>,
<code>PageSize
</code>, and
681 <code>PageRegion
</code>) or to the most recent option specified in
"option
".
682 Thus, if the only way to resolve a conflict is to change the page size
683 or the option the user most recently changed,
<code>cupsResolveConflicts
</code>
684 will return
0 to indicate it was unable to resolve the conflicts.
<br>
686 The
<code>cupsResolveConflicts
</code> function uses one of two sources of option
687 constraint information. The preferred constraint information is defined by
688 <code>cupsUIConstraints
</code> and
<code>cupsUIResolver
</code> attributes - in this
689 case, the PPD file provides constraint resolution actions.
<br>
691 The backup constraint information is defined by the
692 <code>UIConstraints
</code> and
<code>NonUIConstraints
</code> attributes. These
693 constraints are resolved algorithmically by first selecting the default
694 choice for the conflicting option, then iterating over all possible choices
695 until a non-conflicting option choice is found.
698 <h3 class=
"function"><a name=
"ppdClose">ppdClose
</a></h3>
699 <p class=
"description">Free all memory used by the PPD file.
</p>
702 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
704 <h4 class=
"parameters">Parameters
</h4>
707 <dd class=
"description">PPD file record
</dd>
709 <h3 class=
"function"><a name=
"ppdCollect">ppdCollect
</a></h3>
710 <p class=
"description">Collect all marked options that reside in the specified
714 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
715 <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br>
716 <a href=
"#ppd_choice_t">ppd_choice_t
</a> ***choices
<br>
718 <h4 class=
"parameters">Parameters
</h4>
721 <dd class=
"description">PPD file data
</dd>
723 <dd class=
"description">Section to collect
</dd>
725 <dd class=
"description">Pointers to choices
</dd>
727 <h4 class=
"returnvalue">Return Value
</h4>
728 <p class=
"description">Number of options marked
</p>
729 <h4 class=
"discussion">Discussion
</h4>
730 <p class=
"discussion">The choices array should be freed using
<code>free
</code> when you are
731 finished with it.
</p>
732 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdCollect2">ppdCollect2
</a></h3>
733 <p class=
"description">Collect all marked options that reside in the
734 specified section and minimum order.
</p>
736 int ppdCollect2 (
<br>
737 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
738 <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br>
739 float min_order,
<br>
740 <a href=
"#ppd_choice_t">ppd_choice_t
</a> ***choices
<br>
742 <h4 class=
"parameters">Parameters
</h4>
745 <dd class=
"description">PPD file data
</dd>
747 <dd class=
"description">Section to collect
</dd>
749 <dd class=
"description">Minimum OrderDependency value
</dd>
751 <dd class=
"description">Pointers to choices
</dd>
753 <h4 class=
"returnvalue">Return Value
</h4>
754 <p class=
"description">Number of options marked
</p>
755 <h4 class=
"discussion">Discussion
</h4>
756 <p class=
"discussion">The choices array should be freed using
<code>free
</code> when you are
760 <h3 class=
"function"><a name=
"ppdConflicts">ppdConflicts
</a></h3>
761 <p class=
"description">Check to see if there are any conflicts among the
762 marked option choices.
</p>
764 int ppdConflicts (
<br>
765 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
767 <h4 class=
"parameters">Parameters
</h4>
770 <dd class=
"description">PPD to check
</dd>
772 <h4 class=
"returnvalue">Return Value
</h4>
773 <p class=
"description">Number of conflicts found
</p>
774 <h4 class=
"discussion">Discussion
</h4>
775 <p class=
"discussion">The returned value is the same as returned by
<a href=
"#ppdMarkOption"><code>ppdMarkOption
</code></a>.
</p>
776 <h3 class=
"function"><a name=
"ppdEmit">ppdEmit
</a></h3>
777 <p class=
"description">Emit code for marked options to a file.
</p>
780 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
781 FILE *fp,
<br>
782 <a href=
"#ppd_section_t">ppd_section_t
</a> section
<br>
784 <h4 class=
"parameters">Parameters
</h4>
787 <dd class=
"description">PPD file record
</dd>
789 <dd class=
"description">File to write to
</dd>
791 <dd class=
"description">Section to write
</dd>
793 <h4 class=
"returnvalue">Return Value
</h4>
794 <p class=
"description">0 on success, -
1 on failure
</p>
795 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdEmitAfterOrder">ppdEmitAfterOrder
</a></h3>
796 <p class=
"description">Emit a subset of the code for marked options to a file.
</p>
798 int ppdEmitAfterOrder (
<br>
799 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
800 FILE *fp,
<br>
801 <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br>
802 int limit,
<br>
803 float min_order
<br>
805 <h4 class=
"parameters">Parameters
</h4>
808 <dd class=
"description">PPD file record
</dd>
810 <dd class=
"description">File to write to
</dd>
812 <dd class=
"description">Section to write
</dd>
814 <dd class=
"description">Non-zero to use min_order
</dd>
816 <dd class=
"description">Lowest OrderDependency
</dd>
818 <h4 class=
"returnvalue">Return Value
</h4>
819 <p class=
"description">0 on success, -
1 on failure
</p>
820 <h4 class=
"discussion">Discussion
</h4>
821 <p class=
"discussion">When
"limit
" is non-zero, this function only emits options whose
822 OrderDependency value is greater than or equal to
"min_order
".
<br>
824 When
"limit
" is zero, this function is identical to ppdEmit().
827 <h3 class=
"function"><a name=
"ppdEmitFd">ppdEmitFd
</a></h3>
828 <p class=
"description">Emit code for marked options to a file.
</p>
831 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
832 int fd,
<br>
833 <a href=
"#ppd_section_t">ppd_section_t
</a> section
<br>
835 <h4 class=
"parameters">Parameters
</h4>
838 <dd class=
"description">PPD file record
</dd>
840 <dd class=
"description">File to write to
</dd>
842 <dd class=
"description">Section to write
</dd>
844 <h4 class=
"returnvalue">Return Value
</h4>
845 <p class=
"description">0 on success, -
1 on failure
</p>
846 <h3 class=
"function"><a name=
"ppdEmitJCL">ppdEmitJCL
</a></h3>
847 <p class=
"description">Emit code for JCL options to a file.
</p>
850 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
851 FILE *fp,
<br>
852 int job_id,
<br>
853 const char *user,
<br>
854 const char *title
<br>
856 <h4 class=
"parameters">Parameters
</h4>
859 <dd class=
"description">PPD file record
</dd>
861 <dd class=
"description">File to write to
</dd>
863 <dd class=
"description">Job ID
</dd>
865 <dd class=
"description">Username
</dd>
867 <dd class=
"description">Title
</dd>
869 <h4 class=
"returnvalue">Return Value
</h4>
870 <p class=
"description">0 on success, -
1 on failure
</p>
871 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdEmitJCLEnd">ppdEmitJCLEnd
</a></h3>
872 <p class=
"description">Emit JCLEnd code to a file.
</p>
874 int ppdEmitJCLEnd (
<br>
875 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
876 FILE *fp
<br>
878 <h4 class=
"parameters">Parameters
</h4>
881 <dd class=
"description">PPD file record
</dd>
883 <dd class=
"description">File to write to
</dd>
885 <h4 class=
"returnvalue">Return Value
</h4>
886 <p class=
"description">0 on success, -
1 on failure
</p>
887 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdEmitString">ppdEmitString
</a></h3>
888 <p class=
"description">Get a string containing the code for marked options.
</p>
890 char *ppdEmitString (
<br>
891 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
892 <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br>
893 float min_order
<br>
895 <h4 class=
"parameters">Parameters
</h4>
898 <dd class=
"description">PPD file record
</dd>
900 <dd class=
"description">Section to write
</dd>
902 <dd class=
"description">Lowest OrderDependency
</dd>
904 <h4 class=
"returnvalue">Return Value
</h4>
905 <p class=
"description">String containing option code or
<code>NULL
</code> if there is no option code
</p>
906 <h4 class=
"discussion">Discussion
</h4>
907 <p class=
"discussion">When
"min_order
" is greater than zero, this function only includes options
908 whose OrderDependency value is greater than or equal to
"min_order
".
909 Otherwise, all options in the specified section are included in the
912 The return string is allocated on the heap and should be freed using
913 <code>free
</code> when you are done with it.
916 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppdErrorString">ppdErrorString
</a></h3>
917 <p class=
"description">Returns the text assocated with a status.
</p>
919 const char *ppdErrorString (
<br>
920 <a href=
"#ppd_status_t">ppd_status_t
</a> status
<br>
922 <h4 class=
"parameters">Parameters
</h4>
925 <dd class=
"description">PPD status
</dd>
927 <h4 class=
"returnvalue">Return Value
</h4>
928 <p class=
"description">Status string
</p>
929 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppdFindAttr">ppdFindAttr
</a></h3>
930 <p class=
"description">Find the first matching attribute.
</p>
932 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *ppdFindAttr (
<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=
"ppdFindChoice">ppdFindChoice
</a></h3>
949 <p class=
"description">Return a pointer to an option choice.
</p>
951 <a href=
"#ppd_choice_t">ppd_choice_t
</a> *ppdFindChoice (
<br>
952 <a href=
"#ppd_option_t">ppd_option_t
</a> *o,
<br>
953 const char *choice
<br>
955 <h4 class=
"parameters">Parameters
</h4>
958 <dd class=
"description">Pointer to option
</dd>
960 <dd class=
"description">Name of choice
</dd>
962 <h4 class=
"returnvalue">Return Value
</h4>
963 <p class=
"description">Choice pointer or
<code>NULL
</code></p>
964 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdFindCustomOption">ppdFindCustomOption
</a></h3>
965 <p class=
"description">Find a custom option.
</p>
967 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *ppdFindCustomOption (
<br>
968 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
969 const char *keyword
<br>
971 <h4 class=
"parameters">Parameters
</h4>
974 <dd class=
"description">PPD file
</dd>
976 <dd class=
"description">Custom option name
</dd>
978 <h4 class=
"returnvalue">Return Value
</h4>
979 <p class=
"description">Custom option or NULL
</p>
980 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdFindCustomParam">ppdFindCustomParam
</a></h3>
981 <p class=
"description">Find a parameter for a custom option.
</p>
983 <a href=
"#ppd_cparam_t">ppd_cparam_t
</a> *ppdFindCustomParam (
<br>
984 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *opt,
<br>
985 const char *name
<br>
987 <h4 class=
"parameters">Parameters
</h4>
990 <dd class=
"description">Custom option
</dd>
992 <dd class=
"description">Parameter name
</dd>
994 <h4 class=
"returnvalue">Return Value
</h4>
995 <p class=
"description">Custom parameter or NULL
</p>
996 <h3 class=
"function"><a name=
"ppdFindMarkedChoice">ppdFindMarkedChoice
</a></h3>
997 <p class=
"description">Return the marked choice for the specified option.
</p>
999 <a href=
"#ppd_choice_t">ppd_choice_t
</a> *ppdFindMarkedChoice (
<br>
1000 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1001 const char *option
<br>
1003 <h4 class=
"parameters">Parameters
</h4>
1006 <dd class=
"description">PPD file
</dd>
1008 <dd class=
"description">Keyword/option name
</dd>
1010 <h4 class=
"returnvalue">Return Value
</h4>
1011 <p class=
"description">Pointer to choice or
<code>NULL
</code></p>
1012 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppdFindNextAttr">ppdFindNextAttr
</a></h3>
1013 <p class=
"description">Find the next matching attribute.
</p>
1015 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *ppdFindNextAttr (
<br>
1016 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1017 const char *name,
<br>
1018 const char *spec
<br>
1020 <h4 class=
"parameters">Parameters
</h4>
1023 <dd class=
"description">PPD file data
</dd>
1025 <dd class=
"description">Attribute name
</dd>
1027 <dd class=
"description">Specifier string or
<code>NULL
</code></dd>
1029 <h4 class=
"returnvalue">Return Value
</h4>
1030 <p class=
"description">Attribute or
<code>NULL
</code> if not found
</p>
1031 <h3 class=
"function"><a name=
"ppdFindOption">ppdFindOption
</a></h3>
1032 <p class=
"description">Return a pointer to the specified option.
</p>
1034 <a href=
"#ppd_option_t">ppd_option_t
</a> *ppdFindOption (
<br>
1035 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1036 const char *option
<br>
1038 <h4 class=
"parameters">Parameters
</h4>
1041 <dd class=
"description">PPD file data
</dd>
1043 <dd class=
"description">Option/Keyword name
</dd>
1045 <h4 class=
"returnvalue">Return Value
</h4>
1046 <p class=
"description">Pointer to option or
<code>NULL
</code></p>
1047 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdFirstCustomParam">ppdFirstCustomParam
</a></h3>
1048 <p class=
"description">Return the first parameter for a custom option.
</p>
1050 <a href=
"#ppd_cparam_t">ppd_cparam_t
</a> *ppdFirstCustomParam (
<br>
1051 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *opt
<br>
1053 <h4 class=
"parameters">Parameters
</h4>
1056 <dd class=
"description">Custom option
</dd>
1058 <h4 class=
"returnvalue">Return Value
</h4>
1059 <p class=
"description">Custom parameter or NULL
</p>
1060 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdFirstOption">ppdFirstOption
</a></h3>
1061 <p class=
"description">Return the first option in the PPD file.
</p>
1063 <a href=
"#ppd_option_t">ppd_option_t
</a> *ppdFirstOption (
<br>
1064 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
1066 <h4 class=
"parameters">Parameters
</h4>
1069 <dd class=
"description">PPD file
</dd>
1071 <h4 class=
"returnvalue">Return Value
</h4>
1072 <p class=
"description">First option or
<code>NULL
</code></p>
1073 <h4 class=
"discussion">Discussion
</h4>
1074 <p class=
"discussion">Options are returned from all groups in ascending alphanumeric order.
1077 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"ppdInstallableConflict">ppdInstallableConflict
</a></h3>
1078 <p class=
"description">Test whether an option choice conflicts with
1079 an installable option.
</p>
1081 int ppdInstallableConflict (
<br>
1082 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1083 const char *option,
<br>
1084 const char *choice
<br>
1086 <h4 class=
"parameters">Parameters
</h4>
1089 <dd class=
"description">PPD file
</dd>
1091 <dd class=
"description">Option
</dd>
1093 <dd class=
"description">Choice
</dd>
1095 <h4 class=
"returnvalue">Return Value
</h4>
1096 <p class=
"description">1 if conflicting,
0 if not conflicting
</p>
1097 <h4 class=
"discussion">Discussion
</h4>
1098 <p class=
"discussion">This function tests whether a particular option choice is available based
1099 on constraints against options in the
"InstallableOptions
" group.
1102 <h3 class=
"function"><a name=
"ppdIsMarked">ppdIsMarked
</a></h3>
1103 <p class=
"description">Check to see if an option is marked.
</p>
1105 int ppdIsMarked (
<br>
1106 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1107 const char *option,
<br>
1108 const char *choice
<br>
1110 <h4 class=
"parameters">Parameters
</h4>
1113 <dd class=
"description">PPD file data
</dd>
1115 <dd class=
"description">Option/Keyword name
</dd>
1117 <dd class=
"description">Choice name
</dd>
1119 <h4 class=
"returnvalue">Return Value
</h4>
1120 <p class=
"description">Non-zero if option is marked
</p>
1121 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppdLastError">ppdLastError
</a></h3>
1122 <p class=
"description">Return the status from the last ppdOpen*().
</p>
1124 <a href=
"#ppd_status_t">ppd_status_t
</a> ppdLastError (
<br>
1125 int *line
<br>
1127 <h4 class=
"parameters">Parameters
</h4>
1130 <dd class=
"description">Line number
</dd>
1132 <h4 class=
"returnvalue">Return Value
</h4>
1133 <p class=
"description">Status code
</p>
1134 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdLocalize">ppdLocalize
</a></h3>
1135 <p class=
"description">Localize the PPD file to the current locale.
</p>
1137 int ppdLocalize (
<br>
1138 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
1140 <h4 class=
"parameters">Parameters
</h4>
1143 <dd class=
"description">PPD file
</dd>
1145 <h4 class=
"returnvalue">Return Value
</h4>
1146 <p class=
"description">0 on success, -
1 on error
</p>
1147 <h4 class=
"discussion">Discussion
</h4>
1148 <p class=
"discussion">All groups, options, and choices are localized, as are ICC profile
1149 descriptions, printer presets, and custom option parameters. Each
1150 localized string uses the UTF-
8 character encoding.
1153 <h3 class=
"function"><a name=
"ppdLocalizeAttr">ppdLocalizeAttr
</a></h3>
1154 <p class=
"description">Localize an attribute.
</p>
1156 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *ppdLocalizeAttr (
<br>
1157 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1158 const char *keyword,
<br>
1159 const char *spec
<br>
1161 <h4 class=
"parameters">Parameters
</h4>
1164 <dd class=
"description">PPD file
</dd>
1166 <dd class=
"description">Main keyword
</dd>
1168 <dd class=
"description">Option keyword or
<code>NULL
</code> for none
</dd>
1170 <h4 class=
"returnvalue">Return Value
</h4>
1171 <p class=
"description">Localized attribute or
<code>NULL
</code> if none exists
</p>
1172 <h4 class=
"discussion">Discussion
</h4>
1173 <p class=
"discussion">This function uses the current locale to find the localized attribute for
1174 the given main and option keywords. If no localized version of the
1175 attribute exists for the current locale, the unlocalized version is returned.
</p>
1176 <h3 class=
"function"><span class=
"info"> CUPS
1.3 </span><a name=
"ppdLocalizeIPPReason">ppdLocalizeIPPReason
</a></h3>
1177 <p class=
"description">Get the localized version of a cupsIPPReason
1180 const char *ppdLocalizeIPPReason (
<br>
1181 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1182 const char *reason,
<br>
1183 const char *scheme,
<br>
1184 char *buffer,
<br>
1185 size_t bufsize
<br>
1187 <h4 class=
"parameters">Parameters
</h4>
1190 <dd class=
"description">PPD file
</dd>
1192 <dd class=
"description">IPP reason keyword to look up
</dd>
1194 <dd class=
"description">URI scheme or NULL for text
</dd>
1196 <dd class=
"description">Value buffer
</dd>
1198 <dd class=
"description">Size of value buffer
</dd>
1200 <h4 class=
"returnvalue">Return Value
</h4>
1201 <p class=
"description">Value or NULL if not found
</p>
1202 <h4 class=
"discussion">Discussion
</h4>
1203 <p class=
"discussion">This function uses the current locale to find the corresponding reason
1204 text or URI from the attribute value. If
"scheme
" is NULL or
"text
",
1205 the returned value contains human-readable (UTF-
8) text from the translation
1206 string or attribute value. Otherwise the corresponding URI is returned.
<br>
1208 If no value of the requested scheme can be found, NULL is returned.
1211 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"ppdLocalizeMarkerName">ppdLocalizeMarkerName
</a></h3>
1212 <p class=
"description">Get the localized version of a marker-names
1213 attribute value.
</p>
1215 const char *ppdLocalizeMarkerName (
<br>
1216 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1217 const char *name
<br>
1219 <h4 class=
"parameters">Parameters
</h4>
1222 <dd class=
"description">PPD file
</dd>
1224 <dd class=
"description">Marker name to look up
</dd>
1226 <h4 class=
"returnvalue">Return Value
</h4>
1227 <p class=
"description">Value or
<code>NULL
</code> if not found
</p>
1228 <h4 class=
"discussion">Discussion
</h4>
1229 <p class=
"discussion">This function uses the current locale to find the corresponding name
1230 text from the attribute value. If no localized text for the requested
1231 name can be found,
<code>NULL
</code> is returned.
1234 <h3 class=
"function"><a name=
"ppdMarkDefaults">ppdMarkDefaults
</a></h3>
1235 <p class=
"description">Mark all default options in the PPD file.
</p>
1237 void ppdMarkDefaults (
<br>
1238 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
1240 <h4 class=
"parameters">Parameters
</h4>
1243 <dd class=
"description">PPD file record
</dd>
1245 <h3 class=
"function"><a name=
"ppdMarkOption">ppdMarkOption
</a></h3>
1246 <p class=
"description">Mark an option in a PPD file and return the number of
1249 int ppdMarkOption (
<br>
1250 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1251 const char *option,
<br>
1252 const char *choice
<br>
1254 <h4 class=
"parameters">Parameters
</h4>
1257 <dd class=
"description">PPD file record
</dd>
1259 <dd class=
"description">Keyword
</dd>
1261 <dd class=
"description">Option name
</dd>
1263 <h4 class=
"returnvalue">Return Value
</h4>
1264 <p class=
"description">Number of conflicts
</p>
1265 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdNextCustomParam">ppdNextCustomParam
</a></h3>
1266 <p class=
"description">Return the next parameter for a custom option.
</p>
1268 <a href=
"#ppd_cparam_t">ppd_cparam_t
</a> *ppdNextCustomParam (
<br>
1269 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *opt
<br>
1271 <h4 class=
"parameters">Parameters
</h4>
1274 <dd class=
"description">Custom option
</dd>
1276 <h4 class=
"returnvalue">Return Value
</h4>
1277 <p class=
"description">Custom parameter or NULL
</p>
1278 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdNextOption">ppdNextOption
</a></h3>
1279 <p class=
"description">Return the next option in the PPD file.
</p>
1281 <a href=
"#ppd_option_t">ppd_option_t
</a> *ppdNextOption (
<br>
1282 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
1284 <h4 class=
"parameters">Parameters
</h4>
1287 <dd class=
"description">PPD file
</dd>
1289 <h4 class=
"returnvalue">Return Value
</h4>
1290 <p class=
"description">Next option or
<code>NULL
</code></p>
1291 <h4 class=
"discussion">Discussion
</h4>
1292 <p class=
"discussion">Options are returned from all groups in ascending alphanumeric order.
1295 <h3 class=
"function"><a name=
"ppdOpen">ppdOpen
</a></h3>
1296 <p class=
"description">Read a PPD file into memory.
</p>
1298 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppdOpen (
<br>
1299 FILE *fp
<br>
1301 <h4 class=
"parameters">Parameters
</h4>
1304 <dd class=
"description">File to read from
</dd>
1306 <h4 class=
"returnvalue">Return Value
</h4>
1307 <p class=
"description">PPD file record
</p>
1308 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdOpen2">ppdOpen2
</a></h3>
1309 <p class=
"description">Read a PPD file into memory.
</p>
1311 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppdOpen2 (
<br>
1312 cups_file_t *fp
<br>
1314 <h4 class=
"parameters">Parameters
</h4>
1317 <dd class=
"description">File to read from
</dd>
1319 <h4 class=
"returnvalue">Return Value
</h4>
1320 <p class=
"description">PPD file record or
<code>NULL
</code> if the PPD file could not be opened.
</p>
1321 <h3 class=
"function"><a name=
"ppdOpenFd">ppdOpenFd
</a></h3>
1322 <p class=
"description">Read a PPD file into memory.
</p>
1324 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppdOpenFd (
<br>
1325 int fd
<br>
1327 <h4 class=
"parameters">Parameters
</h4>
1330 <dd class=
"description">File to read from
</dd>
1332 <h4 class=
"returnvalue">Return Value
</h4>
1333 <p class=
"description">PPD file record or
<code>NULL
</code> if the PPD file could not be opened.
</p>
1334 <h3 class=
"function"><a name=
"ppdOpenFile">ppdOpenFile
</a></h3>
1335 <p class=
"description">Read a PPD file into memory.
</p>
1337 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppdOpenFile (
<br>
1338 const char *filename
<br>
1340 <h4 class=
"parameters">Parameters
</h4>
1343 <dd class=
"description">File to read from
</dd>
1345 <h4 class=
"returnvalue">Return Value
</h4>
1346 <p class=
"description">PPD file record or
<code>NULL
</code> if the PPD file could not be opened.
</p>
1347 <h3 class=
"function"><a name=
"ppdPageLength">ppdPageLength
</a></h3>
1348 <p class=
"description">Get the page length for the given size.
</p>
1350 float ppdPageLength (
<br>
1351 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1352 const char *name
<br>
1354 <h4 class=
"parameters">Parameters
</h4>
1357 <dd class=
"description">PPD file
</dd>
1359 <dd class=
"description">Size name
</dd>
1361 <h4 class=
"returnvalue">Return Value
</h4>
1362 <p class=
"description">Length of page in points or
0.0</p>
1363 <h3 class=
"function"><a name=
"ppdPageSize">ppdPageSize
</a></h3>
1364 <p class=
"description">Get the page size record for the given size.
</p>
1366 <a href=
"#ppd_size_t">ppd_size_t
</a> *ppdPageSize (
<br>
1367 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1368 const char *name
<br>
1370 <h4 class=
"parameters">Parameters
</h4>
1373 <dd class=
"description">PPD file record
</dd>
1375 <dd class=
"description">Size name
</dd>
1377 <h4 class=
"returnvalue">Return Value
</h4>
1378 <p class=
"description">Size record for page or NULL
</p>
1379 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"ppdPageSizeLimits">ppdPageSizeLimits
</a></h3>
1380 <p class=
"description">Return the custom page size limits.
</p>
1382 int ppdPageSizeLimits (
<br>
1383 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1384 <a href=
"#ppd_size_t">ppd_size_t
</a> *minimum,
<br>
1385 <a href=
"#ppd_size_t">ppd_size_t
</a> *maximum
<br>
1387 <h4 class=
"parameters">Parameters
</h4>
1390 <dd class=
"description">PPD file record
</dd>
1392 <dd class=
"description">Minimum custom size
</dd>
1394 <dd class=
"description">Maximum custom size
</dd>
1396 <h4 class=
"returnvalue">Return Value
</h4>
1397 <p class=
"description">1 if custom sizes are supported,
0 otherwise
</p>
1398 <h4 class=
"discussion">Discussion
</h4>
1399 <p class=
"discussion">This function returns the minimum and maximum custom page sizes and printable
1400 areas based on the currently-marked (selected) options.
<br>
1402 If the specified PPD file does not support custom page sizes, both
1403 "minimum
" and
"maximum
" are filled with zeroes.
1406 <h3 class=
"function"><a name=
"ppdPageWidth">ppdPageWidth
</a></h3>
1407 <p class=
"description">Get the page width for the given size.
</p>
1409 float ppdPageWidth (
<br>
1410 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1411 const char *name
<br>
1413 <h4 class=
"parameters">Parameters
</h4>
1416 <dd class=
"description">PPD file record
</dd>
1418 <dd class=
"description">Size name
</dd>
1420 <h4 class=
"returnvalue">Return Value
</h4>
1421 <p class=
"description">Width of page in points or
0.0</p>
1422 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20 </span><a name=
"ppdSetConformance">ppdSetConformance
</a></h3>
1423 <p class=
"description">Set the conformance level for PPD files.
</p>
1425 void ppdSetConformance (
<br>
1426 <a href=
"#ppd_conform_t">ppd_conform_t
</a> c
<br>
1428 <h4 class=
"parameters">Parameters
</h4>
1431 <dd class=
"description">Conformance level
</dd>
1433 <h2 class=
"title"><a name=
"TYPES">Data Types
</a></h2>
1434 <h3 class=
"typedef"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppd_attr_t">ppd_attr_t
</a></h3>
1435 <p class=
"description">PPD Attribute Structure
</p>
1437 typedef struct
<a href=
"#ppd_attr_s">ppd_attr_s
</a> ppd_attr_t;
1439 <h3 class=
"typedef"><a name=
"ppd_choice_t">ppd_choice_t
</a></h3>
1440 <p class=
"description">Option choices
</p>
1442 typedef struct
<a href=
"#ppd_choice_s">ppd_choice_s
</a> ppd_choice_t;
1444 <h3 class=
"typedef"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppd_conform_t">ppd_conform_t
</a></h3>
1445 <p class=
"description">Conformance Levels
</p>
1447 typedef enum
<a href=
"#ppd_conform_e">ppd_conform_e
</a> ppd_conform_t;
1449 <h3 class=
"typedef"><a name=
"ppd_const_t">ppd_const_t
</a></h3>
1450 <p class=
"description">Constraints
</p>
1452 typedef struct
<a href=
"#ppd_const_s">ppd_const_s
</a> ppd_const_t;
1454 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_coption_t">ppd_coption_t
</a></h3>
1455 <p class=
"description">Custom Option
</p>
1457 typedef struct
<a href=
"#ppd_coption_s">ppd_coption_s
</a> ppd_coption_t;
1459 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cparam_t">ppd_cparam_t
</a></h3>
1460 <p class=
"description">Custom Parameter
</p>
1462 typedef struct
<a href=
"#ppd_cparam_s">ppd_cparam_s
</a> ppd_cparam_t;
1464 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cplimit_t">ppd_cplimit_t
</a></h3>
1465 <p class=
"description">Custom Parameter Limit
</p>
1467 typedef union
<a href=
"#ppd_cplimit_u">ppd_cplimit_u
</a> ppd_cplimit_t;
1469 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cptype_t">ppd_cptype_t
</a></h3>
1470 <p class=
"description">Custom Parameter Type
</p>
1472 typedef enum
<a href=
"#ppd_cptype_e">ppd_cptype_e
</a> ppd_cptype_t;
1474 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cpvalue_t">ppd_cpvalue_t
</a></h3>
1475 <p class=
"description">Custom Parameter Value
</p>
1477 typedef union
<a href=
"#ppd_cpvalue_u">ppd_cpvalue_u
</a> ppd_cpvalue_t;
1479 <h3 class=
"typedef"><a name=
"ppd_cs_t">ppd_cs_t
</a></h3>
1480 <p class=
"description">Colorspaces
</p>
1482 typedef enum
<a href=
"#ppd_cs_e">ppd_cs_e
</a> ppd_cs_t;
1484 <h3 class=
"typedef"><a name=
"ppd_emul_t">ppd_emul_t
</a></h3>
1485 <p class=
"description">Emulators
</p>
1487 typedef struct
<a href=
"#ppd_emul_s">ppd_emul_s
</a> ppd_emul_t;
1489 <h3 class=
"typedef"><a name=
"ppd_file_t">ppd_file_t
</a></h3>
1490 <p class=
"description">PPD File
</p>
1492 typedef struct
<a href=
"#ppd_file_s">ppd_file_s
</a> ppd_file_t;
1494 <h3 class=
"typedef"><a name=
"ppd_group_t">ppd_group_t
</a></h3>
1495 <p class=
"description">Groups
</p>
1497 typedef struct
<a href=
"#ppd_group_s">ppd_group_s
</a> ppd_group_t;
1499 <h3 class=
"typedef"><a name=
"ppd_option_t">ppd_option_t
</a></h3>
1500 <p class=
"description">Options
</p>
1502 typedef struct
<a href=
"#ppd_option_s">ppd_option_s
</a> ppd_option_t;
1504 <h3 class=
"typedef"><a name=
"ppd_profile_t">ppd_profile_t
</a></h3>
1505 <p class=
"description">sRGB Color Profiles
</p>
1507 typedef struct
<a href=
"#ppd_profile_s">ppd_profile_s
</a> ppd_profile_t;
1509 <h3 class=
"typedef"><a name=
"ppd_section_t">ppd_section_t
</a></h3>
1510 <p class=
"description">Order dependency sections
</p>
1512 typedef enum
<a href=
"#ppd_section_e">ppd_section_e
</a> ppd_section_t;
1514 <h3 class=
"typedef"><a name=
"ppd_size_t">ppd_size_t
</a></h3>
1515 <p class=
"description">Page Sizes
</p>
1517 typedef struct
<a href=
"#ppd_size_s">ppd_size_s
</a> ppd_size_t;
1519 <h3 class=
"typedef"><a name=
"ppd_status_t">ppd_status_t
</a></h3>
1520 <p class=
"description">Types and structures...
</p>
1522 typedef enum
<a href=
"#ppd_status_e">ppd_status_e
</a> ppd_status_t;
1524 <h3 class=
"typedef"><a name=
"ppd_ui_t">ppd_ui_t
</a></h3>
1525 <p class=
"description">UI Types
</p>
1527 typedef enum
<a href=
"#ppd_ui_e">ppd_ui_e
</a> ppd_ui_t;
1529 <h2 class=
"title"><a name=
"STRUCTURES">Structures
</a></h2>
1530 <h3 class=
"struct"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppd_attr_s">ppd_attr_s
</a></h3>
1531 <p class=
"description">PPD Attribute Structure
</p>
1532 <p class=
"code">struct ppd_attr_s {
<br>
1533 char name[PPD_MAX_NAME];
<br>
1534 char spec[PPD_MAX_NAME];
<br>
1535 char text[PPD_MAX_TEXT];
<br>
1536 char *value;
<br>
1538 <h4 class=
"members">Members
</h4>
1540 <dt>name[PPD_MAX_NAME]
</dt>
1541 <dd class=
"description">Name of attribute (cupsXYZ)
</dd>
1542 <dt>spec[PPD_MAX_NAME]
</dt>
1543 <dd class=
"description">Specifier string, if any
</dd>
1544 <dt>text[PPD_MAX_TEXT]
</dt>
1545 <dd class=
"description">Human-readable text, if any
</dd>
1547 <dd class=
"description">Value string
</dd>
1549 <h3 class=
"struct"><a name=
"ppd_choice_s">ppd_choice_s
</a></h3>
1550 <p class=
"description">Option choices
</p>
1551 <p class=
"code">struct ppd_choice_s {
<br>
1552 char choice[PPD_MAX_NAME];
<br>
1553 char *code;
<br>
1554 char marked;
<br>
1555 <a href=
"#ppd_option_t">ppd_option_t
</a> *option;
<br>
1556 char text[PPD_MAX_TEXT];
<br>
1558 <h4 class=
"members">Members
</h4>
1560 <dt>choice[PPD_MAX_NAME]
</dt>
1561 <dd class=
"description">Computer-readable option name
</dd>
1563 <dd class=
"description">Code to send for this option
</dd>
1565 <dd class=
"description">0 if not selected,
1 otherwise
</dd>
1567 <dd class=
"description">Pointer to parent option structure
</dd>
1568 <dt>text[PPD_MAX_TEXT]
</dt>
1569 <dd class=
"description">Human-readable option name
</dd>
1571 <h3 class=
"struct"><a name=
"ppd_const_s">ppd_const_s
</a></h3>
1572 <p class=
"description">Constraints
</p>
1573 <p class=
"code">struct ppd_const_s {
<br>
1574 char choice1[PPD_MAX_NAME];
<br>
1575 char choice2[PPD_MAX_NAME];
<br>
1576 char option1[PPD_MAX_NAME];
<br>
1577 char option2[PPD_MAX_NAME];
<br>
1579 <h4 class=
"members">Members
</h4>
1581 <dt>choice1[PPD_MAX_NAME]
</dt>
1582 <dd class=
"description">First option/choice (blank for all)
</dd>
1583 <dt>choice2[PPD_MAX_NAME]
</dt>
1584 <dd class=
"description">Second option/choice (blank for all)
</dd>
1585 <dt>option1[PPD_MAX_NAME]
</dt>
1586 <dd class=
"description">First keyword
</dd>
1587 <dt>option2[PPD_MAX_NAME]
</dt>
1588 <dd class=
"description">Second keyword
</dd>
1590 <h3 class=
"struct"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_coption_s">ppd_coption_s
</a></h3>
1591 <p class=
"description">Custom Option
</p>
1592 <p class=
"code">struct ppd_coption_s {
<br>
1593 char keyword[PPD_MAX_NAME];
<br>
1594 int marked;
<br>
1595 <a href=
"#ppd_option_t">ppd_option_t
</a> *option;
<br>
1596 cups_array_t *params;
<br>
1598 <h4 class=
"members">Members
</h4>
1600 <dt>keyword[PPD_MAX_NAME]
</dt>
1601 <dd class=
"description">Name of option that is being extended...
</dd>
1603 <dd class=
"description">Extended option is marked
</dd>
1605 <dd class=
"description">Option that is being extended...
</dd>
1607 <dd class=
"description">Parameters
</dd>
1609 <h3 class=
"struct"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cparam_s">ppd_cparam_s
</a></h3>
1610 <p class=
"description">Custom Parameter
</p>
1611 <p class=
"code">struct ppd_cparam_s {
<br>
1612 <a href=
"#ppd_cpvalue_t">ppd_cpvalue_t
</a> current;
<br>
1613 <a href=
"#ppd_cplimit_t">ppd_cplimit_t
</a> minimum, maximum;
<br>
1614 char name[PPD_MAX_NAME];
<br>
1615 int order;
<br>
1616 char text[PPD_MAX_TEXT];
<br>
1617 <a href=
"#ppd_cptype_t">ppd_cptype_t
</a> type;
<br>
1619 <h4 class=
"members">Members
</h4>
1622 <dd class=
"description">Current value
</dd>
1624 <dd class=
"description">Maximum value
</dd>
1625 <dt>name[PPD_MAX_NAME]
</dt>
1626 <dd class=
"description">Parameter name
</dd>
1628 <dd class=
"description">Order (
0 to N)
</dd>
1629 <dt>text[PPD_MAX_TEXT]
</dt>
1630 <dd class=
"description">Human-readable text
</dd>
1632 <dd class=
"description">Parameter type
</dd>
1634 <h3 class=
"struct"><a name=
"ppd_emul_s">ppd_emul_s
</a></h3>
1635 <p class=
"description">Emulators
</p>
1636 <p class=
"code">struct ppd_emul_s {
<br>
1637 char name[PPD_MAX_NAME];
<br>
1638 char *start;
<br>
1639 char *stop;
<br>
1641 <h4 class=
"members">Members
</h4>
1643 <dt>name[PPD_MAX_NAME]
</dt>
1644 <dd class=
"description">Emulator name
</dd>
1646 <dd class=
"description">Code to switch to this emulation
</dd>
1648 <dd class=
"description">Code to stop this emulation
</dd>
1650 <h3 class=
"struct"><a name=
"ppd_file_s">ppd_file_s
</a></h3>
1651 <p class=
"description">PPD File
</p>
1652 <p class=
"code">struct ppd_file_s {
<br>
1653 int accurate_screens;
<br>
1654 int color_device;
<br>
1655 <a href=
"#ppd_cs_t">ppd_cs_t
</a> colorspace;
<br>
1656 <a href=
"#ppd_const_t">ppd_const_t
</a> *consts;
<br>
1657 int contone_only;
<br>
1658 float custom_margins[
4];
<br>
1659 float custom_max[
2];
<br>
1660 float custom_min[
2];
<br>
1661 <a href=
"#ppd_emul_t">ppd_emul_t
</a> *emulations;
<br>
1662 char **filters;
<br>
1663 int flip_duplex;
<br>
1664 char **fonts;
<br>
1665 <a href=
"#ppd_group_t">ppd_group_t
</a> *groups;
<br>
1666 char *jcl_begin;
<br>
1667 char *jcl_end;
<br>
1668 char *jcl_ps;
<br>
1669 int landscape;
<br>
1670 char *lang_encoding;
<br>
1671 char *lang_version;
<br>
1672 int language_level;
<br>
1673 int manual_copies;
<br>
1674 char *manufacturer;
<br>
1675 int model_number;
<br>
1676 char *modelname;
<br>
1677 char *nickname;
<br>
1678 int num_consts;
<br>
1679 int num_emulations;
<br>
1680 int num_filters;
<br>
1681 int num_fonts;
<br>
1682 int num_groups;
<br>
1683 int num_profiles;
<br>
1684 int num_sizes;
<br>
1685 char *patches;
<br>
1686 char *pcfilename;
<br>
1687 char *product;
<br>
1688 <a href=
"#ppd_profile_t">ppd_profile_t
</a> *profiles;
<br>
1689 char *protocols;
<br>
1690 char *shortnickname;
<br>
1691 <a href=
"#ppd_size_t">ppd_size_t
</a> *sizes;
<br>
1692 int throughput;
<br>
1693 char *ttrasterizer;
<br>
1694 int variable_sizes;
<br>
1696 <h4 class=
"members">Members
</h4>
1698 <dt>accurate_screens
</dt>
1699 <dd class=
"description">1 = supports accurate screens,
0 = not
</dd>
1700 <dt>color_device
</dt>
1701 <dd class=
"description">1 = color device,
0 = grayscale
</dd>
1702 <dt>colorspace
</dt>
1703 <dd class=
"description">Default colorspace
</dd>
1705 <dd class=
"description">UI/Non-UI constraints
</dd>
1706 <dt>contone_only
</dt>
1707 <dd class=
"description">1 = continuous tone only,
0 = not
</dd>
1708 <dt>custom_margins[
4]
</dt>
1709 <dd class=
"description">Margins around page
</dd>
1710 <dt>custom_max[
2]
</dt>
1711 <dd class=
"description">Maximum variable page size
</dd>
1712 <dt>custom_min[
2]
</dt>
1713 <dd class=
"description">Minimum variable page size
</dd>
1714 <dt>emulations
</dt>
1715 <dd class=
"description">Emulations and the code to invoke them
</dd>
1717 <dd class=
"description">Filter strings...
</dd>
1718 <dt>flip_duplex
<span class=
"info"> DEPRECATED
</span></dt>
1719 <dd class=
"description">1 = Flip page for back sides
</dd>
1721 <dd class=
"description">Pre-loaded fonts
</dd>
1723 <dd class=
"description">UI groups
</dd>
1725 <dd class=
"description">Start JCL commands
</dd>
1727 <dd class=
"description">End JCL commands
</dd>
1729 <dd class=
"description">Enter PostScript interpreter
</dd>
1731 <dd class=
"description">-
90 or
90</dd>
1732 <dt>lang_encoding
</dt>
1733 <dd class=
"description">Language encoding
</dd>
1734 <dt>lang_version
</dt>
1735 <dd class=
"description">Language version (English, Spanish, etc.)
</dd>
1736 <dt>language_level
</dt>
1737 <dd class=
"description">Language level of device
</dd>
1738 <dt>manual_copies
</dt>
1739 <dd class=
"description">1 = Copies done manually,
0 = hardware
</dd>
1740 <dt>manufacturer
</dt>
1741 <dd class=
"description">Manufacturer name
</dd>
1742 <dt>model_number
</dt>
1743 <dd class=
"description">Device-specific model number
</dd>
1745 <dd class=
"description">Model name (general)
</dd>
1747 <dd class=
"description">Nickname (specific)
</dd>
1748 <dt>num_consts
</dt>
1749 <dd class=
"description">Number of UI/Non-UI constraints
</dd>
1750 <dt>num_emulations
</dt>
1751 <dd class=
"description">Number of emulations supported
</dd>
1752 <dt>num_filters
</dt>
1753 <dd class=
"description">Number of filters
</dd>
1755 <dd class=
"description">Number of pre-loaded fonts
</dd>
1756 <dt>num_groups
</dt>
1757 <dd class=
"description">Number of UI groups
</dd>
1758 <dt>num_profiles
<span class=
"info"> DEPRECATED
</span></dt>
1759 <dd class=
"description">Number of sRGB color profiles
</dd>
1761 <dd class=
"description">Number of page sizes
</dd>
1763 <dd class=
"description">Patch commands to be sent to printer
</dd>
1764 <dt>pcfilename
<span class=
"info"> CUPS
1.1.19 </span></dt>
1765 <dd class=
"description">PCFileName string
</dd>
1767 <dd class=
"description">Product name (from PS RIP/interpreter)
</dd>
1768 <dt>profiles
<span class=
"info"> DEPRECATED
</span></dt>
1769 <dd class=
"description">sRGB color profiles
</dd>
1770 <dt>protocols
<span class=
"info"> CUPS
1.1.19 </span></dt>
1771 <dd class=
"description">Protocols (BCP, TBCP) string
</dd>
1772 <dt>shortnickname
</dt>
1773 <dd class=
"description">Short version of nickname
</dd>
1775 <dd class=
"description">Page sizes
</dd>
1776 <dt>throughput
</dt>
1777 <dd class=
"description">Pages per minute
</dd>
1778 <dt>ttrasterizer
</dt>
1779 <dd class=
"description">Truetype rasterizer
</dd>
1780 <dt>variable_sizes
</dt>
1781 <dd class=
"description">1 = supports variable sizes,
0 = doesn't
</dd>
1783 <h3 class=
"struct"><a name=
"ppd_group_s">ppd_group_s
</a></h3>
1784 <p class=
"description">Groups
</p>
1785 <p class=
"code">struct ppd_group_s {
<br>
1786 char text[PPD_MAX_TEXT - PPD_MAX_NAME];
<br>
1787 char name[PPD_MAX_NAME];
<br>
1788 int num_options;
<br>
1789 int num_subgroups;
<br>
1790 <a href=
"#ppd_option_t">ppd_option_t
</a> *options;
<br>
1791 struct
<a href=
"#ppd_group_s">ppd_group_s
</a> *subgroups;
<br>
1793 <h4 class=
"members">Members
</h4>
1795 <dt>PPD_MAX_NAME]
</dt>
1796 <dd class=
"description">Human-readable group name
</dd>
1797 <dt>name[PPD_MAX_NAME]
<span class=
"info"> CUPS
1.1.18 </span></dt>
1798 <dd class=
"description">Group name
</dd>
1799 <dt>num_options
</dt>
1800 <dd class=
"description">Number of options
</dd>
1801 <dt>num_subgroups
</dt>
1802 <dd class=
"description">Number of sub-groups
</dd>
1804 <dd class=
"description">Options
</dd>
1806 <dd class=
"description">Sub-groups (max depth =
1)
</dd>
1808 <h3 class=
"struct"><a name=
"ppd_option_s">ppd_option_s
</a></h3>
1809 <p class=
"description">Options
</p>
1810 <p class=
"code">struct ppd_option_s {
<br>
1811 <a href=
"#ppd_choice_t">ppd_choice_t
</a> *choices;
<br>
1812 char conflicted;
<br>
1813 char defchoice[PPD_MAX_NAME];
<br>
1814 char keyword[PPD_MAX_NAME];
<br>
1815 int num_choices;
<br>
1816 float order;
<br>
1817 <a href=
"#ppd_section_t">ppd_section_t
</a> section;
<br>
1818 char text[PPD_MAX_TEXT];
<br>
1819 <a href=
"#ppd_ui_t">ppd_ui_t
</a> ui;
<br>
1821 <h4 class=
"members">Members
</h4>
1824 <dd class=
"description">Option choices
</dd>
1825 <dt>conflicted
</dt>
1826 <dd class=
"description">0 if no conflicts exist,
1 otherwise
</dd>
1827 <dt>defchoice[PPD_MAX_NAME]
</dt>
1828 <dd class=
"description">Default option choice
</dd>
1829 <dt>keyword[PPD_MAX_NAME]
</dt>
1830 <dd class=
"description">Option keyword name (
"PageSize
", etc.)
</dd>
1831 <dt>num_choices
</dt>
1832 <dd class=
"description">Number of option choices
</dd>
1834 <dd class=
"description">Order number
</dd>
1836 <dd class=
"description">Section for command
</dd>
1837 <dt>text[PPD_MAX_TEXT]
</dt>
1838 <dd class=
"description">Human-readable text
</dd>
1840 <dd class=
"description">Type of UI option
</dd>
1842 <h3 class=
"struct"><a name=
"ppd_profile_s">ppd_profile_s
</a></h3>
1843 <p class=
"description">sRGB Color Profiles
</p>
1844 <p class=
"code">struct ppd_profile_s {
<br>
1845 float density;
<br>
1846 float gamma;
<br>
1847 float matrix[
3][
3];
<br>
1848 char media_type[PPD_MAX_NAME];
<br>
1849 char resolution[PPD_MAX_NAME];
<br>
1851 <h4 class=
"members">Members
</h4>
1854 <dd class=
"description">Ink density to use
</dd>
1856 <dd class=
"description">Gamma correction to use
</dd>
1857 <dt>matrix[
3][
3]
</dt>
1858 <dd class=
"description">Transform matrix
</dd>
1859 <dt>media_type[PPD_MAX_NAME]
</dt>
1860 <dd class=
"description">Media type or
"-
"</dd>
1861 <dt>resolution[PPD_MAX_NAME]
</dt>
1862 <dd class=
"description">Resolution or
"-
"</dd>
1864 <h3 class=
"struct"><a name=
"ppd_size_s">ppd_size_s
</a></h3>
1865 <p class=
"description">Page Sizes
</p>
1866 <p class=
"code">struct ppd_size_s {
<br>
1867 float bottom;
<br>
1868 float left;
<br>
1869 float length;
<br>
1870 int marked;
<br>
1871 char name[PPD_MAX_NAME];
<br>
1872 float right;
<br>
1873 float top;
<br>
1874 float width;
<br>
1876 <h4 class=
"members">Members
</h4>
1879 <dd class=
"description">Bottom printable margin in points
</dd>
1881 <dd class=
"description">Left printable margin in points
</dd>
1883 <dd class=
"description">Length of media in points
</dd>
1885 <dd class=
"description">Page size selected?
</dd>
1886 <dt>name[PPD_MAX_NAME]
</dt>
1887 <dd class=
"description">Media size option
</dd>
1889 <dd class=
"description">Right printable margin in points
</dd>
1891 <dd class=
"description">Top printable margin in points
</dd>
1893 <dd class=
"description">Width of media in points
</dd>
1895 <h2 class=
"title"><a name=
"UNIONS">Unions
</a></h2>
1896 <h3 class=
"union"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cplimit_u">ppd_cplimit_u
</a></h3>
1897 <p class=
"description">Custom Parameter Limit
</p>
1898 <p class=
"code">union ppd_cplimit_u {
<br>
1899 float custom_curve;
<br>
1900 int custom_int;
<br>
1901 float custom_invcurve;
<br>
1902 int custom_passcode;
<br>
1903 int custom_password;
<br>
1904 float custom_points;
<br>
1905 float custom_real;
<br>
1906 int custom_string;
<br>
1908 <h4 class=
"members">Members
</h4>
1910 <dt>custom_curve
</dt>
1911 <dd class=
"description">Gamma value
</dd>
1912 <dt>custom_int
</dt>
1913 <dd class=
"description">Integer value
</dd>
1914 <dt>custom_invcurve
</dt>
1915 <dd class=
"description">Gamma value
</dd>
1916 <dt>custom_passcode
</dt>
1917 <dd class=
"description">Passcode length
</dd>
1918 <dt>custom_password
</dt>
1919 <dd class=
"description">Password length
</dd>
1920 <dt>custom_points
</dt>
1921 <dd class=
"description">Measurement value
</dd>
1922 <dt>custom_real
</dt>
1923 <dd class=
"description">Real value
</dd>
1924 <dt>custom_string
</dt>
1925 <dd class=
"description">String length
</dd>
1927 <h3 class=
"union"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cpvalue_u">ppd_cpvalue_u
</a></h3>
1928 <p class=
"description">Custom Parameter Value
</p>
1929 <p class=
"code">union ppd_cpvalue_u {
<br>
1930 float custom_curve;
<br>
1931 int custom_int;
<br>
1932 float custom_invcurve;
<br>
1933 char *custom_passcode;
<br>
1934 char *custom_password;
<br>
1935 float custom_points;
<br>
1936 float custom_real;
<br>
1937 char *custom_string;
<br>
1939 <h4 class=
"members">Members
</h4>
1941 <dt>custom_curve
</dt>
1942 <dd class=
"description">Gamma value
</dd>
1943 <dt>custom_int
</dt>
1944 <dd class=
"description">Integer value
</dd>
1945 <dt>custom_invcurve
</dt>
1946 <dd class=
"description">Gamma value
</dd>
1947 <dt>custom_passcode
</dt>
1948 <dd class=
"description">Passcode value
</dd>
1949 <dt>custom_password
</dt>
1950 <dd class=
"description">Password value
</dd>
1951 <dt>custom_points
</dt>
1952 <dd class=
"description">Measurement value
</dd>
1953 <dt>custom_real
</dt>
1954 <dd class=
"description">Real value
</dd>
1955 <dt>custom_string
</dt>
1956 <dd class=
"description">String value
</dd>
1958 <h2 class=
"title"><a name=
"ENUMERATIONS">Constants
</a></h2>
1959 <h3 class=
"enumeration"><a name=
"ppd_conform_e">ppd_conform_e
</a></h3>
1960 <p class=
"description"></p>
1961 <h4 class=
"constants">Constants
</h4>
1963 <dt>PPD_CONFORM_RELAXED
</dt>
1964 <dd class=
"description">Relax whitespace and control char
</dd>
1965 <dt>PPD_CONFORM_STRICT
</dt>
1966 <dd class=
"description">Require strict conformance
</dd>
1968 <h3 class=
"enumeration"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cptype_e">ppd_cptype_e
</a></h3>
1969 <p class=
"description">Custom Parameter Type
</p>
1970 <h4 class=
"constants">Constants
</h4>
1972 <dt>PPD_CUSTOM_CURVE
</dt>
1973 <dd class=
"description">Curve value for f(x) = x^value
</dd>
1974 <dt>PPD_CUSTOM_INT
</dt>
1975 <dd class=
"description">Integer number value
</dd>
1976 <dt>PPD_CUSTOM_INVCURVE
</dt>
1977 <dd class=
"description">Curve value for f(x) = x^(
1/value)
</dd>
1978 <dt>PPD_CUSTOM_PASSCODE
</dt>
1979 <dd class=
"description">String of (hidden) numbers
</dd>
1980 <dt>PPD_CUSTOM_PASSWORD
</dt>
1981 <dd class=
"description">String of (hidden) characters
</dd>
1982 <dt>PPD_CUSTOM_POINTS
</dt>
1983 <dd class=
"description">Measurement value in points
</dd>
1984 <dt>PPD_CUSTOM_REAL
</dt>
1985 <dd class=
"description">Real number value
</dd>
1986 <dt>PPD_CUSTOM_STRING
</dt>
1987 <dd class=
"description">String of characters
</dd>
1989 <h3 class=
"enumeration"><a name=
"ppd_cs_e">ppd_cs_e
</a></h3>
1990 <p class=
"description">Colorspaces
</p>
1991 <h4 class=
"constants">Constants
</h4>
1993 <dt>PPD_CS_CMY
</dt>
1994 <dd class=
"description">CMY colorspace
</dd>
1995 <dt>PPD_CS_CMYK
</dt>
1996 <dd class=
"description">CMYK colorspace
</dd>
1997 <dt>PPD_CS_GRAY
</dt>
1998 <dd class=
"description">Grayscale colorspace
</dd>
2000 <dd class=
"description">DeviceN colorspace
</dd>
2001 <dt>PPD_CS_RGB
</dt>
2002 <dd class=
"description">RGB colorspace
</dd>
2003 <dt>PPD_CS_RGBK
</dt>
2004 <dd class=
"description">RGBK (K = gray) colorspace
</dd>
2006 <h3 class=
"enumeration"><a name=
"ppd_section_e">ppd_section_e
</a></h3>
2007 <p class=
"description">Order dependency sections
</p>
2008 <h4 class=
"constants">Constants
</h4>
2010 <dt>PPD_ORDER_ANY
</dt>
2011 <dd class=
"description">Option code can be anywhere in the file
</dd>
2012 <dt>PPD_ORDER_DOCUMENT
</dt>
2013 <dd class=
"description">... must be in the DocumentSetup section
</dd>
2014 <dt>PPD_ORDER_EXIT
</dt>
2015 <dd class=
"description">... must be sent prior to the document
</dd>
2016 <dt>PPD_ORDER_JCL
</dt>
2017 <dd class=
"description">... must be sent as a JCL command
</dd>
2018 <dt>PPD_ORDER_PAGE
</dt>
2019 <dd class=
"description">... must be in the PageSetup section
</dd>
2020 <dt>PPD_ORDER_PROLOG
</dt>
2021 <dd class=
"description">... must be in the Prolog section
</dd>
2023 <h3 class=
"enumeration"><a name=
"ppd_status_e">ppd_status_e
</a></h3>
2024 <p class=
"description">Types and structures...
</p>
2025 <h4 class=
"constants">Constants
</h4>
2027 <dt>PPD_ALLOC_ERROR
</dt>
2028 <dd class=
"description">Memory allocation error
</dd>
2029 <dt>PPD_BAD_CUSTOM_PARAM
</dt>
2030 <dd class=
"description">Bad custom parameter
</dd>
2031 <dt>PPD_BAD_OPEN_GROUP
</dt>
2032 <dd class=
"description">Bad OpenGroup
</dd>
2033 <dt>PPD_BAD_OPEN_UI
</dt>
2034 <dd class=
"description">Bad OpenUI/JCLOpenUI
</dd>
2035 <dt>PPD_BAD_ORDER_DEPENDENCY
</dt>
2036 <dd class=
"description">Bad OrderDependency
</dd>
2037 <dt>PPD_BAD_UI_CONSTRAINTS
</dt>
2038 <dd class=
"description">Bad UIConstraints
</dd>
2039 <dt>PPD_FILE_OPEN_ERROR
</dt>
2040 <dd class=
"description">Unable to open PPD file
</dd>
2041 <dt>PPD_ILLEGAL_CHARACTER
</dt>
2042 <dd class=
"description">Illegal control character
</dd>
2043 <dt>PPD_ILLEGAL_MAIN_KEYWORD
</dt>
2044 <dd class=
"description">Illegal main keyword string
</dd>
2045 <dt>PPD_ILLEGAL_OPTION_KEYWORD
</dt>
2046 <dd class=
"description">Illegal option keyword string
</dd>
2047 <dt>PPD_ILLEGAL_TRANSLATION
</dt>
2048 <dd class=
"description">Illegal translation string
</dd>
2049 <dt>PPD_ILLEGAL_WHITESPACE
</dt>
2050 <dd class=
"description">Illegal whitespace character
</dd>
2051 <dt>PPD_INTERNAL_ERROR
</dt>
2052 <dd class=
"description">Internal error
</dd>
2053 <dt>PPD_LINE_TOO_LONG
</dt>
2054 <dd class=
"description">Line longer than
255 chars
</dd>
2055 <dt>PPD_MISSING_ASTERISK
</dt>
2056 <dd class=
"description">Missing asterisk in column
0</dd>
2057 <dt>PPD_MISSING_PPDADOBE4
</dt>
2058 <dd class=
"description">Missing PPD-Adobe-
4.x header
</dd>
2059 <dt>PPD_MISSING_VALUE
</dt>
2060 <dd class=
"description">Missing value string
</dd>
2061 <dt>PPD_NESTED_OPEN_GROUP
</dt>
2062 <dd class=
"description">OpenGroup without a CloseGroup first
</dd>
2063 <dt>PPD_NESTED_OPEN_UI
</dt>
2064 <dd class=
"description">OpenUI/JCLOpenUI without a CloseUI/JCLCloseUI first
</dd>
2065 <dt>PPD_NULL_FILE
</dt>
2066 <dd class=
"description">NULL PPD file pointer
</dd>
2068 <dd class=
"description">OK
</dd>
2070 <h3 class=
"enumeration"><a name=
"ppd_ui_e">ppd_ui_e
</a></h3>
2071 <p class=
"description">UI Types
</p>
2072 <h4 class=
"constants">Constants
</h4>
2074 <dt>PPD_UI_BOOLEAN
</dt>
2075 <dd class=
"description">True or False option
</dd>
2076 <dt>PPD_UI_PICKMANY
</dt>
2077 <dd class=
"description">Pick zero or more from a list
</dd>
2078 <dt>PPD_UI_PICKONE
</dt>
2079 <dd class=
"description">Pick one from a list
</dd>