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=
"#ppdPageWidth" title=
"Get the page width for the given size.">ppdPageWidth
</a></li>
349 <li><a href=
"#ppdSetConformance" title=
"Set the conformance level for PPD files.">ppdSetConformance
</a></li>
351 <li><a href=
"#TYPES">Data Types
</a><ul class=
"code">
352 <li><a href=
"#ppd_attr_t" title=
"PPD Attribute Structure ">ppd_attr_t
</a></li>
353 <li><a href=
"#ppd_choice_t" title=
"Option choices">ppd_choice_t
</a></li>
354 <li><a href=
"#ppd_conform_t" title=
"Conformance Levels ">ppd_conform_t
</a></li>
355 <li><a href=
"#ppd_const_t" title=
"Constraints">ppd_const_t
</a></li>
356 <li><a href=
"#ppd_coption_t" title=
"Custom Option ">ppd_coption_t
</a></li>
357 <li><a href=
"#ppd_cparam_t" title=
"Custom Parameter ">ppd_cparam_t
</a></li>
358 <li><a href=
"#ppd_cplimit_t" title=
"Custom Parameter Limit ">ppd_cplimit_t
</a></li>
359 <li><a href=
"#ppd_cptype_t" title=
"Custom Parameter Type ">ppd_cptype_t
</a></li>
360 <li><a href=
"#ppd_cpvalue_t" title=
"Custom Parameter Value ">ppd_cpvalue_t
</a></li>
361 <li><a href=
"#ppd_cs_t" title=
"Colorspaces">ppd_cs_t
</a></li>
362 <li><a href=
"#ppd_emul_t" title=
"Emulators">ppd_emul_t
</a></li>
363 <li><a href=
"#ppd_file_t" title=
"PPD File">ppd_file_t
</a></li>
364 <li><a href=
"#ppd_group_t" title=
"Groups">ppd_group_t
</a></li>
365 <li><a href=
"#ppd_option_t" title=
"Options">ppd_option_t
</a></li>
366 <li><a href=
"#ppd_profile_t" title=
"sRGB Color Profiles">ppd_profile_t
</a></li>
367 <li><a href=
"#ppd_section_t" title=
"Order dependency sections">ppd_section_t
</a></li>
368 <li><a href=
"#ppd_size_t" title=
"Page Sizes">ppd_size_t
</a></li>
369 <li><a href=
"#ppd_status_t" title=
"Types and structures...">ppd_status_t
</a></li>
370 <li><a href=
"#ppd_ui_t" title=
"UI Types">ppd_ui_t
</a></li>
372 <li><a href=
"#STRUCTURES">Structures
</a><ul class=
"code">
373 <li><a href=
"#ppd_attr_s" title=
"PPD Attribute Structure ">ppd_attr_s
</a></li>
374 <li><a href=
"#ppd_choice_s" title=
"Option choices">ppd_choice_s
</a></li>
375 <li><a href=
"#ppd_const_s" title=
"Constraints">ppd_const_s
</a></li>
376 <li><a href=
"#ppd_coption_s" title=
"Custom Option ">ppd_coption_s
</a></li>
377 <li><a href=
"#ppd_cparam_s" title=
"Custom Parameter ">ppd_cparam_s
</a></li>
378 <li><a href=
"#ppd_emul_s" title=
"Emulators">ppd_emul_s
</a></li>
379 <li><a href=
"#ppd_file_s" title=
"PPD File">ppd_file_s
</a></li>
380 <li><a href=
"#ppd_group_s" title=
"Groups">ppd_group_s
</a></li>
381 <li><a href=
"#ppd_option_s" title=
"Options">ppd_option_s
</a></li>
382 <li><a href=
"#ppd_profile_s" title=
"sRGB Color Profiles">ppd_profile_s
</a></li>
383 <li><a href=
"#ppd_size_s" title=
"Page Sizes">ppd_size_s
</a></li>
385 <li><a href=
"#UNIONS">Unions
</a><ul class=
"code">
386 <li><a href=
"#ppd_cplimit_u" title=
"Custom Parameter Limit ">ppd_cplimit_u
</a></li>
387 <li><a href=
"#ppd_cpvalue_u" title=
"Custom Parameter Value ">ppd_cpvalue_u
</a></li>
389 <li><a href=
"#ENUMERATIONS">Constants
</a><ul class=
"code">
390 <li><a href=
"#ppd_conform_e" title=
"">ppd_conform_e
</a></li>
391 <li><a href=
"#ppd_cptype_e" title=
"Custom Parameter Type ">ppd_cptype_e
</a></li>
392 <li><a href=
"#ppd_cs_e" title=
"Colorspaces">ppd_cs_e
</a></li>
393 <li><a href=
"#ppd_section_e" title=
"Order dependency sections">ppd_section_e
</a></li>
394 <li><a href=
"#ppd_status_e" title=
"Types and structures...">ppd_status_e
</a></li>
395 <li><a href=
"#ppd_ui_e" title=
"UI Types">ppd_ui_e
</a></li>
399 "$Id: api-ppd.shtml 7616 2008-05-28 00:34:13Z mike $"
401 PPD API introduction for the Common UNIX Printing System (CUPS).
403 Copyright 2007-2008 by Apple Inc.
404 Copyright 1997-2006 by Easy Software Products, all rights reserved.
406 These coded instructions, statements, and computer programs are the
407 property of Apple Inc. and are protected by Federal copyright
408 law. Distribution and use rights are outlined in the file "LICENSE.txt"
409 which should have been included with this file. If this file is
410 file is missing or damaged, see the license at "http://www.cups.org/".
413 <h2 class='title'
><a name='OVERVIEW'
>Overview
</a></h2>
415 <p>The CUPS PPD API provides read-only access the data in PostScript Printer
416 Description (
"PPD") files which are used for all printers with a driver. With
417 it you can obtain the data necessary to display printer options to users, mark
418 option choices and check for conflicting choices, and output marked choices in
419 PostScript output. The
<a href=
"#ppd_file_t"><code>ppd_file_t
</code></a>
420 structure contains all of the information in a PPD file.
</p>
422 <blockquote><b>Note:
</b>
424 <p>The CUPS PPD API uses the terms
"option" and
"choice" instead of the Adobe
425 terms
"MainKeyword" and
"OptionKeyword" to refer to specific printer options and
426 features. CUPS also treats option (
"MainKeyword") and choice (
"OptionKeyword")
427 values as case-insensitive strings, so option
"InputSlot" and choice
"Upper"
428 are equivalent to
"inputslot" and
"upper", respectively.
</p>
431 <h3><a name=
"LOADING">Loading a PPD File
</a></h3>
433 <p>The
<a href=
"#ppdOpenFile"><code>ppdOpenFile
</code></a> function
"opens" a
434 PPD file and loads it into memory. For example, the following code opens the
435 current printer's PPD file in a CUPS filter:
</p>
437 <pre class=
"example">
438 #include
<cups/ppd.h
>
440 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd =
<a href=
"#ppdOpenFile">ppdOpenFile
</a>(getenv(
"PPD"));
443 <p>The return value is a pointer to a new
444 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure or
<code>NULL
</code>
445 if the PPD file does not exist or cannot be loaded. The
446 <a href=
"#ppdClose"><code>ppdClose
</code></a> function frees the memory used
447 by the structure:
</p>
449 <pre class=
"example">
450 #include
<cups/ppd.h
>
452 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
454 <a href=
"#ppdClose">ppdClose
</a>(ppd);
457 <p>Once closed, pointers to the
<a href=
"#ppd_file_t"><code>ppd_file_t
</code></a>
458 structure and any data in it will no longer be valid.
</p>
460 <h3><a name=
"OPTIONS_AND_GROUPS">Options and Groups
</a></h3>
462 <p>PPD files support multiple options, which are stored in arrays of
463 <a href=
"#ppd_option_t"><code>ppd_option_t
</code></a> and
464 <a href=
"#ppd_choice_t"><code>ppd_choice_t
</code></a> structures.
</p>
466 <p>Each option in turn is associated with a group stored in a
467 <a href=
"#ppd_group_t"><code>ppd_group_t
</code></a> structure. Groups can be
468 specified in the PPD file; if an option is not associated with a group
469 then it is put in an automatically-generated
"General" group. Groups can also
470 have sub-groups, however CUPS currently ignores sub-groups because of past
471 abuses of this functionality.
</p>
473 <p>Option choices are selected by marking them using one of three functions. The
474 first is
<a href=
"#ppdMarkDefaults"><code>ppdMarkDefaults
</code></a> which
475 selects all of the default options in the PPD file:
</p>
477 <pre class=
"example">
478 #include
<cups/ppd.h
>
480 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
482 <a href=
"#ppdMarkDefaults">ppdMarkDefaults
</a>(ppd);
485 <p>The second is
<a href=
"#ppdMarkOption"><code>ppdMarkOption
</code></a>
486 which selects a single option choice in the PPD file. For example, the following
487 code selects the upper paper tray:
</p>
489 <pre class=
"example">
490 #include
<cups/ppd.h
>
492 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
494 <a href=
"#ppdMarkOption">ppdMarkOption
</a>(ppd,
"InputSlot",
"Upper");
497 <p>The last function is
498 <a href=
"#cupsMarkOptions"><code>cupsMarkOptions
</code></a> which selects
499 multiple option choices in the PPD file from an array of CUPS options, mapping
500 IPP attributes like
"media" and
"sides" to their corresponding PPD options. You
501 typically use this function in a print filter with
502 <code>cupsParseOptions
</code> and
503 <a href=
"#ppdMarkDefaults"><code>ppdMarkDefaults
</code></a> to select all of
504 the option choices needed for the job, for example:
</p>
506 <pre class=
"example">
507 #include
<cups/ppd.h
>
509 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd =
<a href=
"#ppdOpenFile">ppdOpenFile
</a>(getenv(
"PPD"));
510 cups_option_t *options = NULL;
511 int num_options = cupsParseOptions(argv[
5],
0,
&options);
513 <a href=
"#ppdMarkDefaults">ppdMarkDefaults
</a>(ppd);
514 <a href=
"#cupsMarkOptions">cupsMarkOptions
</a>(ppd, num_options, options);
515 cupsFreeOptions(num_options, options);
518 <h3><a name=
"CONSTRAINTS">Constraints
</a></h3>
520 <p>PPD files support specification of conflict conditions, called
521 constraints, between different options. Constraints are stored in an array of
522 <a href=
"#ppd_const_t"><code>ppd_const_t
</code></a> structures which specify
523 the options and choices that conflict with each other. The
524 <a href=
"#ppdConflicts"><code>ppdConflicts
</code></a> function tells you
525 how many of the selected options are incompatible. Since constraints are
526 normally specified in pairs, the returned value is typically an even number.
</p>
528 <h3><a name=
"PAGE_SIZES">Page Sizes
</a></h3>
530 <p>Page sizes are special options which have physical dimensions and margins
531 associated with them. The size information is stored in
532 <a href=
"#ppd_size_t"><code>ppd_size_t
</code></a> structures and is available
533 by looking up the named size with the
534 <a href=
"#ppdPageSize"><code>ppdPageSize
</code></a> function. The page size and
535 margins are returned in units called points; there are
72 points per inch. If
536 you pass
<code>NULL
</code> for the size, the currently selected size is
539 <pre class=
"example">
540 #include
<cups/ppd.h
>
542 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
543 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd, NULL);
546 <p>Besides the standard page sizes listed in a PPD file, some printers
547 support variable or custom page sizes. Custom page sizes are supported if the
548 <code>variables_sizes
</code> member of the
549 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure is non-zero.
550 The
<code>custom_min
</code>,
<code>custom_max
</code>, and
551 <code>custom_margins
</code> members of the
552 <a href=
"#ppd_file_t"><code>ppd_file_t
</code></a> structure define the limits
553 of the printable area. To get the resulting media size, use a page size string
554 of the form
"Custom.<I>width</I>x<I>length</I>", where
"width" and
"length" are
555 in points. Custom page size names can also be specified in inches
556 (
"Custom.<i>width</i>x<i>height</i>in"), centimeters
557 (
"Custom.<i>width</i>x<i>height</i>cm"), or millimeters
558 (
"Custom.<i>width</i>x<i>height</i>mm"):
</p>
560 <pre class=
"example">
561 #include
<cups/ppd.h
>
563 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
565 /* Get an
576x720 point custom page size */
566 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.576x720");
568 /* Get an
8x10 inch custom page size */
569 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.8x10in");
571 /* Get a
100x200 millimeter custom page size */
572 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.100x200mm");
574 /* Get a
12.7x34.5 centimeter custom page size */
575 <a href=
"#ppd_size_t">ppd_size_t
</a> *size =
<a href=
"#ppdPageSize">ppdPageSize
</a>(ppd,
"Custom.12.7x34.5cm");
578 <p>If the PPD does not support variable page sizes, the
579 <a href=
"#ppdPageSize"><code>ppdPageSize
</code></a> function will return
580 <code>NULL
</code>.
</p>
582 <h3><a name=
"ATTRIBUTES">Attributes
</a></h3>
584 <p>Every PPD file is composed of one or more attributes. Most of these
585 attributes are used to define groups, options, choices, and page sizes,
586 however several informational attributes may be present which you can access
587 in your program or filter. Attributes normally look like one of the following
588 examples in a PPD file:
</p>
590 <pre class=
"example">
593 *name spec/text:
"value"
596 <p>The
<a href=
"#ppdFindAttr"><code>ppdFindAttr
</code></a> and
597 <a href=
"#ppdFindNextAttr"><code>ppdFindNextAttr
</code></a> functions find the
598 first and next instances, respectively, of the named attribute with the given
599 "spec" string and return a
<a href=
"#ppd_attr_t"><code>ppd_attr_t
</code></a>
600 structure. If you provide a NULL specifier string, all attributes with the
601 given name will be returned. For example, the following code lists all of the
602 <code>Product
</code> attributes in a PPD file:
</p>
604 <pre class=
"example">
605 #include
<cups/ppd.h
>
607 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd;
608 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *attr;
610 for (attr =
<a href=
"#ppdFindAttr">ppdFindAttr
</a>(ppd,
"Product", NULL);
612 attr =
<a href=
"#ppdFindNextAttr">ppdFindNextAttr
</a>(ppd,
"Product", NULL))
615 <h2 class=
"title"><a name=
"FUNCTIONS">Functions
</a></h2>
616 <h3 class=
"function"><a name=
"cupsMarkOptions">cupsMarkOptions
</a></h3>
617 <p class=
"description">Mark command-line options in a PPD file.
</p>
619 int cupsMarkOptions (
<br>
620 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
621 int num_options,
<br>
622 cups_option_t *options
<br>
624 <h4 class=
"parameters">Parameters
</h4>
627 <dd class=
"description">PPD file
</dd>
629 <dd class=
"description">Number of options
</dd>
631 <dd class=
"description">Options
</dd>
633 <h4 class=
"returnvalue">Return Value
</h4>
634 <p class=
"description">1 if conflicts exist,
0 otherwise
</p>
635 <h4 class=
"discussion">Discussion
</h4>
636 <p class=
"discussion">This function maps the IPP
"finishings
",
"media
",
"mirror
",
637 "multiple-document-handling
",
"output-bin
",
"printer-resolution
", and
638 "sides
" attributes to their corresponding PPD options and choices.
</p>
639 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"cupsResolveConflicts">cupsResolveConflicts
</a></h3>
640 <p class=
"description">Resolve conflicts in a marked PPD.
</p>
642 int cupsResolveConflicts (
<br>
643 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
644 const char *option,
<br>
645 const char *choice,
<br>
646 int *num_options,
<br>
647 cups_option_t **options
<br>
649 <h4 class=
"parameters">Parameters
</h4>
652 <dd class=
"description">PPD file
</dd>
654 <dd class=
"description">Newly selected option or
<code>NULL
</code> for none
</dd>
656 <dd class=
"description">Newly selected choice or
<code>NULL
</code> for none
</dd>
658 <dd class=
"description">Number of additional selected options
</dd>
660 <dd class=
"description">Additional selected options
</dd>
662 <h4 class=
"returnvalue">Return Value
</h4>
663 <p class=
"description">1 on success,
0 on failure
</p>
664 <h4 class=
"discussion">Discussion
</h4>
665 <p class=
"discussion">This function attempts to resolve any conflicts in a marked PPD, returning
666 a list of option changes that are required to resolve any conflicts. On
667 input,
"num_options
" and
"options
" contain any pending option changes that
668 have not yet been marked, while
"option
" and
"choice
" contain the most recent
669 selection which may or may not be in
"num_options
" or
"options
".
<br>
671 On successful return,
"num_options
" and
"options
" are updated to contain
672 "option
" and
"choice
" along with any changes required to resolve conflicts
673 specified in the PPD file. If option conflicts cannot be resolved,
674 "num_options
" and
"options
" are not changed.
676 <code>ppdResolveConflicts
</code> uses one of two sources of option constraint
677 information. The preferred constraint information is defined by
678 <code>cupsUIConstraints
</code> and
<code>cupsUIResolver
</code> attributes - in this
679 case, the PPD file provides constraint resolution actions. In this case,
680 it should not be possible for @ppdResolveConflicts@ to fail, however it
681 will do so if a resolver loop is detected.
<br>
683 The backup constraint infomration is defined by the
684 <code>UIConstraints
</code> and
<code>NonUIConstraints
</code> attributes. These
685 constraints are resolved algorithmically by selecting the default choice
686 for the conflicting option. Unfortunately, this method is far more likely
690 <h3 class=
"function"><a name=
"ppdClose">ppdClose
</a></h3>
691 <p class=
"description">Free all memory used by the PPD file.
</p>
694 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
696 <h4 class=
"parameters">Parameters
</h4>
699 <dd class=
"description">PPD file record
</dd>
701 <h3 class=
"function"><a name=
"ppdCollect">ppdCollect
</a></h3>
702 <p class=
"description">Collect all marked options that reside in the specified
706 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
707 <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br>
708 <a href=
"#ppd_choice_t">ppd_choice_t
</a> ***choices
<br>
710 <h4 class=
"parameters">Parameters
</h4>
713 <dd class=
"description">PPD file data
</dd>
715 <dd class=
"description">Section to collect
</dd>
717 <dd class=
"description">Pointers to choices
</dd>
719 <h4 class=
"returnvalue">Return Value
</h4>
720 <p class=
"description">Number of options marked
</p>
721 <h4 class=
"discussion">Discussion
</h4>
722 <p class=
"discussion">The choices array should be freed using
<code>free
</code> when you are
723 finished with it.
</p>
724 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdCollect2">ppdCollect2
</a></h3>
725 <p class=
"description">Collect all marked options that reside in the
726 specified section and minimum order.
</p>
728 int ppdCollect2 (
<br>
729 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
730 <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br>
731 float min_order,
<br>
732 <a href=
"#ppd_choice_t">ppd_choice_t
</a> ***choices
<br>
734 <h4 class=
"parameters">Parameters
</h4>
737 <dd class=
"description">PPD file data
</dd>
739 <dd class=
"description">Section to collect
</dd>
741 <dd class=
"description">Minimum OrderDependency value
</dd>
743 <dd class=
"description">Pointers to choices
</dd>
745 <h4 class=
"returnvalue">Return Value
</h4>
746 <p class=
"description">Number of options marked
</p>
747 <h4 class=
"discussion">Discussion
</h4>
748 <p class=
"discussion">The choices array should be freed using
<code>free
</code> when you are
752 <h3 class=
"function"><a name=
"ppdConflicts">ppdConflicts
</a></h3>
753 <p class=
"description">Check to see if there are any conflicts among the
754 marked option choices.
</p>
756 int ppdConflicts (
<br>
757 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
759 <h4 class=
"parameters">Parameters
</h4>
762 <dd class=
"description">PPD to check
</dd>
764 <h4 class=
"returnvalue">Return Value
</h4>
765 <p class=
"description">Number of conflicts found
</p>
766 <h4 class=
"discussion">Discussion
</h4>
767 <p class=
"discussion">The returned value is the same as returned by
<a href=
"#ppdMarkOption"><code>ppdMarkOption
</code></a>.
</p>
768 <h3 class=
"function"><a name=
"ppdEmit">ppdEmit
</a></h3>
769 <p class=
"description">Emit code for marked options to a file.
</p>
772 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
773 FILE *fp,
<br>
774 <a href=
"#ppd_section_t">ppd_section_t
</a> section
<br>
776 <h4 class=
"parameters">Parameters
</h4>
779 <dd class=
"description">PPD file record
</dd>
781 <dd class=
"description">File to write to
</dd>
783 <dd class=
"description">Section to write
</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=
"ppdEmitAfterOrder">ppdEmitAfterOrder
</a></h3>
788 <p class=
"description">Emit a subset of the code for marked options to a file.
</p>
790 int ppdEmitAfterOrder (
<br>
791 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
792 FILE *fp,
<br>
793 <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br>
794 int limit,
<br>
795 float min_order
<br>
797 <h4 class=
"parameters">Parameters
</h4>
800 <dd class=
"description">PPD file record
</dd>
802 <dd class=
"description">File to write to
</dd>
804 <dd class=
"description">Section to write
</dd>
806 <dd class=
"description">Non-zero to use min_order
</dd>
808 <dd class=
"description">Lowest OrderDependency
</dd>
810 <h4 class=
"returnvalue">Return Value
</h4>
811 <p class=
"description">0 on success, -
1 on failure
</p>
812 <h4 class=
"discussion">Discussion
</h4>
813 <p class=
"discussion">When
"limit
" is non-zero, this function only emits options whose
814 OrderDependency value is greater than or equal to
"min_order
".
<br>
816 When
"limit
" is zero, this function is identical to ppdEmit().
819 <h3 class=
"function"><a name=
"ppdEmitFd">ppdEmitFd
</a></h3>
820 <p class=
"description">Emit code for marked options to a file.
</p>
823 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
824 int fd,
<br>
825 <a href=
"#ppd_section_t">ppd_section_t
</a> section
<br>
827 <h4 class=
"parameters">Parameters
</h4>
830 <dd class=
"description">PPD file record
</dd>
832 <dd class=
"description">File to write to
</dd>
834 <dd class=
"description">Section to write
</dd>
836 <h4 class=
"returnvalue">Return Value
</h4>
837 <p class=
"description">0 on success, -
1 on failure
</p>
838 <h3 class=
"function"><a name=
"ppdEmitJCL">ppdEmitJCL
</a></h3>
839 <p class=
"description">Emit code for JCL options to a file.
</p>
842 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
843 FILE *fp,
<br>
844 int job_id,
<br>
845 const char *user,
<br>
846 const char *title
<br>
848 <h4 class=
"parameters">Parameters
</h4>
851 <dd class=
"description">PPD file record
</dd>
853 <dd class=
"description">File to write to
</dd>
855 <dd class=
"description">Job ID
</dd>
857 <dd class=
"description">Username
</dd>
859 <dd class=
"description">Title
</dd>
861 <h4 class=
"returnvalue">Return Value
</h4>
862 <p class=
"description">0 on success, -
1 on failure
</p>
863 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdEmitJCLEnd">ppdEmitJCLEnd
</a></h3>
864 <p class=
"description">Emit JCLEnd code to a file.
</p>
866 int ppdEmitJCLEnd (
<br>
867 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
868 FILE *fp
<br>
870 <h4 class=
"parameters">Parameters
</h4>
873 <dd class=
"description">PPD file record
</dd>
875 <dd class=
"description">File to write to
</dd>
877 <h4 class=
"returnvalue">Return Value
</h4>
878 <p class=
"description">0 on success, -
1 on failure
</p>
879 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdEmitString">ppdEmitString
</a></h3>
880 <p class=
"description">Get a string containing the code for marked options.
</p>
882 char *ppdEmitString (
<br>
883 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
884 <a href=
"#ppd_section_t">ppd_section_t
</a> section,
<br>
885 float min_order
<br>
887 <h4 class=
"parameters">Parameters
</h4>
890 <dd class=
"description">PPD file record
</dd>
892 <dd class=
"description">Section to write
</dd>
894 <dd class=
"description">Lowest OrderDependency
</dd>
896 <h4 class=
"returnvalue">Return Value
</h4>
897 <p class=
"description">String containing option code or
<code>NULL
</code> if there is no option code
</p>
898 <h4 class=
"discussion">Discussion
</h4>
899 <p class=
"discussion">When
"min_order
" is greater than zero, this function only includes options
900 whose OrderDependency value is greater than or equal to
"min_order
".
901 Otherwise, all options in the specified section are included in the
904 The return string is allocated on the heap and should be freed using
905 <code>free
</code> when you are done with it.
908 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppdErrorString">ppdErrorString
</a></h3>
909 <p class=
"description">Returns the text assocated with a status.
</p>
911 const char *ppdErrorString (
<br>
912 <a href=
"#ppd_status_t">ppd_status_t
</a> status
<br>
914 <h4 class=
"parameters">Parameters
</h4>
917 <dd class=
"description">PPD status
</dd>
919 <h4 class=
"returnvalue">Return Value
</h4>
920 <p class=
"description">Status string
</p>
921 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppdFindAttr">ppdFindAttr
</a></h3>
922 <p class=
"description">Find the first matching attribute.
</p>
924 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *ppdFindAttr (
<br>
925 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
926 const char *name,
<br>
927 const char *spec
<br>
929 <h4 class=
"parameters">Parameters
</h4>
932 <dd class=
"description">PPD file data
</dd>
934 <dd class=
"description">Attribute name
</dd>
936 <dd class=
"description">Specifier string or
<code>NULL
</code></dd>
938 <h4 class=
"returnvalue">Return Value
</h4>
939 <p class=
"description">Attribute or
<code>NULL
</code> if not found
</p>
940 <h3 class=
"function"><a name=
"ppdFindChoice">ppdFindChoice
</a></h3>
941 <p class=
"description">Return a pointer to an option choice.
</p>
943 <a href=
"#ppd_choice_t">ppd_choice_t
</a> *ppdFindChoice (
<br>
944 <a href=
"#ppd_option_t">ppd_option_t
</a> *o,
<br>
945 const char *choice
<br>
947 <h4 class=
"parameters">Parameters
</h4>
950 <dd class=
"description">Pointer to option
</dd>
952 <dd class=
"description">Name of choice
</dd>
954 <h4 class=
"returnvalue">Return Value
</h4>
955 <p class=
"description">Choice pointer or
<code>NULL
</code></p>
956 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdFindCustomOption">ppdFindCustomOption
</a></h3>
957 <p class=
"description">Find a custom option.
</p>
959 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *ppdFindCustomOption (
<br>
960 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
961 const char *keyword
<br>
963 <h4 class=
"parameters">Parameters
</h4>
966 <dd class=
"description">PPD file
</dd>
968 <dd class=
"description">Custom option name
</dd>
970 <h4 class=
"returnvalue">Return Value
</h4>
971 <p class=
"description">Custom option or NULL
</p>
972 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdFindCustomParam">ppdFindCustomParam
</a></h3>
973 <p class=
"description">Find a parameter for a custom option.
</p>
975 <a href=
"#ppd_cparam_t">ppd_cparam_t
</a> *ppdFindCustomParam (
<br>
976 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *opt,
<br>
977 const char *name
<br>
979 <h4 class=
"parameters">Parameters
</h4>
982 <dd class=
"description">Custom option
</dd>
984 <dd class=
"description">Parameter name
</dd>
986 <h4 class=
"returnvalue">Return Value
</h4>
987 <p class=
"description">Custom parameter or NULL
</p>
988 <h3 class=
"function"><a name=
"ppdFindMarkedChoice">ppdFindMarkedChoice
</a></h3>
989 <p class=
"description">Return the marked choice for the specified option.
</p>
991 <a href=
"#ppd_choice_t">ppd_choice_t
</a> *ppdFindMarkedChoice (
<br>
992 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
993 const char *option
<br>
995 <h4 class=
"parameters">Parameters
</h4>
998 <dd class=
"description">PPD file
</dd>
1000 <dd class=
"description">Keyword/option name
</dd>
1002 <h4 class=
"returnvalue">Return Value
</h4>
1003 <p class=
"description">Pointer to choice or
<code>NULL
</code></p>
1004 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppdFindNextAttr">ppdFindNextAttr
</a></h3>
1005 <p class=
"description">Find the next matching attribute.
</p>
1007 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *ppdFindNextAttr (
<br>
1008 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1009 const char *name,
<br>
1010 const char *spec
<br>
1012 <h4 class=
"parameters">Parameters
</h4>
1015 <dd class=
"description">PPD file data
</dd>
1017 <dd class=
"description">Attribute name
</dd>
1019 <dd class=
"description">Specifier string or
<code>NULL
</code></dd>
1021 <h4 class=
"returnvalue">Return Value
</h4>
1022 <p class=
"description">Attribute or
<code>NULL
</code> if not found
</p>
1023 <h3 class=
"function"><a name=
"ppdFindOption">ppdFindOption
</a></h3>
1024 <p class=
"description">Return a pointer to the specified option.
</p>
1026 <a href=
"#ppd_option_t">ppd_option_t
</a> *ppdFindOption (
<br>
1027 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1028 const char *option
<br>
1030 <h4 class=
"parameters">Parameters
</h4>
1033 <dd class=
"description">PPD file data
</dd>
1035 <dd class=
"description">Option/Keyword name
</dd>
1037 <h4 class=
"returnvalue">Return Value
</h4>
1038 <p class=
"description">Pointer to option or
<code>NULL
</code></p>
1039 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdFirstCustomParam">ppdFirstCustomParam
</a></h3>
1040 <p class=
"description">Return the first parameter for a custom option.
</p>
1042 <a href=
"#ppd_cparam_t">ppd_cparam_t
</a> *ppdFirstCustomParam (
<br>
1043 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *opt
<br>
1045 <h4 class=
"parameters">Parameters
</h4>
1048 <dd class=
"description">Custom option
</dd>
1050 <h4 class=
"returnvalue">Return Value
</h4>
1051 <p class=
"description">Custom parameter or NULL
</p>
1052 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdFirstOption">ppdFirstOption
</a></h3>
1053 <p class=
"description">Return the first option in the PPD file.
</p>
1055 <a href=
"#ppd_option_t">ppd_option_t
</a> *ppdFirstOption (
<br>
1056 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
1058 <h4 class=
"parameters">Parameters
</h4>
1061 <dd class=
"description">PPD file
</dd>
1063 <h4 class=
"returnvalue">Return Value
</h4>
1064 <p class=
"description">First option or
<code>NULL
</code></p>
1065 <h4 class=
"discussion">Discussion
</h4>
1066 <p class=
"discussion">Options are returned from all groups in ascending alphanumeric order.
1069 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"ppdInstallableConflict">ppdInstallableConflict
</a></h3>
1070 <p class=
"description">Test whether an option choice conflicts with
1071 an installable option.
</p>
1073 int ppdInstallableConflict (
<br>
1074 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1075 const char *option,
<br>
1076 const char *choice
<br>
1078 <h4 class=
"parameters">Parameters
</h4>
1081 <dd class=
"description">PPD file
</dd>
1083 <dd class=
"description">Option
</dd>
1085 <dd class=
"description">Choice
</dd>
1087 <h4 class=
"returnvalue">Return Value
</h4>
1088 <p class=
"description">1 if conflicting,
0 if not conflicting
</p>
1089 <h4 class=
"discussion">Discussion
</h4>
1090 <p class=
"discussion">This function tests whether a particular option choice is available based
1091 on constraints against options in the
"InstallableOptions
" group.
1094 <h3 class=
"function"><a name=
"ppdIsMarked">ppdIsMarked
</a></h3>
1095 <p class=
"description">Check to see if an option is marked.
</p>
1097 int ppdIsMarked (
<br>
1098 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1099 const char *option,
<br>
1100 const char *choice
<br>
1102 <h4 class=
"parameters">Parameters
</h4>
1105 <dd class=
"description">PPD file data
</dd>
1107 <dd class=
"description">Option/Keyword name
</dd>
1109 <dd class=
"description">Choice name
</dd>
1111 <h4 class=
"returnvalue">Return Value
</h4>
1112 <p class=
"description">Non-zero if option is marked
</p>
1113 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppdLastError">ppdLastError
</a></h3>
1114 <p class=
"description">Return the status from the last ppdOpen*().
</p>
1116 <a href=
"#ppd_status_t">ppd_status_t
</a> ppdLastError (
<br>
1117 int *line
<br>
1119 <h4 class=
"parameters">Parameters
</h4>
1122 <dd class=
"description">Line number
</dd>
1124 <h4 class=
"returnvalue">Return Value
</h4>
1125 <p class=
"description">Status code
</p>
1126 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdLocalize">ppdLocalize
</a></h3>
1127 <p class=
"description">Localize the PPD file to the current locale.
</p>
1129 int ppdLocalize (
<br>
1130 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
1132 <h4 class=
"parameters">Parameters
</h4>
1135 <dd class=
"description">PPD file
</dd>
1137 <h4 class=
"returnvalue">Return Value
</h4>
1138 <p class=
"description">0 on success, -
1 on error
</p>
1139 <h4 class=
"discussion">Discussion
</h4>
1140 <p class=
"discussion">All groups, options, and choices are localized, as are ICC profile
1141 descriptions, printer presets, and custom option parameters. Each
1142 localized string uses the UTF-
8 character encoding.
1145 <h3 class=
"function"><a name=
"ppdLocalizeAttr">ppdLocalizeAttr
</a></h3>
1146 <p class=
"description">Localize an attribute.
</p>
1148 <a href=
"#ppd_attr_t">ppd_attr_t
</a> *ppdLocalizeAttr (
<br>
1149 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1150 const char *keyword,
<br>
1151 const char *spec
<br>
1153 <h4 class=
"parameters">Parameters
</h4>
1156 <dd class=
"description">PPD file
</dd>
1158 <dd class=
"description">Main keyword
</dd>
1160 <dd class=
"description">Option keyword or
<code>NULL
</code> for none
</dd>
1162 <h4 class=
"returnvalue">Return Value
</h4>
1163 <p class=
"description">Localized attribute or
<code>NULL
</code> if none exists
</p>
1164 <h4 class=
"discussion">Discussion
</h4>
1165 <p class=
"discussion">This function uses the current locale to find the localized attribute for
1166 the given main and option keywords. If no localized version of the
1167 attribute exists for the current locale, the unlocalized version is returned.
</p>
1168 <h3 class=
"function"><span class=
"info"> CUPS
1.3 </span><a name=
"ppdLocalizeIPPReason">ppdLocalizeIPPReason
</a></h3>
1169 <p class=
"description">Get the localized version of a cupsIPPReason
1172 const char *ppdLocalizeIPPReason (
<br>
1173 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1174 const char *reason,
<br>
1175 const char *scheme,
<br>
1176 char *buffer,
<br>
1177 size_t bufsize
<br>
1179 <h4 class=
"parameters">Parameters
</h4>
1182 <dd class=
"description">PPD file
</dd>
1184 <dd class=
"description">IPP reason keyword to look up
</dd>
1186 <dd class=
"description">URI scheme or NULL for text
</dd>
1188 <dd class=
"description">Value buffer
</dd>
1190 <dd class=
"description">Size of value buffer
</dd>
1192 <h4 class=
"returnvalue">Return Value
</h4>
1193 <p class=
"description">Value or NULL if not found
</p>
1194 <h4 class=
"discussion">Discussion
</h4>
1195 <p class=
"discussion">This function uses the current locale to find the corresponding reason
1196 text or URI from the attribute value. If
"scheme
" is NULL or
"text
",
1197 the returned value contains human-readable (UTF-
8) text from the translation
1198 string or attribute value. Otherwise the corresponding URI is returned.
<br>
1200 If no value of the requested scheme can be found, NULL is returned.
1203 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"ppdLocalizeMarkerName">ppdLocalizeMarkerName
</a></h3>
1204 <p class=
"description">Get the localized version of a marker-names
1205 attribute value.
</p>
1207 const char *ppdLocalizeMarkerName (
<br>
1208 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1209 const char *name
<br>
1211 <h4 class=
"parameters">Parameters
</h4>
1214 <dd class=
"description">PPD file
</dd>
1216 <dd class=
"description">Marker name to look up
</dd>
1218 <h4 class=
"returnvalue">Return Value
</h4>
1219 <p class=
"description">Value or
<code>NULL
</code> if not found
</p>
1220 <h4 class=
"discussion">Discussion
</h4>
1221 <p class=
"discussion">This function uses the current locale to find the corresponding name
1222 text from the attribute value. If no localized text for the requested
1223 name can be found,
<code>NULL
</code> is returned.
1226 <h3 class=
"function"><a name=
"ppdMarkDefaults">ppdMarkDefaults
</a></h3>
1227 <p class=
"description">Mark all default options in the PPD file.
</p>
1229 void ppdMarkDefaults (
<br>
1230 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
1232 <h4 class=
"parameters">Parameters
</h4>
1235 <dd class=
"description">PPD file record
</dd>
1237 <h3 class=
"function"><a name=
"ppdMarkOption">ppdMarkOption
</a></h3>
1238 <p class=
"description">Mark an option in a PPD file and return the number of
1241 int ppdMarkOption (
<br>
1242 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1243 const char *option,
<br>
1244 const char *choice
<br>
1246 <h4 class=
"parameters">Parameters
</h4>
1249 <dd class=
"description">PPD file record
</dd>
1251 <dd class=
"description">Keyword
</dd>
1253 <dd class=
"description">Option name
</dd>
1255 <h4 class=
"returnvalue">Return Value
</h4>
1256 <p class=
"description">Number of conflicts
</p>
1257 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdNextCustomParam">ppdNextCustomParam
</a></h3>
1258 <p class=
"description">Return the next parameter for a custom option.
</p>
1260 <a href=
"#ppd_cparam_t">ppd_cparam_t
</a> *ppdNextCustomParam (
<br>
1261 <a href=
"#ppd_coption_t">ppd_coption_t
</a> *opt
<br>
1263 <h4 class=
"parameters">Parameters
</h4>
1266 <dd class=
"description">Custom option
</dd>
1268 <h4 class=
"returnvalue">Return Value
</h4>
1269 <p class=
"description">Custom parameter or NULL
</p>
1270 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdNextOption">ppdNextOption
</a></h3>
1271 <p class=
"description">Return the next option in the PPD file.
</p>
1273 <a href=
"#ppd_option_t">ppd_option_t
</a> *ppdNextOption (
<br>
1274 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd
<br>
1276 <h4 class=
"parameters">Parameters
</h4>
1279 <dd class=
"description">PPD file
</dd>
1281 <h4 class=
"returnvalue">Return Value
</h4>
1282 <p class=
"description">Next option or
<code>NULL
</code></p>
1283 <h4 class=
"discussion">Discussion
</h4>
1284 <p class=
"discussion">Options are returned from all groups in ascending alphanumeric order.
1287 <h3 class=
"function"><a name=
"ppdOpen">ppdOpen
</a></h3>
1288 <p class=
"description">Read a PPD file into memory.
</p>
1290 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppdOpen (
<br>
1291 FILE *fp
<br>
1293 <h4 class=
"parameters">Parameters
</h4>
1296 <dd class=
"description">File to read from
</dd>
1298 <h4 class=
"returnvalue">Return Value
</h4>
1299 <p class=
"description">PPD file record
</p>
1300 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ppdOpen2">ppdOpen2
</a></h3>
1301 <p class=
"description">Read a PPD file into memory.
</p>
1303 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppdOpen2 (
<br>
1304 cups_file_t *fp
<br>
1306 <h4 class=
"parameters">Parameters
</h4>
1309 <dd class=
"description">File to read from
</dd>
1311 <h4 class=
"returnvalue">Return Value
</h4>
1312 <p class=
"description">PPD file record or
<code>NULL
</code> if the PPD file could not be opened.
</p>
1313 <h3 class=
"function"><a name=
"ppdOpenFd">ppdOpenFd
</a></h3>
1314 <p class=
"description">Read a PPD file into memory.
</p>
1316 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppdOpenFd (
<br>
1317 int fd
<br>
1319 <h4 class=
"parameters">Parameters
</h4>
1322 <dd class=
"description">File to read from
</dd>
1324 <h4 class=
"returnvalue">Return Value
</h4>
1325 <p class=
"description">PPD file record or
<code>NULL
</code> if the PPD file could not be opened.
</p>
1326 <h3 class=
"function"><a name=
"ppdOpenFile">ppdOpenFile
</a></h3>
1327 <p class=
"description">Read a PPD file into memory.
</p>
1329 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppdOpenFile (
<br>
1330 const char *filename
<br>
1332 <h4 class=
"parameters">Parameters
</h4>
1335 <dd class=
"description">File to read from
</dd>
1337 <h4 class=
"returnvalue">Return Value
</h4>
1338 <p class=
"description">PPD file record or
<code>NULL
</code> if the PPD file could not be opened.
</p>
1339 <h3 class=
"function"><a name=
"ppdPageLength">ppdPageLength
</a></h3>
1340 <p class=
"description">Get the page length for the given size.
</p>
1342 float ppdPageLength (
<br>
1343 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1344 const char *name
<br>
1346 <h4 class=
"parameters">Parameters
</h4>
1349 <dd class=
"description">PPD file
</dd>
1351 <dd class=
"description">Size name
</dd>
1353 <h4 class=
"returnvalue">Return Value
</h4>
1354 <p class=
"description">Length of page in points or
0.0</p>
1355 <h3 class=
"function"><a name=
"ppdPageSize">ppdPageSize
</a></h3>
1356 <p class=
"description">Get the page size record for the given size.
</p>
1358 <a href=
"#ppd_size_t">ppd_size_t
</a> *ppdPageSize (
<br>
1359 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1360 const char *name
<br>
1362 <h4 class=
"parameters">Parameters
</h4>
1365 <dd class=
"description">PPD file record
</dd>
1367 <dd class=
"description">Size name
</dd>
1369 <h4 class=
"returnvalue">Return Value
</h4>
1370 <p class=
"description">Size record for page or NULL
</p>
1371 <h3 class=
"function"><a name=
"ppdPageWidth">ppdPageWidth
</a></h3>
1372 <p class=
"description">Get the page width for the given size.
</p>
1374 float ppdPageWidth (
<br>
1375 <a href=
"#ppd_file_t">ppd_file_t
</a> *ppd,
<br>
1376 const char *name
<br>
1378 <h4 class=
"parameters">Parameters
</h4>
1381 <dd class=
"description">PPD file record
</dd>
1383 <dd class=
"description">Size name
</dd>
1385 <h4 class=
"returnvalue">Return Value
</h4>
1386 <p class=
"description">Width of page in points or
0.0</p>
1387 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20 </span><a name=
"ppdSetConformance">ppdSetConformance
</a></h3>
1388 <p class=
"description">Set the conformance level for PPD files.
</p>
1390 void ppdSetConformance (
<br>
1391 <a href=
"#ppd_conform_t">ppd_conform_t
</a> c
<br>
1393 <h4 class=
"parameters">Parameters
</h4>
1396 <dd class=
"description">Conformance level
</dd>
1398 <h2 class=
"title"><a name=
"TYPES">Data Types
</a></h2>
1399 <h3 class=
"typedef"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppd_attr_t">ppd_attr_t
</a></h3>
1400 <p class=
"description">PPD Attribute Structure
</p>
1402 typedef struct
<a href=
"#ppd_attr_s">ppd_attr_s
</a> ppd_attr_t;
1404 <h3 class=
"typedef"><a name=
"ppd_choice_t">ppd_choice_t
</a></h3>
1405 <p class=
"description">Option choices
</p>
1407 typedef struct
<a href=
"#ppd_choice_s">ppd_choice_s
</a> ppd_choice_t;
1409 <h3 class=
"typedef"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppd_conform_t">ppd_conform_t
</a></h3>
1410 <p class=
"description">Conformance Levels
</p>
1412 typedef enum
<a href=
"#ppd_conform_e">ppd_conform_e
</a> ppd_conform_t;
1414 <h3 class=
"typedef"><a name=
"ppd_const_t">ppd_const_t
</a></h3>
1415 <p class=
"description">Constraints
</p>
1417 typedef struct
<a href=
"#ppd_const_s">ppd_const_s
</a> ppd_const_t;
1419 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_coption_t">ppd_coption_t
</a></h3>
1420 <p class=
"description">Custom Option
</p>
1422 typedef struct
<a href=
"#ppd_coption_s">ppd_coption_s
</a> ppd_coption_t;
1424 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cparam_t">ppd_cparam_t
</a></h3>
1425 <p class=
"description">Custom Parameter
</p>
1427 typedef struct
<a href=
"#ppd_cparam_s">ppd_cparam_s
</a> ppd_cparam_t;
1429 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cplimit_t">ppd_cplimit_t
</a></h3>
1430 <p class=
"description">Custom Parameter Limit
</p>
1432 typedef union
<a href=
"#ppd_cplimit_u">ppd_cplimit_u
</a> ppd_cplimit_t;
1434 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cptype_t">ppd_cptype_t
</a></h3>
1435 <p class=
"description">Custom Parameter Type
</p>
1437 typedef enum
<a href=
"#ppd_cptype_e">ppd_cptype_e
</a> ppd_cptype_t;
1439 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cpvalue_t">ppd_cpvalue_t
</a></h3>
1440 <p class=
"description">Custom Parameter Value
</p>
1442 typedef union
<a href=
"#ppd_cpvalue_u">ppd_cpvalue_u
</a> ppd_cpvalue_t;
1444 <h3 class=
"typedef"><a name=
"ppd_cs_t">ppd_cs_t
</a></h3>
1445 <p class=
"description">Colorspaces
</p>
1447 typedef enum
<a href=
"#ppd_cs_e">ppd_cs_e
</a> ppd_cs_t;
1449 <h3 class=
"typedef"><a name=
"ppd_emul_t">ppd_emul_t
</a></h3>
1450 <p class=
"description">Emulators
</p>
1452 typedef struct
<a href=
"#ppd_emul_s">ppd_emul_s
</a> ppd_emul_t;
1454 <h3 class=
"typedef"><a name=
"ppd_file_t">ppd_file_t
</a></h3>
1455 <p class=
"description">PPD File
</p>
1457 typedef struct
<a href=
"#ppd_file_s">ppd_file_s
</a> ppd_file_t;
1459 <h3 class=
"typedef"><a name=
"ppd_group_t">ppd_group_t
</a></h3>
1460 <p class=
"description">Groups
</p>
1462 typedef struct
<a href=
"#ppd_group_s">ppd_group_s
</a> ppd_group_t;
1464 <h3 class=
"typedef"><a name=
"ppd_option_t">ppd_option_t
</a></h3>
1465 <p class=
"description">Options
</p>
1467 typedef struct
<a href=
"#ppd_option_s">ppd_option_s
</a> ppd_option_t;
1469 <h3 class=
"typedef"><a name=
"ppd_profile_t">ppd_profile_t
</a></h3>
1470 <p class=
"description">sRGB Color Profiles
</p>
1472 typedef struct
<a href=
"#ppd_profile_s">ppd_profile_s
</a> ppd_profile_t;
1474 <h3 class=
"typedef"><a name=
"ppd_section_t">ppd_section_t
</a></h3>
1475 <p class=
"description">Order dependency sections
</p>
1477 typedef enum
<a href=
"#ppd_section_e">ppd_section_e
</a> ppd_section_t;
1479 <h3 class=
"typedef"><a name=
"ppd_size_t">ppd_size_t
</a></h3>
1480 <p class=
"description">Page Sizes
</p>
1482 typedef struct
<a href=
"#ppd_size_s">ppd_size_s
</a> ppd_size_t;
1484 <h3 class=
"typedef"><a name=
"ppd_status_t">ppd_status_t
</a></h3>
1485 <p class=
"description">Types and structures...
</p>
1487 typedef enum
<a href=
"#ppd_status_e">ppd_status_e
</a> ppd_status_t;
1489 <h3 class=
"typedef"><a name=
"ppd_ui_t">ppd_ui_t
</a></h3>
1490 <p class=
"description">UI Types
</p>
1492 typedef enum
<a href=
"#ppd_ui_e">ppd_ui_e
</a> ppd_ui_t;
1494 <h2 class=
"title"><a name=
"STRUCTURES">Structures
</a></h2>
1495 <h3 class=
"struct"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ppd_attr_s">ppd_attr_s
</a></h3>
1496 <p class=
"description">PPD Attribute Structure
</p>
1497 <p class=
"code">struct ppd_attr_s {
<br>
1498 char name[PPD_MAX_NAME];
<br>
1499 char spec[PPD_MAX_NAME];
<br>
1500 char text[PPD_MAX_TEXT];
<br>
1501 char *value;
<br>
1503 <h4 class=
"members">Members
</h4>
1505 <dt>name[PPD_MAX_NAME]
</dt>
1506 <dd class=
"description">Name of attribute (cupsXYZ)
</dd>
1507 <dt>spec[PPD_MAX_NAME]
</dt>
1508 <dd class=
"description">Specifier string, if any
</dd>
1509 <dt>text[PPD_MAX_TEXT]
</dt>
1510 <dd class=
"description">Human-readable text, if any
</dd>
1512 <dd class=
"description">Value string
</dd>
1514 <h3 class=
"struct"><a name=
"ppd_choice_s">ppd_choice_s
</a></h3>
1515 <p class=
"description">Option choices
</p>
1516 <p class=
"code">struct ppd_choice_s {
<br>
1517 char choice[PPD_MAX_NAME];
<br>
1518 char *code;
<br>
1519 char marked;
<br>
1520 <a href=
"#ppd_option_t">ppd_option_t
</a> *option;
<br>
1521 char text[PPD_MAX_TEXT];
<br>
1523 <h4 class=
"members">Members
</h4>
1525 <dt>choice[PPD_MAX_NAME]
</dt>
1526 <dd class=
"description">Computer-readable option name
</dd>
1528 <dd class=
"description">Code to send for this option
</dd>
1530 <dd class=
"description">0 if not selected,
1 otherwise
</dd>
1532 <dd class=
"description">Pointer to parent option structure
</dd>
1533 <dt>text[PPD_MAX_TEXT]
</dt>
1534 <dd class=
"description">Human-readable option name
</dd>
1536 <h3 class=
"struct"><a name=
"ppd_const_s">ppd_const_s
</a></h3>
1537 <p class=
"description">Constraints
</p>
1538 <p class=
"code">struct ppd_const_s {
<br>
1539 char choice1[PPD_MAX_NAME];
<br>
1540 char choice2[PPD_MAX_NAME];
<br>
1541 char option1[PPD_MAX_NAME];
<br>
1542 char option2[PPD_MAX_NAME];
<br>
1544 <h4 class=
"members">Members
</h4>
1546 <dt>choice1[PPD_MAX_NAME]
</dt>
1547 <dd class=
"description">First option/choice (blank for all)
</dd>
1548 <dt>choice2[PPD_MAX_NAME]
</dt>
1549 <dd class=
"description">Second option/choice (blank for all)
</dd>
1550 <dt>option1[PPD_MAX_NAME]
</dt>
1551 <dd class=
"description">First keyword
</dd>
1552 <dt>option2[PPD_MAX_NAME]
</dt>
1553 <dd class=
"description">Second keyword
</dd>
1555 <h3 class=
"struct"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_coption_s">ppd_coption_s
</a></h3>
1556 <p class=
"description">Custom Option
</p>
1557 <p class=
"code">struct ppd_coption_s {
<br>
1558 char keyword[PPD_MAX_NAME];
<br>
1559 int marked;
<br>
1560 <a href=
"#ppd_option_t">ppd_option_t
</a> *option;
<br>
1561 cups_array_t *params;
<br>
1563 <h4 class=
"members">Members
</h4>
1565 <dt>keyword[PPD_MAX_NAME]
</dt>
1566 <dd class=
"description">Name of option that is being extended...
</dd>
1568 <dd class=
"description">Extended option is marked
</dd>
1570 <dd class=
"description">Option that is being extended...
</dd>
1572 <dd class=
"description">Parameters
</dd>
1574 <h3 class=
"struct"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cparam_s">ppd_cparam_s
</a></h3>
1575 <p class=
"description">Custom Parameter
</p>
1576 <p class=
"code">struct ppd_cparam_s {
<br>
1577 <a href=
"#ppd_cpvalue_t">ppd_cpvalue_t
</a> current;
<br>
1578 <a href=
"#ppd_cplimit_t">ppd_cplimit_t
</a> minimum, maximum;
<br>
1579 char name[PPD_MAX_NAME];
<br>
1580 int order;
<br>
1581 char text[PPD_MAX_TEXT];
<br>
1582 <a href=
"#ppd_cptype_t">ppd_cptype_t
</a> type;
<br>
1584 <h4 class=
"members">Members
</h4>
1587 <dd class=
"description">Current value
</dd>
1589 <dd class=
"description">Maximum value
</dd>
1590 <dt>name[PPD_MAX_NAME]
</dt>
1591 <dd class=
"description">Parameter name
</dd>
1593 <dd class=
"description">Order (
0 to N)
</dd>
1594 <dt>text[PPD_MAX_TEXT]
</dt>
1595 <dd class=
"description">Human-readable text
</dd>
1597 <dd class=
"description">Parameter type
</dd>
1599 <h3 class=
"struct"><a name=
"ppd_emul_s">ppd_emul_s
</a></h3>
1600 <p class=
"description">Emulators
</p>
1601 <p class=
"code">struct ppd_emul_s {
<br>
1602 char name[PPD_MAX_NAME];
<br>
1603 char *start;
<br>
1604 char *stop;
<br>
1606 <h4 class=
"members">Members
</h4>
1608 <dt>name[PPD_MAX_NAME]
</dt>
1609 <dd class=
"description">Emulator name
</dd>
1611 <dd class=
"description">Code to switch to this emulation
</dd>
1613 <dd class=
"description">Code to stop this emulation
</dd>
1615 <h3 class=
"struct"><a name=
"ppd_file_s">ppd_file_s
</a></h3>
1616 <p class=
"description">PPD File
</p>
1617 <p class=
"code">struct ppd_file_s {
<br>
1618 int accurate_screens;
<br>
1619 int color_device;
<br>
1620 <a href=
"#ppd_cs_t">ppd_cs_t
</a> colorspace;
<br>
1621 <a href=
"#ppd_const_t">ppd_const_t
</a> *consts;
<br>
1622 int contone_only;
<br>
1623 float custom_margins[
4];
<br>
1624 float custom_max[
2];
<br>
1625 float custom_min[
2];
<br>
1626 <a href=
"#ppd_emul_t">ppd_emul_t
</a> *emulations;
<br>
1627 char **filters;
<br>
1628 int flip_duplex;
<br>
1629 char **fonts;
<br>
1630 <a href=
"#ppd_group_t">ppd_group_t
</a> *groups;
<br>
1631 char *jcl_begin;
<br>
1632 char *jcl_end;
<br>
1633 char *jcl_ps;
<br>
1634 int landscape;
<br>
1635 char *lang_encoding;
<br>
1636 char *lang_version;
<br>
1637 int language_level;
<br>
1638 int manual_copies;
<br>
1639 char *manufacturer;
<br>
1640 int model_number;
<br>
1641 char *modelname;
<br>
1642 char *nickname;
<br>
1643 int num_consts;
<br>
1644 int num_emulations;
<br>
1645 int num_filters;
<br>
1646 int num_fonts;
<br>
1647 int num_groups;
<br>
1648 int num_profiles;
<br>
1649 int num_sizes;
<br>
1650 char *patches;
<br>
1651 char *pcfilename;
<br>
1652 char *product;
<br>
1653 <a href=
"#ppd_profile_t">ppd_profile_t
</a> *profiles;
<br>
1654 char *protocols;
<br>
1655 char *shortnickname;
<br>
1656 <a href=
"#ppd_size_t">ppd_size_t
</a> *sizes;
<br>
1657 int throughput;
<br>
1658 char *ttrasterizer;
<br>
1659 int variable_sizes;
<br>
1661 <h4 class=
"members">Members
</h4>
1663 <dt>accurate_screens
</dt>
1664 <dd class=
"description">1 = supports accurate screens,
0 = not
</dd>
1665 <dt>color_device
</dt>
1666 <dd class=
"description">1 = color device,
0 = grayscale
</dd>
1667 <dt>colorspace
</dt>
1668 <dd class=
"description">Default colorspace
</dd>
1670 <dd class=
"description">UI/Non-UI constraints
</dd>
1671 <dt>contone_only
</dt>
1672 <dd class=
"description">1 = continuous tone only,
0 = not
</dd>
1673 <dt>custom_margins[
4]
</dt>
1674 <dd class=
"description">Margins around page
</dd>
1675 <dt>custom_max[
2]
</dt>
1676 <dd class=
"description">Maximum variable page size
</dd>
1677 <dt>custom_min[
2]
</dt>
1678 <dd class=
"description">Minimum variable page size
</dd>
1679 <dt>emulations
</dt>
1680 <dd class=
"description">Emulations and the code to invoke them
</dd>
1682 <dd class=
"description">Filter strings...
</dd>
1683 <dt>flip_duplex
<span class=
"info"> DEPRECATED
</span></dt>
1684 <dd class=
"description">1 = Flip page for back sides
</dd>
1686 <dd class=
"description">Pre-loaded fonts
</dd>
1688 <dd class=
"description">UI groups
</dd>
1690 <dd class=
"description">Start JCL commands
</dd>
1692 <dd class=
"description">End JCL commands
</dd>
1694 <dd class=
"description">Enter PostScript interpreter
</dd>
1696 <dd class=
"description">-
90 or
90</dd>
1697 <dt>lang_encoding
</dt>
1698 <dd class=
"description">Language encoding
</dd>
1699 <dt>lang_version
</dt>
1700 <dd class=
"description">Language version (English, Spanish, etc.)
</dd>
1701 <dt>language_level
</dt>
1702 <dd class=
"description">Language level of device
</dd>
1703 <dt>manual_copies
</dt>
1704 <dd class=
"description">1 = Copies done manually,
0 = hardware
</dd>
1705 <dt>manufacturer
</dt>
1706 <dd class=
"description">Manufacturer name
</dd>
1707 <dt>model_number
</dt>
1708 <dd class=
"description">Device-specific model number
</dd>
1710 <dd class=
"description">Model name (general)
</dd>
1712 <dd class=
"description">Nickname (specific)
</dd>
1713 <dt>num_consts
</dt>
1714 <dd class=
"description">Number of UI/Non-UI constraints
</dd>
1715 <dt>num_emulations
</dt>
1716 <dd class=
"description">Number of emulations supported
</dd>
1717 <dt>num_filters
</dt>
1718 <dd class=
"description">Number of filters
</dd>
1720 <dd class=
"description">Number of pre-loaded fonts
</dd>
1721 <dt>num_groups
</dt>
1722 <dd class=
"description">Number of UI groups
</dd>
1723 <dt>num_profiles
<span class=
"info"> DEPRECATED
</span></dt>
1724 <dd class=
"description">Number of sRGB color profiles
</dd>
1726 <dd class=
"description">Number of page sizes
</dd>
1728 <dd class=
"description">Patch commands to be sent to printer
</dd>
1729 <dt>pcfilename
<span class=
"info"> CUPS
1.1.19 </span></dt>
1730 <dd class=
"description">PCFileName string
</dd>
1732 <dd class=
"description">Product name (from PS RIP/interpreter)
</dd>
1733 <dt>profiles
<span class=
"info"> DEPRECATED
</span></dt>
1734 <dd class=
"description">sRGB color profiles
</dd>
1735 <dt>protocols
<span class=
"info"> CUPS
1.1.19 </span></dt>
1736 <dd class=
"description">Protocols (BCP, TBCP) string
</dd>
1737 <dt>shortnickname
</dt>
1738 <dd class=
"description">Short version of nickname
</dd>
1740 <dd class=
"description">Page sizes
</dd>
1741 <dt>throughput
</dt>
1742 <dd class=
"description">Pages per minute
</dd>
1743 <dt>ttrasterizer
</dt>
1744 <dd class=
"description">Truetype rasterizer
</dd>
1745 <dt>variable_sizes
</dt>
1746 <dd class=
"description">1 = supports variable sizes,
0 = doesn't
</dd>
1748 <h3 class=
"struct"><a name=
"ppd_group_s">ppd_group_s
</a></h3>
1749 <p class=
"description">Groups
</p>
1750 <p class=
"code">struct ppd_group_s {
<br>
1751 char text[PPD_MAX_TEXT - PPD_MAX_NAME];
<br>
1752 char name[PPD_MAX_NAME];
<br>
1753 int num_options;
<br>
1754 int num_subgroups;
<br>
1755 <a href=
"#ppd_option_t">ppd_option_t
</a> *options;
<br>
1756 struct
<a href=
"#ppd_group_s">ppd_group_s
</a> *subgroups;
<br>
1758 <h4 class=
"members">Members
</h4>
1760 <dt>PPD_MAX_NAME]
</dt>
1761 <dd class=
"description">Human-readable group name
</dd>
1762 <dt>name[PPD_MAX_NAME]
<span class=
"info"> CUPS
1.1.18 </span></dt>
1763 <dd class=
"description">Group name
</dd>
1764 <dt>num_options
</dt>
1765 <dd class=
"description">Number of options
</dd>
1766 <dt>num_subgroups
</dt>
1767 <dd class=
"description">Number of sub-groups
</dd>
1769 <dd class=
"description">Options
</dd>
1771 <dd class=
"description">Sub-groups (max depth =
1)
</dd>
1773 <h3 class=
"struct"><a name=
"ppd_option_s">ppd_option_s
</a></h3>
1774 <p class=
"description">Options
</p>
1775 <p class=
"code">struct ppd_option_s {
<br>
1776 <a href=
"#ppd_choice_t">ppd_choice_t
</a> *choices;
<br>
1777 char conflicted;
<br>
1778 char defchoice[PPD_MAX_NAME];
<br>
1779 char keyword[PPD_MAX_NAME];
<br>
1780 int num_choices;
<br>
1781 float order;
<br>
1782 <a href=
"#ppd_section_t">ppd_section_t
</a> section;
<br>
1783 char text[PPD_MAX_TEXT];
<br>
1784 <a href=
"#ppd_ui_t">ppd_ui_t
</a> ui;
<br>
1786 <h4 class=
"members">Members
</h4>
1789 <dd class=
"description">Option choices
</dd>
1790 <dt>conflicted
</dt>
1791 <dd class=
"description">0 if no conflicts exist,
1 otherwise
</dd>
1792 <dt>defchoice[PPD_MAX_NAME]
</dt>
1793 <dd class=
"description">Default option choice
</dd>
1794 <dt>keyword[PPD_MAX_NAME]
</dt>
1795 <dd class=
"description">Option keyword name (
"PageSize
", etc.)
</dd>
1796 <dt>num_choices
</dt>
1797 <dd class=
"description">Number of option choices
</dd>
1799 <dd class=
"description">Order number
</dd>
1801 <dd class=
"description">Section for command
</dd>
1802 <dt>text[PPD_MAX_TEXT]
</dt>
1803 <dd class=
"description">Human-readable text
</dd>
1805 <dd class=
"description">Type of UI option
</dd>
1807 <h3 class=
"struct"><a name=
"ppd_profile_s">ppd_profile_s
</a></h3>
1808 <p class=
"description">sRGB Color Profiles
</p>
1809 <p class=
"code">struct ppd_profile_s {
<br>
1810 float density;
<br>
1811 float gamma;
<br>
1812 float matrix[
3][
3];
<br>
1813 char media_type[PPD_MAX_NAME];
<br>
1814 char resolution[PPD_MAX_NAME];
<br>
1816 <h4 class=
"members">Members
</h4>
1819 <dd class=
"description">Ink density to use
</dd>
1821 <dd class=
"description">Gamma correction to use
</dd>
1822 <dt>matrix[
3][
3]
</dt>
1823 <dd class=
"description">Transform matrix
</dd>
1824 <dt>media_type[PPD_MAX_NAME]
</dt>
1825 <dd class=
"description">Media type or
"-
"</dd>
1826 <dt>resolution[PPD_MAX_NAME]
</dt>
1827 <dd class=
"description">Resolution or
"-
"</dd>
1829 <h3 class=
"struct"><a name=
"ppd_size_s">ppd_size_s
</a></h3>
1830 <p class=
"description">Page Sizes
</p>
1831 <p class=
"code">struct ppd_size_s {
<br>
1832 float bottom;
<br>
1833 float left;
<br>
1834 float length;
<br>
1835 int marked;
<br>
1836 char name[PPD_MAX_NAME];
<br>
1837 float right;
<br>
1838 float top;
<br>
1839 float width;
<br>
1841 <h4 class=
"members">Members
</h4>
1844 <dd class=
"description">Bottom printable margin in points
</dd>
1846 <dd class=
"description">Left printable margin in points
</dd>
1848 <dd class=
"description">Length of media in points
</dd>
1850 <dd class=
"description">Page size selected?
</dd>
1851 <dt>name[PPD_MAX_NAME]
</dt>
1852 <dd class=
"description">Media size option
</dd>
1854 <dd class=
"description">Right printable margin in points
</dd>
1856 <dd class=
"description">Top printable margin in points
</dd>
1858 <dd class=
"description">Width of media in points
</dd>
1860 <h2 class=
"title"><a name=
"UNIONS">Unions
</a></h2>
1861 <h3 class=
"union"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cplimit_u">ppd_cplimit_u
</a></h3>
1862 <p class=
"description">Custom Parameter Limit
</p>
1863 <p class=
"code">union ppd_cplimit_u {
<br>
1864 float custom_curve;
<br>
1865 int custom_int;
<br>
1866 float custom_invcurve;
<br>
1867 int custom_passcode;
<br>
1868 int custom_password;
<br>
1869 float custom_points;
<br>
1870 float custom_real;
<br>
1871 int custom_string;
<br>
1873 <h4 class=
"members">Members
</h4>
1875 <dt>custom_curve
</dt>
1876 <dd class=
"description">Gamma value
</dd>
1877 <dt>custom_int
</dt>
1878 <dd class=
"description">Integer value
</dd>
1879 <dt>custom_invcurve
</dt>
1880 <dd class=
"description">Gamma value
</dd>
1881 <dt>custom_passcode
</dt>
1882 <dd class=
"description">Passcode length
</dd>
1883 <dt>custom_password
</dt>
1884 <dd class=
"description">Password length
</dd>
1885 <dt>custom_points
</dt>
1886 <dd class=
"description">Measurement value
</dd>
1887 <dt>custom_real
</dt>
1888 <dd class=
"description">Real value
</dd>
1889 <dt>custom_string
</dt>
1890 <dd class=
"description">String length
</dd>
1892 <h3 class=
"union"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cpvalue_u">ppd_cpvalue_u
</a></h3>
1893 <p class=
"description">Custom Parameter Value
</p>
1894 <p class=
"code">union ppd_cpvalue_u {
<br>
1895 float custom_curve;
<br>
1896 int custom_int;
<br>
1897 float custom_invcurve;
<br>
1898 char *custom_passcode;
<br>
1899 char *custom_password;
<br>
1900 float custom_points;
<br>
1901 float custom_real;
<br>
1902 char *custom_string;
<br>
1904 <h4 class=
"members">Members
</h4>
1906 <dt>custom_curve
</dt>
1907 <dd class=
"description">Gamma value
</dd>
1908 <dt>custom_int
</dt>
1909 <dd class=
"description">Integer value
</dd>
1910 <dt>custom_invcurve
</dt>
1911 <dd class=
"description">Gamma value
</dd>
1912 <dt>custom_passcode
</dt>
1913 <dd class=
"description">Passcode value
</dd>
1914 <dt>custom_password
</dt>
1915 <dd class=
"description">Password value
</dd>
1916 <dt>custom_points
</dt>
1917 <dd class=
"description">Measurement value
</dd>
1918 <dt>custom_real
</dt>
1919 <dd class=
"description">Real value
</dd>
1920 <dt>custom_string
</dt>
1921 <dd class=
"description">String value
</dd>
1923 <h2 class=
"title"><a name=
"ENUMERATIONS">Constants
</a></h2>
1924 <h3 class=
"enumeration"><a name=
"ppd_conform_e">ppd_conform_e
</a></h3>
1925 <p class=
"description"></p>
1926 <h4 class=
"constants">Constants
</h4>
1928 <dt>PPD_CONFORM_RELAXED
</dt>
1929 <dd class=
"description">Relax whitespace and control char
</dd>
1930 <dt>PPD_CONFORM_STRICT
</dt>
1931 <dd class=
"description">Require strict conformance
</dd>
1933 <h3 class=
"enumeration"><span class=
"info"> CUPS
1.2 </span><a name=
"ppd_cptype_e">ppd_cptype_e
</a></h3>
1934 <p class=
"description">Custom Parameter Type
</p>
1935 <h4 class=
"constants">Constants
</h4>
1937 <dt>PPD_CUSTOM_CURVE
</dt>
1938 <dd class=
"description">Curve value for f(x) = x^value
</dd>
1939 <dt>PPD_CUSTOM_INT
</dt>
1940 <dd class=
"description">Integer number value
</dd>
1941 <dt>PPD_CUSTOM_INVCURVE
</dt>
1942 <dd class=
"description">Curve value for f(x) = x^(
1/value)
</dd>
1943 <dt>PPD_CUSTOM_PASSCODE
</dt>
1944 <dd class=
"description">String of (hidden) numbers
</dd>
1945 <dt>PPD_CUSTOM_PASSWORD
</dt>
1946 <dd class=
"description">String of (hidden) characters
</dd>
1947 <dt>PPD_CUSTOM_POINTS
</dt>
1948 <dd class=
"description">Measurement value in points
</dd>
1949 <dt>PPD_CUSTOM_REAL
</dt>
1950 <dd class=
"description">Real number value
</dd>
1951 <dt>PPD_CUSTOM_STRING
</dt>
1952 <dd class=
"description">String of characters
</dd>
1954 <h3 class=
"enumeration"><a name=
"ppd_cs_e">ppd_cs_e
</a></h3>
1955 <p class=
"description">Colorspaces
</p>
1956 <h4 class=
"constants">Constants
</h4>
1958 <dt>PPD_CS_CMY
</dt>
1959 <dd class=
"description">CMY colorspace
</dd>
1960 <dt>PPD_CS_CMYK
</dt>
1961 <dd class=
"description">CMYK colorspace
</dd>
1962 <dt>PPD_CS_GRAY
</dt>
1963 <dd class=
"description">Grayscale colorspace
</dd>
1965 <dd class=
"description">DeviceN colorspace
</dd>
1966 <dt>PPD_CS_RGB
</dt>
1967 <dd class=
"description">RGB colorspace
</dd>
1968 <dt>PPD_CS_RGBK
</dt>
1969 <dd class=
"description">RGBK (K = gray) colorspace
</dd>
1971 <h3 class=
"enumeration"><a name=
"ppd_section_e">ppd_section_e
</a></h3>
1972 <p class=
"description">Order dependency sections
</p>
1973 <h4 class=
"constants">Constants
</h4>
1975 <dt>PPD_ORDER_ANY
</dt>
1976 <dd class=
"description">Option code can be anywhere in the file
</dd>
1977 <dt>PPD_ORDER_DOCUMENT
</dt>
1978 <dd class=
"description">... must be in the DocumentSetup section
</dd>
1979 <dt>PPD_ORDER_EXIT
</dt>
1980 <dd class=
"description">... must be sent prior to the document
</dd>
1981 <dt>PPD_ORDER_JCL
</dt>
1982 <dd class=
"description">... must be sent as a JCL command
</dd>
1983 <dt>PPD_ORDER_PAGE
</dt>
1984 <dd class=
"description">... must be in the PageSetup section
</dd>
1985 <dt>PPD_ORDER_PROLOG
</dt>
1986 <dd class=
"description">... must be in the Prolog section
</dd>
1988 <h3 class=
"enumeration"><a name=
"ppd_status_e">ppd_status_e
</a></h3>
1989 <p class=
"description">Types and structures...
</p>
1990 <h4 class=
"constants">Constants
</h4>
1992 <dt>PPD_ALLOC_ERROR
</dt>
1993 <dd class=
"description">Memory allocation error
</dd>
1994 <dt>PPD_BAD_CUSTOM_PARAM
</dt>
1995 <dd class=
"description">Bad custom parameter
</dd>
1996 <dt>PPD_BAD_OPEN_GROUP
</dt>
1997 <dd class=
"description">Bad OpenGroup
</dd>
1998 <dt>PPD_BAD_OPEN_UI
</dt>
1999 <dd class=
"description">Bad OpenUI/JCLOpenUI
</dd>
2000 <dt>PPD_BAD_ORDER_DEPENDENCY
</dt>
2001 <dd class=
"description">Bad OrderDependency
</dd>
2002 <dt>PPD_BAD_UI_CONSTRAINTS
</dt>
2003 <dd class=
"description">Bad UIConstraints
</dd>
2004 <dt>PPD_FILE_OPEN_ERROR
</dt>
2005 <dd class=
"description">Unable to open PPD file
</dd>
2006 <dt>PPD_ILLEGAL_CHARACTER
</dt>
2007 <dd class=
"description">Illegal control character
</dd>
2008 <dt>PPD_ILLEGAL_MAIN_KEYWORD
</dt>
2009 <dd class=
"description">Illegal main keyword string
</dd>
2010 <dt>PPD_ILLEGAL_OPTION_KEYWORD
</dt>
2011 <dd class=
"description">Illegal option keyword string
</dd>
2012 <dt>PPD_ILLEGAL_TRANSLATION
</dt>
2013 <dd class=
"description">Illegal translation string
</dd>
2014 <dt>PPD_ILLEGAL_WHITESPACE
</dt>
2015 <dd class=
"description">Illegal whitespace character
</dd>
2016 <dt>PPD_INTERNAL_ERROR
</dt>
2017 <dd class=
"description">Internal error
</dd>
2018 <dt>PPD_LINE_TOO_LONG
</dt>
2019 <dd class=
"description">Line longer than
255 chars
</dd>
2020 <dt>PPD_MISSING_ASTERISK
</dt>
2021 <dd class=
"description">Missing asterisk in column
0</dd>
2022 <dt>PPD_MISSING_PPDADOBE4
</dt>
2023 <dd class=
"description">Missing PPD-Adobe-
4.x header
</dd>
2024 <dt>PPD_MISSING_VALUE
</dt>
2025 <dd class=
"description">Missing value string
</dd>
2026 <dt>PPD_NESTED_OPEN_GROUP
</dt>
2027 <dd class=
"description">OpenGroup without a CloseGroup first
</dd>
2028 <dt>PPD_NESTED_OPEN_UI
</dt>
2029 <dd class=
"description">OpenUI/JCLOpenUI without a CloseUI/JCLCloseUI first
</dd>
2030 <dt>PPD_NULL_FILE
</dt>
2031 <dd class=
"description">NULL PPD file pointer
</dd>
2033 <dd class=
"description">OK
</dd>
2035 <h3 class=
"enumeration"><a name=
"ppd_ui_e">ppd_ui_e
</a></h3>
2036 <p class=
"description">UI Types
</p>
2037 <h4 class=
"constants">Constants
</h4>
2039 <dt>PPD_UI_BOOLEAN
</dt>
2040 <dd class=
"description">True or False option
</dd>
2041 <dt>PPD_UI_PICKMANY
</dt>
2042 <dd class=
"description">Pick zero or more from a list
</dd>
2043 <dt>PPD_UI_PICKONE
</dt>
2044 <dd class=
"description">Pick one from a list
</dd>