1 Linux Standard Base Printing Specification 4.1 2 3 Copyright © 2010 Linux Foundation 4 5 Permission is granted to copy, distribute and/or modify this 6 document under the terms of the GNU Free Documentation License, 7 Version 1.1; with no Invariant Sections, with no Front-Cover 8 Texts, and with no Back-Cover Texts. A copy of the license is 9 included in the section entitled "GNU Free Documentation 10 License". 11 12 Portions of the text may be copyrighted by the following 13 parties: 14 15 * The Regents of the University of California 16 * Free Software Foundation 17 * Ian F. Darwin 18 * Paul Vixie 19 * BSDI (now Wind River) 20 * Andrew G Morgan 21 * Jean-loup Gailly and Mark Adler 22 * Massachusetts Institute of Technology 23 * Apple Inc. 24 * Easy Software Products 25 * artofcode LLC 26 * Till Kamppeter 27 * Manfred Wassman 28 * Python Software Foundation 29 30 These excerpts are being used in accordance with their 31 respective licenses. 32 33 Linux is the registered trademark of Linus Torvalds in the U.S. 34 and other countries. 35 36 UNIX is a registered trademark of The Open Group. 37 38 LSB is a trademark of the Linux Foundation in the United States 39 and other countries. 40 41 AMD is a trademark of Advanced Micro Devices, Inc. 42 43 Intel and Itanium are registered trademarks and Intel386 is a 44 trademark of Intel Corporation. 45 46 PowerPC is a registered trademark and PowerPC Architecture is a 47 trademark of the IBM Corporation. 48 49 S/390 is a registered trademark of the IBM Corporation. 50 51 OpenGL is a registered trademark of Silicon Graphics, Inc. 52 __________________________________________________________ 53 54 Table of Contents 55 Foreword 56 Status of this Document 57 Introduction 58 I. Introductory Elements 59 60 1. Scope 61 2. Normative References 62 3. Requirements 63 64 3.1. Relevant Libraries 65 66 4. Terms and Definitions 67 5. Documentation Conventions 68 6. PPD Format Extensions 69 70 II. LSB Printing Libraries 71 72 7. Libraries 73 74 7.1. Interfaces for libcups 75 7.2. Data Definitions for libcups 76 7.3. Interface Definitions for libcups 77 7.4. Interfaces for libcupsimage 78 7.5. Data Definitions for libcupsimage 79 7.6. Interface Definitions for libcupsimage 80 81 III. Printing Commands 82 83 8. Printing Commands 84 85 8.1. Printing Commands 86 8.2. Command Behavior 87 88 IV. Execution Environment 89 90 9. File System Hierarchy 91 92 List of Tables 93 2-1. Normative References 94 3-1. Standard Library Names 95 7-1. libcups Definition 96 7-2. libcups - CUPS Convenience ABI Function Interfaces 97 7-3. libcupsimage Definition 98 7-4. libcupsimage - CUPS Raster ABI Function Interfaces 99 8-1. Commands And Utilities 100 __________________________________________________________ 101 102 Foreword 103 104 This is version 4.1 of the Linux Standard Base Printing 105 Specification. This specification is one of a series of volumes 106 under the collective title Linux Standard Base: 107 108 * Core 109 * C++ 110 * Desktop 111 * Languages 112 * Printing 113 114 Note that the Core, C++ and Desktop volumes consist of a 115 generic volume augmented by an architecture-specific volume. 116 __________________________________________________________ 117 118 Status of this Document 119 120 This is a released specification. Other documents may supersede 121 or augment this specification. A list of current Linux Standard 122 Base (LSB) specifications is available at 123 http://refspecs.linuxfoundation.org. 124 125 If you wish to make comments regarding this document in a 126 manner that is tracked by the LSB project, please submit them 127 using our public bug database at http://bugs.linuxbase.org. 128 Please enter your feedback, carefully indicating the title of 129 the section for which you are submitting feedback, and the 130 volume and version of the specification where you found the 131 problem, quoting the incorrect text if appropriate. If you are 132 suggesting a new feature, please indicate what the problem you 133 are trying to solve is. That is more important than the 134 solution, in fact. 135 136 If you do not have or wish to create a bug database account 137 then you can also e-mail feedback to 138 (subscribe, archives), 139 and arrangements will be made to transpose the comments to our 140 public bug database. 141 __________________________________________________________ 142 143 Introduction 144 145 The LSB defines a binary interface for application programs 146 that are compiled and packaged for LSB-conforming 147 implementations on many different hardware architectures. A 148 binary specification must include information specific to the 149 computer processor architecture for which it is intended. To 150 avoid the complexity of conditional descriptions, the 151 specification has instead been divided into generic parts which 152 are augmented by one of several architecture-specific parts, 153 depending on the target processor architecture; the generic 154 part will indicate when reference must be made to the 155 architecture part, and vice versa. 156 157 This document should be used in conjunction with the documents 158 it references. This document enumerates the system components 159 it includes, but descriptions of those components may be 160 included entirely or partly in this document, partly in other 161 documents, or entirely in other reference documents. For 162 example, the section that describes system service routines 163 includes a list of the system routines supported in this 164 interface, formal declarations of the data structures they use 165 that are visible to applications, and a pointer to the 166 underlying referenced specification for information about the 167 syntax and semantics of each call. Only those routines not 168 described in standards referenced by this document, or 169 extensions to those standards, are described in the detail. 170 Information referenced in this way is as much a part of this 171 document as is the information explicitly included here. 172 173 The specification carries a version number of either the form 174 x.y or x.y.z. This version number carries the following 175 meaning: 176 177 1. The first number (x) is the major version number. Versions 178 sharing the same major version number shall be compatible 179 in a backwards direction; that is, a newer version shall be 180 compatible with an older version. Any deletion of a library 181 results in a new major version number. Interfaces marked as 182 deprecated may be removed from the specification at a major 183 version change. 184 2. The second number (y) is the minor version number. 185 Libraries and individual interfaces may be added, but not 186 removed. Interfaces may be marked as deprecated at a minor 187 version change. Other minor changes may be permitted at the 188 discretion of the LSB workgroup. 189 3. The third number (z), if present, is the editorial level. 190 Only editorial changes should be included in such versions. 191 192 Since this specification is a descriptive Application Binary 193 Interface, and not a source level API specification, it is not 194 possible to make a guarantee of 100% backward compatibility 195 between major releases. However, it is the intent that those 196 parts of the binary interface that are visible in the source 197 level API will remain backward compatible from version to 198 version, except where a feature marked as "Deprecated" in one 199 release may be removed from a future release. Implementors are 200 strongly encouraged to make use of symbol versioning to permit 201 simultaneous support of applications conforming to different 202 releases of this specification. 203 204 LSB is a trademark of the Linux Foundation. Developers of 205 applications or implementations interested in using the 206 trademark should see the Linux Foundation Certification Policy 207 for details. 208 209 I. Introductory Elements 210 211 Table of Contents 212 1. Scope 213 2. Normative References 214 3. Requirements 215 216 3.1. Relevant Libraries 217 218 4. Terms and Definitions 219 5. Documentation Conventions 220 6. PPD Format Extensions 221 __________________________________________________________ 222 223 Chapter 1. Scope 224 225 The LSB-Printing module defines the printing components found 226 on an LSB conforming system. 227 __________________________________________________________ 228 229 Chapter 2. Normative References 230 231 The specifications listed below are referenced in whole or in 232 part by the LSB-Printing Module Standard. Such references may 233 be normative or informative; a reference to specification shall 234 only be considered normative if it is explicitly cited as such. 235 The LSB-Printing Module may make normative references to a 236 portion of these specifications (that is, to define a specific 237 function or group of functions); in such cases, only the 238 explicitly referenced portion of the specification is to be 239 considered normative. 240 241 Table 2-1. Normative References 242 Name Title URL 243 CUPS API Reference CUPS 1.2 API Reference 244 http://www.cups.org/documentation.php/doc-1.2/ 245 Filesystem Hierarchy Standard Filesystem Hierarchy Standard 246 (FHS) 2.3 http://www.pathname.com/fhs/ 247 ISO C (1999) ISO/IEC 9899: 1999, Programming Languages --C 248 PPD Specification PostScript Printer Description File Format 249 Specification version 4.3 250 http://partners.adobe.com/public/developer/en/ps/5003.PPD_Spec_ 251 v4.3.pdf 252 PPD Specification Update Update to PPD Specification Version 253 4.3 254 http://partners.adobe.com/public/developer/en/ps/5645.PPD_Updat 255 e.pdf 256 __________________________________________________________ 257 258 Chapter 3. Requirements 259 260 3.1. Relevant Libraries 261 262 The libraries listed in Table 3-1 shall be available on a Linux 263 Standard Base system, with the specified runtime names. This 264 list may be supplemented or amended by the 265 architecture-specific specification. 266 267 Table 3-1. Standard Library Names 268 Library Runtime Name 269 libcups libcups.so.2 270 libcupsimage libcupsimage.so.2 271 272 These libraries will be in an implementation-defined directory 273 which the dynamic linker shall search by default. 274 __________________________________________________________ 275 276 Chapter 4. Terms and Definitions 277 278 For the purposes of this document, the terms given in ISO/IEC 279 Directives, Part 2, Annex H and the following apply. 280 281 archLSB 282 Some LSB specification documents have both a generic, 283 architecture-neutral part and an architecture-specific 284 part. The latter describes elements whose definitions 285 may be unique to a particular processor architecture. 286 The term archLSB may be used in the generic part to 287 refer to the corresponding section of the 288 architecture-specific part. 289 290 Binary Standard, ABI 291 The total set of interfaces that are available to be 292 used in the compiled binary code of a conforming 293 application, including the run-time details such as 294 calling conventions, binary format, C++ name mangling, 295 etc. 296 297 Implementation-defined 298 Describes a value or behavior that is not defined by 299 this document but is selected by an implementor. The 300 value or behavior may vary among implementations that 301 conform to this document. An application should not rely 302 on the existence of the value or behavior. An 303 application that relies on such a value or behavior 304 cannot be assured to be portable across conforming 305 implementations. The implementor shall document such a 306 value or behavior so that it can be used correctly by an 307 application. 308 309 Shell Script 310 A file that is read by an interpreter (e.g., awk). The 311 first line of the shell script includes a reference to 312 its interpreter binary. 313 314 Source Standard, API 315 The total set of interfaces that are available to be 316 used in the source code of a conforming application. Due 317 to translations, the Binary Standard and the Source 318 Standard may contain some different interfaces. 319 320 Undefined 321 Describes the nature of a value or behavior not defined 322 by this document which results from use of an invalid 323 program construct or invalid data input. The value or 324 behavior may vary among implementations that conform to 325 this document. An application should not rely on the 326 existence or validity of the value or behavior. An 327 application that relies on any particular value or 328 behavior cannot be assured to be portable across 329 conforming implementations. 330 331 Unspecified 332 Describes the nature of a value or behavior not 333 specified by this document which results from use of a 334 valid program construct or valid data input. The value 335 or behavior may vary among implementations that conform 336 to this document. An application should not rely on the 337 existence or validity of the value or behavior. An 338 application that relies on any particular value or 339 behavior cannot be assured to be portable across 340 conforming implementations. 341 342 In addition, for the portions of this specification which build 343 on IEEE Std 1003.1-2001, the definitions given in IEEE Std 344 1003.1-2001, Base Definitions, Chapter 3 apply. 345 __________________________________________________________ 346 347 Chapter 5. Documentation Conventions 348 349 Throughout this document, the following typographic conventions 350 are used: 351 352 function() 353 354 the name of a function 355 command 356 357 the name of a command or utility 358 CONSTANT 359 360 a constant value 361 parameter 362 363 a parameter 364 variable 365 366 a variable 367 368 Throughout this specification, several tables of interfaces are 369 presented. Each entry in these tables has the following format: 370 371 name 372 373 the name of the interface 374 (symver) 375 376 An optional symbol version identifier, if required. 377 [refno] 378 379 A reference number indexing the table of referenced 380 specifications that follows this table. 381 382 For example, 383 384 forkpty(GLIBC_2.0) [SUSv3] 385 386 refers to the interface named forkpty() with symbol version 387 GLIBC_2.0 that is defined in the SUSv3 reference. 388 389 Note: For symbols with versions which differ between 390 architectures, the symbol versions are defined in the 391 architecture specific parts of ISO/IEC 23360 only. 392 __________________________________________________________ 393 394 Chapter 6. PPD Format Extensions 395 396 The Postscript Printer Description (PPD) format is used in a 397 text file to describe device capabilities for a printing 398 device. PPD files shall conform to the format described by PPD 399 Specification and PPD Specification Update. In addition, 400 several extensions to the standard attribute list are 401 recognized, as listed below. The "cupsVersion" attribute is 402 required in a compliant PPD, while the other attributes are 403 optional. 404 405 cupsColorProfile 406 This string attribute specifies an sRGB-based color 407 profile consisting of gamma and density controls and a 408 3x3 CMY color transform matrix. 409 410 The attribute has the following parameter usage: 411 412 *cupsColorProfile Resolution/MediaType: "density gamma 413 m00 m01 m02 m10 m11 m12 m20 m21 m22" 414 415 The Resolution and MediaType values may be "-" to act as 416 a wildcard. Otherwise, they must match one of the 417 Resolution or MediaType attributes defined in the PPD 418 file. 419 420 The density and gamma values define the gamma and 421 density adjustment function such that (in terms of C 422 math): 423 424 f(x) = density * pow(x, gamma) 425 426 The m00 through m22 values define a 3x3 transformation 427 matrix for the CMY color values. The density function is 428 applied after the CMY transformation: 429 430 | m00 m01 m02 | | m10 m11 m12 | | m20 m21 m22 | 431 432 cupsFax 433 This boolean attribute specifies whether the PPD defines 434 a facsimile device. The default is false. 435 436 cupsFilter 437 The attribute has the following parameter usage: 438 439 *cupsFilter: "source/type cost program" 440 441 This string attribute provides a conversion rule from 442 the given source type to the printer's native format 443 using the filter "program". A source type is specified 444 according to the conventions of the MIME specification, 445 using "type/subtype" nomenclature, and may refer to a 446 standard MIME type or a CUPS-specific MIME type using 447 the prefix "vnd.cups-" in the subtype. If a printer 448 supports the source type directly, the special filter 449 program "-" may be specified. The cost is an arbitrary 450 positive integer, used to calculate the relative impact 451 a print job has on system load. 452 453 cupsManualCopies 454 This boolean attribute notifies the RIP filters that the 455 destination printer does not support copy generation in 456 hardware. The default value is false. 457 458 cupsModelNumber 459 This integer attribute specifies a printer-specific 460 model number. This number can be used by a filter 461 program to adjust the output for a specific model of 462 printer. 463 464 cupsVersion 465 The attribute has the following parameter usage: 466 467 *cupsVersion: "major.minor" 468 469 This required attribute describes which version of the 470 CUPS PPD file extensions was used. Currently it must be 471 the string "1.0" or "1.1". The strings "1.2" and "1.3" 472 represent newer versions of the CUPS PPD API that are 473 not covered in this version of the specification, and 474 are currently not allowed, although they may be found in 475 non-conforming PPDs which use a newer version of the 476 CUPS PPD specification. 477 478 FoomaticIDs 479 The attribute has the following parameter usage: 480 481 *FoomaticIDs printer driver 482 483 The parameters correspond to the IDs in the Foomatic 484 database for the printer and driver, respectively. 485 486 FoomaticNoPageAccounting 487 This boolean attribute tells foomatic-rip whether or not 488 to insert accounting information into the PostScript 489 data stream. By default, foomatic-rip will insert this 490 information. 491 492 FoomaticRIPCommandLine 493 The attribute has the following parameter usage: 494 495 *FoomaticRIPCommandLine "code" 496 497 This attribute defines the command line in the "code" 498 parameter for the renderer that is called by 499 foomatic-rip. The command must take PostScript on 500 standard input and provide the job data stream in the 501 printer's native language on standard output. The 502 command must exit with status 0 if the conversion was 503 successful and exit with another status if an error 504 occurs. The "code" parameter may contain option setting 505 wildcards, as described below under "FoomaticRIPOption". 506 507 FoomaticRIPDefault 508 The attribute has the following parameter usage: 509 510 *FoomaticRIPDefaultOptionName value 511 512 This attribute sets a default for a Foomatic option. The 513 name of the attribute should contain the name of the 514 option appended to "FoomaticRIPDefault", with the 515 desired default value as the only parameter. 516 517 This option is only used to provide numeric options in 518 the PPD, which are not supported by the Adobe spec, via 519 enumerated options, and should not be used except for 520 that purpose. 521 522 FoomaticRIPOption 523 The attribute has the following parameter usage: 524 525 *FoomaticRIPOption name: type style spot [order] 526 527 This attribute sets options for the command line 528 specified in the "FoomaticRIPCommandLine" attribute. The 529 "name" parameter specifies the option name, the "type" 530 parameter specifies the option type, the "style" 531 parameter specifies one of "CmdLine", "JCL", "PS", or 532 "Composite", and the "spot" parameter specifies a 533 letter, which is prepended with a "%" and used in the 534 "FoomaticRIPCommandLine" attribute to indicate where the 535 option should go in the command line. The optional 536 "order" parameter indicates an order number for 537 one-choice options. 538 539 FoomaticRIPOptionAllowedChars 540 The attribute has the following parameter usage: 541 542 *FoomaticRIPOptionAllowedChars name: "code" 543 544 This option sets a list of allowed characters in a 545 string option. The "name" parameter identifies the 546 option, while the "code" parameter is a list of allowed 547 characters. 548 549 FoomaticRIPOptionAllowedRegExp 550 The attribute has the following parameter usage: 551 552 *FoomaticRIPOptionAllowedRegExp name: "code" 553 554 This option causes the option named by "name" to be 555 validated by the Perl-style regular expression in 556 "code". 557 558 FoomaticRIPOptionMaxLength 559 The attribute has the following parameter usage: 560 561 *FoomaticRIPOptionMaxLength name: length 562 563 For string or password options, this attribute sets a 564 maximum length which can be returned. The "name" 565 parameter identifies the option, and the "length" 566 parameter is the maximum number of characters allowed. 567 568 FoomaticRIPOptionPrototype 569 The attribute has the following parameter usage: 570 571 *FoomaticRIPOptionPrototype name: "code" 572 573 For string, password, or simulated numeric options, this 574 attribute sets a code prototype to be inserted into the 575 output. This works for options where the 576 FoomaticRIPOption "style" parameter is set to CmdLine, 577 JCL, or PS. The value of the option can be represented 578 with the string "%s" in the "code" parameter. 579 580 FoomaticRIPOptionRange 581 The attribute has the following parameter usage: 582 583 *FoomaticRIPOptionRange name: min max 584 585 This attribute adds a minimux and maximum limit to 586 numeric options (that are simulated by Foomatic via 587 emumerated options). The "name" parameter identifies the 588 option, while the "min" and "max" parameters set the 589 minumum and maximum allowed values, respectively, for 590 the option. 591 592 FoomaticRIPOptionSetting 593 The attribute has the following parameter usage: 594 595 *FoomaticRIPOptionSetting name=choice: "code" 596 597 This attribute adds code to an option, identified by 598 "name", with a FoomaticRIPOption "style" parameter set 599 to Composite. It inserts options for other options that 600 are members of the Composite option "name". 601 602 FoomaticRIPPostPipe 603 The attribute has the following parameter usage: 604 605 *FoomaticRIPPostPipe "code" 606 607 This attribute defines the command line in the "code" 608 parameter for the job output command used by 609 foomatic-rip in standalone mode. The command should take 610 printer-native data on standard input. The "code" 611 parameter should include the preceding shell pipe symbol 612 ("|"). 613 614 II. LSB Printing Libraries 615 616 Table of Contents 617 7. Libraries 618 619 7.1. Interfaces for libcups 620 621 7.1.1. CUPS Convenience ABI 622 623 7.2. Data Definitions for libcups 624 625 7.2.1. cups/cups.h 626 7.2.2. cups/http.h 627 7.2.3. cups/ipp.h 628 7.2.4. cups/ppd.h 629 630 7.3. Interface Definitions for libcups 631 632 cupsAddDest -- Add a destination to the list of 633 destinations. 634 635 cupsAddOption -- Add an option to an option array. 636 cupsCancelJob -- Cancel a print job on the default 637 server. 638 639 cupsEncryption -- Get the default encryption 640 settings. 641 642 cupsFreeDests -- Free the memory used by the list of 643 destinations. 644 645 cupsFreeJobs -- Free memory used by job data. 646 cupsFreeOptions -- Free all memory used by options. 647 cupsGetDefault -- Get the default printer or class 648 for the default server. 649 650 cupsGetDest -- Get the named destination from the 651 list. 652 653 cupsGetDests -- Get the list of destinations from 654 the default server. 655 656 cupsGetJobs -- Get the jobs from the default server. 657 cupsGetOption -- Get an option value. 658 cupsGetPPD -- Get the PPD file for a printer on the 659 default server. 660 661 cupsGetPassword -- Get a password from the user. 662 cupsLangEncoding -- Return the character encoding 663 (us-ascii, etc.) 664 665 cupsLangFlush -- Flush all language data out of the 666 cache. 667 668 cupsLangFree -- Free language data. 669 cupsLangGet -- Get a language. 670 cupsLastError -- Return the last IPP status code. 671 cupsMarkOptions -- Mark command-line options in a 672 PPD file. 673 674 cupsParseOptions -- Parse options from a 675 command-line argument. 676 677 cupsPrintFile -- Print a file to a printer or class 678 on the default server. 679 680 cupsPrintFiles -- Print one or more files to a 681 printer or class on the 682 683 cupsServer -- Return the hostname/address of the 684 default server. 685 686 cupsSetDests -- Save the list of destinations for 687 the default server. 688 689 cupsSetEncryption -- Set the encryption preference. 690 cupsSetPasswordCB -- Set the password callback for 691 CUPS. 692 693 cupsSetServer -- Set the default server name. 694 cupsSetUser -- Set the default user name. 695 cupsTempFd -- Creates a temporary file. 696 cupsUser -- Return the current user's name. 697 ppdClose -- Free all memory used by the PPD file. 698 ppdCollect -- Collect all marked options that reside 699 in the specified 700 701 ppdConflicts -- Check to see if there are any 702 conflicts. 703 704 ppdEmit -- Emit code for marked options to a file. 705 ppdEmitFd -- Emit code for marked options to a file. 706 ppdEmitJCL -- Emit code for JCL options to a file. 707 ppdErrorString -- Returns the text assocated with a 708 status. 709 710 ppdFindAttr -- Find the first matching attribute... 711 ppdFindChoice -- Return a pointer to an option 712 choice. 713 714 ppdFindMarkedChoice -- Return the marked choice for 715 the specified option. 716 717 ppdFindNextAttr -- Find the next matching 718 attribute... 719 720 ppdFindOption -- Return a pointer to the specified 721 option. 722 723 ppdIsMarked -- Check to see if an option is 724 marked... 725 726 ppdLastError -- Return the status from the last 727 ppdOpen*(). 728 729 ppdMarkDefaults -- Mark all default options in the 730 PPD file. 731 732 ppdMarkOption -- Mark an option in a PPD file. 733 ppdOpen -- Read a PPD file into memory. 734 ppdOpenFd -- Read a PPD file into memory. 735 ppdOpenFile -- Read a PPD file into memory. 736 ppdPageLength -- Get the page length for the given 737 size. 738 739 ppdPageSize -- Get the page size record for the 740 given size. 741 742 ppdPageWidth -- Get the page width for the given 743 size. 744 745 ppdSetConformance -- Set the conformance level for 746 PPD files. 747 748 7.4. Interfaces for libcupsimage 749 750 7.4.1. CUPS Raster ABI 751 752 7.5. Data Definitions for libcupsimage 753 754 7.5.1. cups/raster.h 755 756 7.6. Interface Definitions for libcupsimage 757 758 cupsRasterClose -- Close a raster stream. 759 cupsRasterOpen -- Open a raster stream. 760 cupsRasterReadHeader -- Read a raster page header 761 and store it in a 762 763 cupsRasterReadPixels -- Read raster pixels. 764 cupsRasterWriteHeader -- Write a raster page header 765 from a V1 page 766 767 cupsRasterWritePixels -- Write raster pixels. 768 __________________________________________________________ 769 770 Chapter 7. Libraries 771 772 7.1. Interfaces for libcups 773 774 Table 7-1 defines the library name and shared object name for 775 the libcups library 776 777 Table 7-1. libcups Definition 778 Library: libcups 779 SONAME: libcups.so.2 780 781 The behavior of the interfaces in this library is specified by 782 the following specifications: 783 784 [CUPS 1.2] CUPS API Reference 785 [LSB] This Specification 786 __________________________________________________________ 787 788 7.1.1. CUPS Convenience ABI 789 __________________________________________________________ 790 791 7.1.1.1. Interfaces for CUPS Convenience ABI 792 793 An LSB conforming implementation shall provide the generic 794 functions for CUPS Convenience ABI specified in Table 7-2, with 795 the full mandatory functionality as described in the referenced 796 underlying specification. 797 798 Table 7-2. libcups - CUPS Convenience ABI Function Interfaces 799 cupsAddDest [LSB] cupsAddOption [LSB] cupsCancelJob [LSB] 800 cupsDoAuthentication [CUPS 1.2] 801 cupsDoFileRequest [CUPS 1.2] cupsEncodeOptions [CUPS 1.2] 802 cupsEncryption [LSB] cupsFreeDests [LSB] 803 cupsFreeJobs [LSB] cupsFreeOptions [LSB] cupsGetDefault [LSB] 804 cupsGetDefault2 [CUPS 1.2] 805 cupsGetDest [LSB] cupsGetDests [LSB] cupsGetDests2 [CUPS 1.2] 806 cupsGetFd [CUPS 1.2] 807 cupsGetFile [CUPS 1.2] cupsGetJobs [LSB] cupsGetJobs2 [CUPS 808 1.2] cupsGetOption [LSB] 809 cupsGetPPD [LSB] cupsGetPPD2 [CUPS 1.2] cupsGetPassword [LSB] 810 cupsLangEncoding [LSB] 811 cupsLangFlush [LSB] cupsLangFree [LSB] cupsLangGet [LSB] 812 cupsLastError [LSB] 813 cupsMarkOptions [LSB] cupsParseOptions [LSB] cupsPrintFile 814 [LSB] cupsPrintFile2 [CUPS 1.2] 815 cupsPrintFiles [LSB] cupsPrintFiles2 [CUPS 1.2] cupsPutFd [CUPS 816 1.2] cupsPutFile [CUPS 1.2] 817 cupsServer [LSB] cupsSetDests [LSB] cupsSetDests2 [CUPS 1.2] 818 cupsSetEncryption [LSB] 819 cupsSetPasswordCB [LSB] cupsSetServer [LSB] cupsSetUser [LSB] 820 cupsTempFd [LSB] 821 cupsUser [LSB] httpBlocking [CUPS 1.2] httpCheck [CUPS 1.2] 822 httpClearCookie [CUPS 1.2] 823 httpClearFields [CUPS 1.2] httpClose [CUPS 1.2] httpConnect 824 [CUPS 1.2] httpConnectEncrypt [CUPS 1.2] 825 httpDecode64_2 [CUPS 1.2] httpDelete [CUPS 1.2] httpEncode64_2 826 [CUPS 1.2] httpEncryption [CUPS 1.2] 827 httpError [CUPS 1.2] httpFlush [CUPS 1.2] httpGet [CUPS 1.2] 828 httpGetCookie [CUPS 1.2] 829 httpGetDateString [CUPS 1.2] httpGetDateTime [CUPS 1.2] 830 httpGetField [CUPS 1.2] httpGetHostByName [CUPS 1.2] 831 httpGetSubField [CUPS 1.2] httpGets [CUPS 1.2] httpHead [CUPS 832 1.2] httpInitialize [CUPS 1.2] 833 httpMD5 [CUPS 1.2] httpMD5Final [CUPS 1.2] httpMD5String [CUPS 834 1.2] httpOptions [CUPS 1.2] 835 httpPost [CUPS 1.2] httpPut [CUPS 1.2] httpReconnect [CUPS 1.2] 836 httpSetCookie [CUPS 1.2] 837 httpSetField [CUPS 1.2] httpStatus [CUPS 1.2] httpTrace [CUPS 838 1.2] httpUpdate [CUPS 1.2] 839 httpWait [CUPS 1.2] ippAddBoolean [CUPS 1.2] ippAddBooleans 840 [CUPS 1.2] ippAddCollection [CUPS 1.2] 841 ippAddCollections [CUPS 1.2] ippAddDate [CUPS 1.2] 842 ippAddInteger [CUPS 1.2] ippAddIntegers [CUPS 1.2] 843 ippAddRange [CUPS 1.2] ippAddRanges [CUPS 1.2] ippAddResolution 844 [CUPS 1.2] ippAddResolutions [CUPS 1.2] 845 ippAddSeparator [CUPS 1.2] ippAddString [CUPS 1.2] 846 ippAddStrings [CUPS 1.2] ippDateToTime [CUPS 1.2] 847 ippDelete [CUPS 1.2] ippDeleteAttribute [CUPS 1.2] 848 ippErrorString [CUPS 1.2] ippFindAttribute [CUPS 1.2] 849 ippFindNextAttribute [CUPS 1.2] ippLength [CUPS 1.2] ippNew 850 [CUPS 1.2] ippPort [CUPS 1.2] 851 ippRead [CUPS 1.2] ippReadFile [CUPS 1.2] ippSetPort [CUPS 1.2] 852 ippTimeToDate [CUPS 1.2] 853 ippWrite [CUPS 1.2] ippWriteFile [CUPS 1.2] ppdClose [LSB] 854 ppdCollect [LSB] 855 ppdConflicts [LSB] ppdEmit [LSB] ppdEmitFd [LSB] ppdEmitJCL 856 [LSB] 857 ppdErrorString [LSB] ppdFindAttr [LSB] ppdFindChoice [LSB] 858 ppdFindMarkedChoice [LSB] 859 ppdFindNextAttr [LSB] ppdFindOption [LSB] ppdIsMarked [LSB] 860 ppdLastError [LSB] 861 ppdMarkDefaults [LSB] ppdMarkOption [LSB] ppdOpen [LSB] 862 ppdOpenFd [LSB] 863 ppdOpenFile [LSB] ppdPageLength [LSB] ppdPageSize [LSB] 864 ppdPageWidth [LSB] 865 ppdSetConformance [LSB] 866 __________________________________________________________ 867 868 7.2. Data Definitions for libcups 869 870 This section defines global identifiers and their values that 871 are associated with interfaces contained in libcups. These 872 definitions are organized into groups that correspond to system 873 headers. This convention is used as a convenience for the 874 reader, and does not imply the existence of these headers, or 875 their content. Where an interface is defined as requiring a 876 particular system header file all of the data definitions for 877 that system header file presented here shall be in effect. 878 879 This section gives data definitions to promote binary 880 application portability, not to repeat source interface 881 definitions available elsewhere. System providers and 882 application developers should use this ABI to supplement - not 883 to replace - source interface definition specifications. 884 885 This specification uses the ISO C (1999) C Language as the 886 reference programming language, and data definitions are 887 specified in ISO C format. The C language is used here as a 888 convenient notation. Using a C language description of these 889 data objects does not preclude their use by other programming 890 languages. 891 __________________________________________________________ 892 893 7.2.1. cups/cups.h 894 895 #define _CUPS_CUPS_H_ 896 #define CUPS_VERSION_MAJOR 1 897 #define CUPS_VERSION_MINOR 1 898 #define CUPS_VERSION 1.0123 899 #define CUPS_VERSION_PATCH 23 900 #define cupsLangDefault() cupsLangGet(NULL) 901 902 typedef enum { 903 CUPS_AUTO_ENCODING = -1, 904 CUPS_US_ASCII = 0, 905 CUPS_ISO8859_1 = 1, 906 CUPS_ISO8859_2 = 2, 907 CUPS_ISO8859_3 = 3, 908 CUPS_ISO8859_4 = 4, 909 CUPS_ISO8859_5 = 5, 910 CUPS_ISO8859_6 = 6, 911 CUPS_ISO8859_7 = 7, 912 CUPS_ISO8859_8 = 8, 913 CUPS_ISO8859_9 = 9, 914 CUPS_ISO8859_10 = 10, 915 CUPS_UTF8 = 11, 916 CUPS_ISO8859_13 = 12, 917 CUPS_ISO8859_14 = 13, 918 CUPS_ISO8859_15 = 14, 919 CUPS_WINDOWS_874 = 15, 920 CUPS_WINDOWS_1250 = 16, 921 CUPS_WINDOWS_1251 = 17, 922 CUPS_WINDOWS_1252 = 18, 923 CUPS_WINDOWS_1253 = 19, 924 CUPS_WINDOWS_1254 = 20, 925 CUPS_WINDOWS_1255 = 21, 926 CUPS_WINDOWS_1256 = 22, 927 CUPS_WINDOWS_1257 = 23, 928 CUPS_WINDOWS_1258 = 24, 929 CUPS_KOI8_R = 25, 930 CUPS_KOI8_U = 26 931 } cups_encoding_t; 932 typedef struct cups_lang_s { 933 struct cups_lang_s *next; 934 int used; 935 cups_encoding_t encoding; 936 char language[16]; 937 cups_array_t *strings; 938 } cups_lang_t; 939 typedef enum { 940 HTTP_ENCRYPT_IF_REQUESTED = 0, 941 HTTP_ENCRYPT_NEVER = 1, 942 HTTP_ENCRYPT_REQUIRED = 2, 943 HTTP_ENCRYPT_ALWAYS = 3 944 } http_encryption_t; 945 typedef struct { 946 char *name; 947 char *value; 948 } cups_option_t; 949 typedef struct { 950 char *name; 951 char *instance; 952 int is_default; 953 int num_options; 954 cups_option_t *options; 955 } cups_dest_t; 956 typedef enum { 957 HTTP_WAITING = 0, 958 HTTP_OPTIONS = 1, 959 HTTP_GET = 2, 960 HTTP_GET_SEND = 3, 961 HTTP_HEAD = 4, 962 HTTP_POST = 5, 963 HTTP_POST_RECV = 6, 964 HTTP_POST_SEND = 7, 965 HTTP_PUT = 8, 966 HTTP_PUT_RECV = 9, 967 HTTP_DELETE = 10, 968 HTTP_TRACE = 11, 969 HTTP_CLOSE = 12, 970 HTTP_STATUS = 13 971 } http_state_t; 972 typedef enum { 973 HTTP_ERROR = -1, 974 HTTP_CONTINUE = 100, 975 HTTP_SWITCHING_PROTOCOLS = 101, 976 HTTP_OK = 200, 977 HTTP_CREATED = 201, 978 HTTP_ACCEPTED = 202, 979 HTTP_NOT_AUTHORITATIVE = 203, 980 HTTP_NO_CONTENT = 204, 981 HTTP_RESET_CONTENT = 205, 982 HTTP_PARTIAL_CONTENT = 206, 983 HTTP_MULTIPLE_CHOICES = 300, 984 HTTP_MOVED_PERMANENTLY = 301, 985 HTTP_MOVED_TEMPORARILY = 302, 986 HTTP_SEE_OTHER = 303, 987 HTTP_NOT_MODIFIED = 304, 988 HTTP_USE_PROXY = 305, 989 HTTP_BAD_REQUEST = 400, 990 HTTP_UNAUTHORIZED = 401, 991 HTTP_PAYMENT_REQUIRED = 402, 992 HTTP_FORBIDDEN = 403, 993 HTTP_NOT_FOUND = 404, 994 HTTP_METHOD_NOT_ALLOWED = 405, 995 HTTP_NOT_ACCEPTABLE = 406, 996 HTTP_PROXY_AUTHENTICATION = 407, 997 HTTP_REQUEST_TIMEOUT = 408, 998 HTTP_CONFLICT = 409, 999 HTTP_GONE = 410, 1000 HTTP_LENGTH_REQUIRED = 411, 1001 HTTP_PRECONDITION = 412, 1002 HTTP_REQUEST_TOO_LARGE = 413, 1003 HTTP_URI_TOO_LONG = 414, 1004 HTTP_UNSUPPORTED_MEDIATYPE = 415, 1005 HTTP_UPGRADE_REQUIRED = 426, 1006 HTTP_SERVER_ERROR = 500, 1007 HTTP_NOT_IMPLEMENTED = 501, 1008 HTTP_BAD_GATEWAY = 502, 1009 HTTP_SERVICE_UNAVAILABLE = 503, 1010 HTTP_GATEWAY_TIMEOUT = 504, 1011 HTTP_NOT_SUPPORTED = 505 1012 } http_status_t; 1013 typedef enum { 1014 HTTP_0_9 = 9, 1015 HTTP_1_0 = 100, 1016 HTTP_1_1 = 101 1017 } http_version_t; 1018 typedef enum { 1019 HTTP_KEEPALIVE_OFF = 0, 1020 HTTP_KEEPALIVE_ON = 1 1021 } http_keepalive_t; 1022 typedef enum { 1023 HTTP_ENCODE_LENGTH = 0, 1024 HTTP_ENCODE_CHUNKED = 1 1025 } http_encoding_t; 1026 typedef enum { 1027 IPP_JOB_PENDING = 3, 1028 IPP_JOB_HELD = 4, 1029 IPP_JOB_PROCESSING = 5, 1030 IPP_JOB_STOPPED = 6, 1031 IPP_JOB_CANCELLED = 7, 1032 IPP_JOB_ABORTED = 8, 1033 IPP_JOB_COMPLETED = 9 1034 } ipp_jstate_t; 1035 typedef struct { 1036 int id; 1037 char *dest; 1038 char *title; 1039 char *user; 1040 char *format; 1041 ipp_jstate_t state; 1042 int size; 1043 int priority; 1044 time_t completed_time; 1045 time_t creation_time; 1046 time_t processing_time; 1047 } cups_job_t; 1048 typedef struct _cups_array_s cups_array_t; 1049 1050 typedef struct _http_s http_t; 1051 extern int cupsAddDest(const char *name, const char *instance, 1052 int num_dests, cups_dest_t * *dests); 1053 extern int cupsAddOption(const char *name, const char *value, 1054 int num_options, cups_option_t * *options); 1055 extern int cupsCancelJob(const char *printer, int job); 1056 extern int cupsDoAuthentication(http_t * http, const char *method, 1057 const char *resource); 1058 extern ipp_t *cupsDoFileRequest(http_t * http, ipp_t * request, 1059 const char *resource, 1060 const char *filename); 1061 extern void cupsEncodeOptions(ipp_t * ipp, int num_options, 1062 cups_option_t * options); 1063 extern http_encryption_t cupsEncryption(void); 1064 extern void cupsFreeDests(int num_dests, cups_dest_t * dests); 1065 extern void cupsFreeJobs(int num_jobs, cups_job_t * jobs); 1066 extern void cupsFreeOptions(int num_options, cups_option_t * options); 1067 extern const char *cupsGetDefault(void); 1068 extern const char *cupsGetDefault2(http_t * http); 1069 extern cups_dest_t *cupsGetDest(const char *name, const char *instance, 1070 int num_dests, cups_dest_t * dests); 1071 extern int cupsGetDests(cups_dest_t * *dests); 1072 extern int cupsGetDests2(http_t * http, cups_dest_t * *dests); 1073 extern http_status_t cupsGetFd(http_t * http, const char *resource, 1074 int fd); 1075 extern http_status_t cupsGetFile(http_t * http, const char *resource, 1076 const char *filename); 1077 extern int cupsGetJobs(cups_job_t * *jobs, const char *dest, int myjobs, 1078 int completed); 1079 extern int cupsGetJobs2(http_t * http, cups_job_t * *jobs, 1080 const char *dest, int myjobs, int completed); 1081 extern const char *cupsGetOption(const char *name, int num_options, 1082 cups_option_t * options); 1083 extern const char *cupsGetPPD(const char *printer); 1084 extern const char *cupsGetPPD2(http_t * http, const char *printer); 1085 extern const char *cupsGetPassword(const char *prompt); 1086 extern const char *cupsLangEncoding(cups_lang_t * lang); 1087 extern void cupsLangFlush(void); 1088 extern void cupsLangFree(cups_lang_t * lang); 1089 extern cups_lang_t *cupsLangGet(const char *language); 1090 extern ipp_status_t cupsLastError(void); 1091 extern int cupsMarkOptions(ppd_file_t * ppd, int num_options, 1092 cups_option_t * options); 1093 extern int cupsParseOptions(const char *arg, int num_options, 1094 cups_option_t * *options); 1095 extern int cupsPrintFile(const char *printer, const char *filename, 1096 const char *title, int num_options, 1097 cups_option_t * options); 1098 extern int cupsPrintFile2(http_t * http, const char *printer, 1099 const char *filename, const char *title, 1100 int num_options, cups_option_t * options); 1101 extern int cupsPrintFiles(const char *printer, int num_files, 1102 const char **files, const char *title, 1103 int num_options, cups_option_t * options); 1104 extern int cupsPrintFiles2(http_t * http, const char *printer, 1105 int num_files, const char **files, 1106 const char *title, int num_options, 1107 cups_option_t * options); 1108 extern http_status_t cupsPutFd(http_t * http, const char *resource, 1109 int fd); 1110 extern http_status_t cupsPutFile(http_t * http, const char *resource, 1111 const char *filename); 1112 extern const char *cupsServer(void); 1113 extern void cupsSetDests(int num_dests, cups_dest_t * dests); 1114 extern int cupsSetDests2(http_t * http, int num_dests, 1115 cups_dest_t * dests); 1116 extern void cupsSetEncryption(http_encryption_t e); 1117 extern void cupsSetPasswordCB(const char *(*cb) (const char *)); 1118 extern void cupsSetServer(const char *server); 1119 extern void cupsSetUser(const char *user); 1120 extern int cupsTempFd(char *filename, int len); 1121 extern const char *cupsUser(void); 1122 __________________________________________________________ 1123 1124 7.2.2. cups/http.h 1125 1126 #define HTTP_MAX_URI 1024 1127 #define HTTP_MAX_BUFFER 2048 1128 #define HTTP_MAX_HOST 256 1129 #define HTTP_MAX_VALUE 256 1130 1131 typedef enum http_auth_e { 1132 HTTP_AUTH_NONE, 1133 HTTP_AUTH_BASIC, 1134 HTTP_AUTH_MD5, 1135 HTTP_AUTH_MD5_SESS, 1136 HTTP_AUTH_MD5_INT, 1137 HTTP_AUTH_MD5_SESS_INT, 1138 HTTP_AUTH_NEGOTIATE 1139 } http_auth_t; 1140 typedef enum http_field_e { 1141 HTTP_FIELD_UNKNOWN, 1142 HTTP_FIELD_ACCEPT_LANGUAGE, 1143 HTTP_FIELD_ACCEPT_RANGES, 1144 HTTP_FIELD_AUTHORIZATION, 1145 HTTP_FIELD_CONNECTION, 1146 HTTP_FIELD_CONTENT_ENCODING, 1147 HTTP_FIELD_CONTENT_LANGUAGE, 1148 HTTP_FIELD_CONTENT_LENGTH, 1149 HTTP_FIELD_CONTENT_LOCATION, 1150 HTTP_FIELD_CONTENT_MD5, 1151 HTTP_FIELD_CONTENT_RANGE, 1152 HTTP_FIELD_CONTENT_TYPE, 1153 HTTP_FIELD_CONTENT_VERSION, 1154 HTTP_FIELD_DATE, 1155 HTTP_FIELD_HOST, 1156 HTTP_FIELD_IF_MODIFIED_SINCE, 1157 HTTP_FIELD_IF_UNMODIFIED_SINCE, 1158 HTTP_FIELD_KEEP_ALIVE, 1159 HTTP_FIELD_LAST_MODIFIED, 1160 HTTP_FIELD_LINK, 1161 HTTP_FIELD_LOCATION, 1162 HTTP_FIELD_RANGE, 1163 HTTP_FIELD_REFERER, 1164 HTTP_FIELD_RETRY_AFTER, 1165 HTTP_FIELD_TRANSFER_ENCODING, 1166 HTTP_FIELD_UPGRADE, 1167 HTTP_FIELD_USER_AGENT, 1168 HTTP_FIELD_WWW_AUTHENTICATE, 1169 HTTP_FIELD_MAX 1170 } http_field_t; 1171 typedef enum http_uri_status_e { 1172 HTTP_URI_OVERFLOW, 1173 HTTP_URI_BAD_ARGUMENTS, 1174 HTTP_URI_BAD_RESOURCE, 1175 HTTP_URI_BAD_PORT, 1176 HTTP_URI_BAD_HOSTNAME, 1177 HTTP_URI_BAD_USERNAME, 1178 HTTP_URI_BAD_SCHEME, 1179 HTTP_URI_BAD_URI, 1180 HTTP_URI_OK, 1181 HTTP_URI_MISSING_SCHEME, 1182 HTTP_URI_UNKNOWN_SCHEME, 1183 HTTP_URI_MISSING_RESOURCE 1184 } http_uri_status_t; 1185 typedef enum http_uri_coding_e { 1186 HTTP_URI_CODING_NONE, 1187 HTTP_URI_CODING_USERNAME, 1188 HTTP_URI_CODING_HOSTNAME, 1189 HTTP_URI_CODING_RESOURCE, 1190 HTTP_URI_CODING_MOST, 1191 HTTP_URI_CODING_QUERY, 1192 HTTP_URI_CODING_ALL 1193 } http_uri_coding_t; 1194 typedef union _http_addr_u { 1195 struct sockaddr addr; 1196 struct sockaddr_in ipv4; 1197 struct sockaddr_in6 ipv6; 1198 struct sockaddr_un un; 1199 char pad[256]; 1200 } http_addr_t; 1201 typedef struct http_addrlist_s { 1202 struct http_addrlist_s *next; 1203 http_addr_t addr; 1204 } http_addrlist_t; 1205 extern void httpBlocking(http_t * http, int b); 1206 extern int httpCheck(http_t * http); 1207 extern void httpClearCookie(http_t * http); 1208 extern void httpClearFields(http_t * http); 1209 extern void httpClose(http_t * http); 1210 extern http_t *httpConnect(const char *host, int port); 1211 extern http_t *httpConnectEncrypt(const char *host, int port, 1212 http_encryption_t encryption); 1213 extern char *httpDecode64_2(char *out, int *outlen, const char *in); 1214 extern int httpDelete(http_t * http, const char *uri); 1215 extern char *httpEncode64_2(char *out, int outlen, const char *in, 1216 int inlen); 1217 extern int httpEncryption(http_t * http, http_encryption_t e); 1218 extern int httpError(http_t * http); 1219 extern void httpFlush(http_t * http); 1220 extern int httpGet(http_t * http, const char *uri); 1221 extern const char *httpGetCookie(http_t * http); 1222 extern const char *httpGetDateString(time_t t); 1223 extern time_t httpGetDateTime(const char *s); 1224 extern const char *httpGetField(http_t * http, http_field_t field); 1225 extern struct hostent *httpGetHostByName(const char *name); 1226 extern char *httpGetSubField(http_t * http, http_field_t field, 1227 const char *name, char *value); 1228 extern char *httpGets(char *line, int length, http_t * http); 1229 extern int httpHead(http_t * http, const char *uri); 1230 extern void httpInitialize(void); 1231 extern char *httpMD5(const char *, const char *, const char *, char *); 1232 extern char *httpMD5Final(const char *, const char *, const char *, 1233 char *); 1234 extern char *httpMD5String(const unsigned char *, char *); 1235 extern int httpOptions(http_t * http, const char *uri); 1236 extern int httpPost(http_t * http, const char *uri); 1237 extern int httpPut(http_t * http, const char *uri); 1238 extern int httpReconnect(http_t * http); 1239 extern void httpSetCookie(http_t * http, const char *cookie); 1240 extern void httpSetField(http_t * http, http_field_t field, 1241 const char *value); 1242 extern const char *httpStatus(http_status_t status); 1243 extern int httpTrace(http_t * http, const char *uri); 1244 extern http_status_t httpUpdate(http_t * http); 1245 extern int httpWait(http_t * http, int msec); 1246 __________________________________________________________ 1247 1248 7.2.3. cups/ipp.h 1249 1250 #define IPP_MAX_NAME 256 1251 #define IPP_MAX_LENGTH 32767 1252 #define IPP_PORT 631 1253 #define IPP_MAX_VALUES 8 1254 #define CUPS_ADD_CLASS CUPS_ADD_MODIFY_CLASS 1255 #define CUPS_ADD_PRINTER CUPS_ADD_MODIFY_PRINTER 1256 #define IPP_ERROR_JOB_CANCELLED IPP_ERROR_JOB_CANCELED 1257 #define IPP_JOB_CANCELLED IPP_JOB_CANCELED 1258 #define IPP_VERSION "\001\001" 1259 1260 typedef enum { 1261 IPP_OK = 0, 1262 IPP_OK_SUBST = 1, 1263 IPP_OK_CONFLICT = 2, 1264 IPP_OK_IGNORED_SUBSCRIPTIONS = 3, 1265 IPP_OK_IGNORED_NOTIFICATIONS = 4, 1266 IPP_OK_TOO_MANY_EVENTS = 5, 1267 IPP_OK_BUT_CANCEL_SUBSCRIPTION = 6, 1268 IPP_REDIRECTION_OTHER_SITE = 768, 1269 IPP_BAD_REQUEST = 1024, 1270 IPP_FORBIDDEN = 1025, 1271 IPP_NOT_AUTHENTICATED = 1026, 1272 IPP_NOT_AUTHORIZED = 1027, 1273 IPP_NOT_POSSIBLE = 1028, 1274 IPP_TIMEOUT = 1029, 1275 IPP_NOT_FOUND = 1030, 1276 IPP_GONE = 1031, 1277 IPP_REQUEST_ENTITY = 1032, 1278 IPP_REQUEST_VALUE = 1033, 1279 IPP_DOCUMENT_FORMAT = 1034, 1280 IPP_ATTRIBUTES = 1035, 1281 IPP_URI_SCHEME = 1036, 1282 IPP_CHARSET = 1037, 1283 IPP_CONFLICT = 1038, 1284 IPP_COMPRESSION_NOT_SUPPORTED = 1039, 1285 IPP_COMPRESSION_ERROR = 1040, 1286 IPP_DOCUMENT_FORMAT_ERROR = 1041, 1287 IPP_DOCUMENT_ACCESS_ERROR = 1042, 1288 IPP_ATTRIBUTES_NOT_SETTABLE = 1043, 1289 IPP_IGNORED_ALL_SUBSCRIPTIONS = 1044, 1290 IPP_TOO_MANY_SUBSCRIPTIONS = 1045, 1291 IPP_IGNORED_ALL_NOTIFICATIONS = 1046, 1292 IPP_PRINT_SUPPORT_FILE_NOT_FOUND = 1047, 1293 IPP_INTERNAL_ERROR = 1280, 1294 IPP_OPERATION_NOT_SUPPORTED = 1281, 1295 IPP_SERVICE_UNAVAILABLE = 1282, 1296 IPP_VERSION_NOT_SUPPORTED = 1283, 1297 IPP_DEVICE_ERROR = 1284, 1298 IPP_TEMPORARY_ERROR = 1285, 1299 IPP_NOT_ACCEPTING = 1286, 1300 IPP_PRINTER_BUSY = 1287, 1301 IPP_ERROR_JOB_CANCELLED = 1288, 1302 IPP_MULTIPLE_JOBS_NOT_SUPPORTED = 1289, 1303 IPP_PRINTER_IS_DEACTIVATED = 1290 1304 } ipp_status_t; 1305 typedef enum ipp_tag_e { 1306 IPP_TAG_ZERO, 1307 IPP_TAG_OPERATION, 1308 IPP_TAG_JOB, 1309 IPP_TAG_END, 1310 IPP_TAG_PRINTER, 1311 IPP_TAG_UNSUPPORTED_GROUP, 1312 IPP_TAG_SUBSCRIPTION, 1313 IPP_TAG_EVENT_NOTIFICATION, 1314 IPP_TAG_UNSUPPORTED_VALUE, 1315 IPP_TAG_DEFAULT, 1316 IPP_TAG_UNKNOWN, 1317 IPP_TAG_NOVALUE, 1318 IPP_TAG_NOTSETTABLE, 1319 IPP_TAG_DELETEATTR, 1320 IPP_TAG_ADMINDEFINE, 1321 IPP_TAG_INTEGER, 1322 IPP_TAG_BOOLEAN, 1323 IPP_TAG_ENUM, 1324 IPP_TAG_STRING, 1325 IPP_TAG_DATE, 1326 IPP_TAG_RESOLUTION, 1327 IPP_TAG_RANGE, 1328 IPP_TAG_BEGIN_COLLECTION, 1329 IPP_TAG_TEXTLANG, 1330 IPP_TAG_NAMELANG, 1331 IPP_TAG_END_COLLECTION, 1332 IPP_TAG_TEXT, 1333 IPP_TAG_NAME, 1334 IPP_TAG_KEYWORD, 1335 IPP_TAG_URI, 1336 IPP_TAG_URISCHEME, 1337 IPP_TAG_CHARSET, 1338 IPP_TAG_LANGUAGE, 1339 IPP_TAG_MIMETYPE, 1340 IPP_TAG_MEMBERNAME, 1341 IPP_TAG_MASK, 1342 IPP_TAG_COPY 1343 } ipp_tag_t; 1344 typedef enum ipp_res_e { 1345 IPP_RES_PER_INCH, 1346 IPP_RES_PER_CM 1347 } ipp_res_t; 1348 typedef enum ipp_finish_e { 1349 IPP_FINISHINGS_NONE, 1350 IPP_FINISHINGS_STAPLE, 1351 IPP_FINISHINGS_PUNCH, 1352 IPP_FINISHINGS_COVER, 1353 IPP_FINISHINGS_BIND, 1354 IPP_FINISHINGS_SADDLE_STITCH, 1355 IPP_FINISHINGS_EDGE_STITCH, 1356 IPP_FINISHINGS_FOLD, 1357 IPP_FINISHINGS_TRIM, 1358 IPP_FINISHINGS_BALE, 1359 IPP_FINISHINGS_BOOKLET_MAKER, 1360 IPP_FINISHINGS_JOB_OFFSET, 1361 IPP_FINISHINGS_STAPLE_TOP_LEFT, 1362 IPP_FINISHINGS_STAPLE_BOTTOM_LEFT, 1363 IPP_FINISHINGS_STAPLE_TOP_RIGHT, 1364 IPP_FINISHINGS_STAPLE_BOTTOM_RIGHT, 1365 IPP_FINISHINGS_EDGE_STITCH_LEFT, 1366 IPP_FINISHINGS_EDGE_STITCH_TOP, 1367 IPP_FINISHINGS_EDGE_STITCH_RIGHT, 1368 IPP_FINISHINGS_EDGE_STITCH_BOTTOM, 1369 IPP_FINISHINGS_STAPLE_DUAL_LEFT, 1370 IPP_FINISHINGS_STAPLE_DUAL_TOP, 1371 IPP_FINISHINGS_STAPLE_DUAL_RIGHT, 1372 IPP_FINISHINGS_STAPLE_DUAL_BOTTOM, 1373 IPP_FINISHINGS_BIND_LEFT, 1374 IPP_FINISHINGS_BIND_TOP, 1375 IPP_FINISHINGS_BIND_RIGHT, 1376 IPP_FINISHINGS_BIND_BOTTOM 1377 } ipp_finish_t; 1378 typedef enum ipp_orient_e { 1379 IPP_PORTRAIT, 1380 IPP_LANDSCAPE, 1381 IPP_REVERSE_LANDSCAPE, 1382 IPP_REVERSE_PORTRAIT 1383 } ipp_orient_t; 1384 typedef enum ipp_quality_e { 1385 IPP_QUALITY_DRAFT, 1386 IPP_QUALITY_NORMAL, 1387 IPP_QUALITY_HIGH 1388 } ipp_quality_t; 1389 typedef enum ipp_pstate_e { 1390 IPP_PRINTER_IDLE, 1391 IPP_PRINTER_PROCESSING, 1392 IPP_PRINTER_STOPPED 1393 } ipp_pstate_t; 1394 typedef enum ipp_state_e { 1395 IPP_ERROR, 1396 IPP_IDLE, 1397 IPP_HEADER, 1398 IPP_ATTRIBUTE, 1399 IPP_DATA 1400 } ipp_state_t; 1401 typedef enum ipp_op_e { 1402 IPP_PRINT_JOB, 1403 IPP_PRINT_URI, 1404 IPP_VALIDATE_JOB, 1405 IPP_CREATE_JOB, 1406 IPP_SEND_DOCUMENT, 1407 IPP_SEND_URI, 1408 IPP_CANCEL_JOB, 1409 IPP_GET_JOB_ATTRIBUTES, 1410 IPP_GET_JOBS, 1411 IPP_GET_PRINTER_ATTRIBUTES, 1412 IPP_HOLD_JOB, 1413 IPP_RELEASE_JOB, 1414 IPP_RESTART_JOB, 1415 IPP_PAUSE_PRINTER, 1416 IPP_RESUME_PRINTER, 1417 IPP_PURGE_JOBS, 1418 IPP_SET_PRINTER_ATTRIBUTES, 1419 IPP_SET_JOB_ATTRIBUTES, 1420 IPP_GET_PRINTER_SUPPORTED_VALUES, 1421 IPP_CREATE_PRINTER_SUBSCRIPTION, 1422 IPP_CREATE_JOB_SUBSCRIPTION, 1423 IPP_GET_SUBSCRIPTION_ATTRIBUTES, 1424 IPP_GET_SUBSCRIPTIONS, 1425 IPP_RENEW_SUBSCRIPTION, 1426 IPP_CANCEL_SUBSCRIPTION, 1427 IPP_GET_NOTIFICATIONS, 1428 IPP_SEND_NOTIFICATIONS, 1429 IPP_GET_PRINT_SUPPORT_FILES, 1430 IPP_ENABLE_PRINTER, 1431 IPP_DISABLE_PRINTER, 1432 IPP_PAUSE_PRINTER_AFTER_CURRENT_JOB, 1433 IPP_HOLD_NEW_JOBS, 1434 IPP_RELEASE_HELD_NEW_JOBS, 1435 IPP_DEACTIVATE_PRINTER, 1436 IPP_ACTIVATE_PRINTER, 1437 IPP_RESTART_PRINTER, 1438 IPP_SHUTDOWN_PRINTER, 1439 IPP_STARTUP_PRINTER, 1440 IPP_REPROCESS_JOB, 1441 IPP_CANCEL_CURRENT_JOB, 1442 IPP_SUSPEND_CURRENT_JOB, 1443 IPP_RESUME_JOB, 1444 IPP_PROMOTE_JOB, 1445 IPP_SCHEDULE_JOB_AFTER, 1446 IPP_PRIVATE, 1447 CUPS_GET_DEFAULT, 1448 CUPS_GET_PRINTERS, 1449 CUPS_ADD_MODIFY_PRINTER, 1450 CUPS_DELETE_PRINTER, 1451 CUPS_GET_CLASSES, 1452 CUPS_ADD_MODIFY_CLASS, 1453 CUPS_DELETE_CLASS, 1454 CUPS_ACCEPT_JOBS, 1455 CUPS_REJECT_JOBS, 1456 CUPS_SET_DEFAULT, 1457 CUPS_GET_DEVICES, 1458 CUPS_GET_PPDS, 1459 CUPS_MOVE_JOB, 1460 CUPS_AUTHENTICATE_JOB, 1461 CUPS_GET_PPD 1462 } ipp_op_t; 1463 typedef unsigned char ipp_uchar_t; 1464 typedef union ipp_request_u { 1465 struct { 1466 ipp_uchar_t version[2]; 1467 int op_status; 1468 int request_id; 1469 } any; 1470 struct { 1471 ipp_uchar_t version[2]; 1472 ipp_op_t operation_id; 1473 int request_id; 1474 } op; 1475 struct { 1476 ipp_uchar_t version[2]; 1477 ipp_status_t status_code; 1478 int request_id; 1479 } status; 1480 struct { 1481 ipp_uchar_t version[2]; 1482 ipp_status_t status_code; 1483 int request_id; 1484 } event; 1485 } ipp_request_t; 1486 typedef struct ipp_s { 1487 ipp_state_t state; 1488 ipp_request_t request; 1489 ipp_attribute_t *attrs; 1490 ipp_attribute_t *last; 1491 ipp_attribute_t *current; 1492 ipp_tag_t curtag; 1493 } ipp_t; 1494 typedef union ipp_value_u { 1495 int integer; 1496 char boolean; 1497 ipp_uchar_t date[11]; 1498 struct { 1499 int xres; 1500 int yres; 1501 ipp_res_t units; 1502 } resolution; 1503 struct { 1504 int lower; 1505 int upper; 1506 } range; 1507 struct { 1508 char *charset; 1509 char *text; 1510 } string; 1511 struct { 1512 int length; 1513 void *data; 1514 } unknown; 1515 ipp_t *collection; 1516 } ipp_value_t; 1517 typedef struct ipp_attribute_s { 1518 struct ipp_attribute_s *next; 1519 ipp_tag_t group_tag; 1520 ipp_tag_t value_tag; 1521 char *name; 1522 int num_values; 1523 ipp_value_t values[1]; 1524 } ipp_attribute_t; 1525 extern ipp_attribute_t *ippAddBoolean(ipp_t * ipp, ipp_tag_t group, 1526 const char *name, char value); 1527 extern ipp_attribute_t *ippAddBooleans(ipp_t * ipp, ipp_tag_t group, 1528 const char *name, int num_values, 1529 const char *values); 1530 extern ipp_attribute_t *ippAddCollection(ipp_t * ipp, ipp_tag_t group, 1531 const char *name, ipp_t * value); 1532 extern ipp_attribute_t *ippAddCollections(ipp_t * ipp, ipp_tag_t group, 1533 const char *name, int num_values, 1534 const ipp_t * *values); 1535 extern ipp_attribute_t *ippAddDate(ipp_t * ipp, ipp_tag_t group, 1536 const char *name, 1537 const ipp_uchar_t * value); 1538 extern ipp_attribute_t *ippAddInteger(ipp_t * ipp, ipp_tag_t group, 1539 ipp_tag_t type, const char *name, 1540 int value); 1541 extern ipp_attribute_t *ippAddIntegers(ipp_t * ipp, ipp_tag_t group, 1542 ipp_tag_t type, const char *name, 1543 int num_values, const int *values); 1544 extern ipp_attribute_t *ippAddRange(ipp_t * ipp, ipp_tag_t group, 1545 const char *name, int lower, 1546 int upper); 1547 extern ipp_attribute_t *ippAddRanges(ipp_t * ipp, ipp_tag_t group, 1548 const char *name, int num_values, 1549 const int *lower, const int *upper); 1550 extern ipp_attribute_t *ippAddResolution(ipp_t * ipp, ipp_tag_t group, 1551 const char *name, ipp_res_t units, 1552 int xres, int yres); 1553 extern ipp_attribute_t *ippAddResolutions(ipp_t * ipp, ipp_tag_t group, 1554 const char *name, int num_values, 1555 ipp_res_t units, const int *xres, 1556 const int *yres); 1557 extern ipp_attribute_t *ippAddSeparator(ipp_t * ipp); 1558 extern ipp_attribute_t *ippAddString(ipp_t * ipp, ipp_tag_t group, 1559 ipp_tag_t type, const char *name, 1560 const char *charset, 1561 const char *value); 1562 extern ipp_attribute_t *ippAddStrings(ipp_t * ipp, ipp_tag_t group, 1563 ipp_tag_t type, const char *name, 1564 int num_values, const char *charset, 1565 const char *const *values); 1566 extern time_t ippDateToTime(const ipp_uchar_t * date); 1567 extern void ippDelete(ipp_t * ipp); 1568 extern void ippDeleteAttribute(ipp_t * ipp, ipp_attribute_t * attr); 1569 extern const char *ippErrorString(ipp_status_t error); 1570 extern ipp_attribute_t *ippFindAttribute(ipp_t * ipp, const char *name, 1571 ipp_tag_t type); 1572 extern ipp_attribute_t *ippFindNextAttribute(ipp_t * ipp, const char *name, 1573 ipp_tag_t type); 1574 extern size_t ippLength(ipp_t * ipp); 1575 extern ipp_t *ippNew(void); 1576 extern int ippPort(void); 1577 extern ipp_state_t ippRead(http_t * http, ipp_t * ipp); 1578 extern ipp_state_t ippReadFile(int fd, ipp_t * ipp); 1579 extern void ippSetPort(int p); 1580 extern const ipp_uchar_t *ippTimeToDate(time_t t); 1581 extern ipp_state_t ippWrite(http_t * http, ipp_t * ipp); 1582 extern ipp_state_t ippWriteFile(int fd, ipp_t * ipp); 1583 __________________________________________________________ 1584 1585 7.2.4. cups/ppd.h 1586 1587 #define _CUPS_PPD_H_ 1588 #define PPD_MAX_LINE 256 1589 #define PPD_VERSION 4.3 1590 #define PPD_MAX_NAME 41 1591 #define PPD_MAX_TEXT 81 1592 1593 typedef enum { 1594 PPD_CS_CMYK = -4, 1595 PPD_CS_CMY = -3, 1596 PPD_CS_GRAY = 1, 1597 PPD_CS_RGB = 3, 1598 PPD_CS_RGBK = 4, 1599 PPD_CS_N = 5 1600 } ppd_cs_t; 1601 typedef struct { 1602 char name[41]; 1603 char *start; 1604 char *stop; 1605 } ppd_emul_t; 1606 typedef enum { 1607 PPD_UI_BOOLEAN = 0, 1608 PPD_UI_PICKONE = 1, 1609 PPD_UI_PICKMANY = 2 1610 } ppd_ui_t; 1611 typedef enum { 1612 PPD_ORDER_ANY = 0, 1613 PPD_ORDER_DOCUMENT = 1, 1614 PPD_ORDER_EXIT = 2, 1615 PPD_ORDER_JCL = 3, 1616 PPD_ORDER_PAGE = 4, 1617 PPD_ORDER_PROLOG = 5 1618 } ppd_section_t; 1619 typedef struct { 1620 char marked; 1621 char choice[41]; 1622 char text[81]; 1623 char *code; 1624 void *option; 1625 } ppd_choice_t; 1626 typedef struct { 1627 char conflicted; 1628 char keyword[41]; 1629 char defchoice[41]; 1630 char text[81]; 1631 ppd_ui_t ui; 1632 ppd_section_t section; 1633 float order; 1634 int num_choices; 1635 ppd_choice_t *choices; 1636 } ppd_option_t; 1637 typedef struct ppd_group_str { 1638 char text[40]; 1639 char name[41]; 1640 int num_options; 1641 ppd_option_t *options; 1642 int num_subgroups; 1643 struct ppd_group_str *subgroups; 1644 } ppd_group_t; 1645 typedef struct { 1646 int marked; 1647 char name[41]; 1648 float width; 1649 float length; 1650 float left; 1651 float bottom; 1652 float right; 1653 float top; 1654 } ppd_size_t; 1655 typedef struct { 1656 char option1[41]; 1657 char choice1[41]; 1658 char option2[41]; 1659 char choice2[41]; 1660 } ppd_const_t; 1661 typedef struct { 1662 char resolution[41]; 1663 char media_type[41]; 1664 float density; 1665 float gamma; 1666 float matrix[3][3]; 1667 } ppd_profile_t; 1668 typedef struct { 1669 char name[41]; 1670 char spec[41]; 1671 char text[81]; 1672 char *value; 1673 } ppd_attr_t; 1674 typedef struct { 1675 int language_level; 1676 int color_device; 1677 int variable_sizes; 1678 int accurate_screens; 1679 int contone_only; 1680 int landscape; 1681 int model_number; 1682 int manual_copies; 1683 int throughput; 1684 ppd_cs_t colorspace; 1685 char *patches; 1686 int num_emulations; 1687 ppd_emul_t *emulations; 1688 char *jcl_begin; 1689 char *jcl_ps; 1690 char *jcl_end; 1691 char *lang_encoding; 1692 char *lang_version; 1693 char *modelname; 1694 char *ttrasterizer; 1695 char *manufacturer; 1696 char *product; 1697 char *nickname; 1698 char *shortnickname; 1699 int num_groups; 1700 ppd_group_t *groups; 1701 int num_sizes; 1702 ppd_size_t *sizes; 1703 float custom_min[2]; 1704 float custom_max[2]; 1705 float custom_margins[4]; 1706 int num_consts; 1707 ppd_const_t *consts; 1708 int num_fonts; 1709 char **fonts; 1710 int num_profiles; 1711 ppd_profile_t *profiles; 1712 int num_filters; 1713 char **filters; 1714 int flip_duplex; 1715 char *protocols; 1716 char *pcfilename; 1717 int num_attrs; 1718 int cur_attr; 1719 ppd_attr_t **attrs; 1720 } ppd_file_t; 1721 typedef enum { 1722 PPD_OK = 0, 1723 PPD_FILE_OPEN_ERROR = 1, 1724 PPD_NULL_FILE = 2, 1725 PPD_ALLOC_ERROR = 3, 1726 PPD_MISSING_PPDADOBE4 = 4, 1727 PPD_MISSING_VALUE = 5, 1728 PPD_INTERNAL_ERROR = 6, 1729 PPD_BAD_OPEN_GROUP = 7, 1730 PPD_NESTED_OPEN_GROUP = 8, 1731 PPD_BAD_OPEN_UI = 9, 1732 PPD_NESTED_OPEN_UI = 10, 1733 PPD_BAD_ORDER_DEPENDENCY = 11, 1734 PPD_BAD_UI_CONSTRAINTS = 12, 1735 PPD_MISSING_ASTERISK = 13, 1736 PPD_LINE_TOO_LONG = 14, 1737 PPD_ILLEGAL_CHARACTER = 15, 1738 PPD_ILLEGAL_MAIN_KEYWORD = 16, 1739 PPD_ILLEGAL_OPTION_KEYWORD = 17, 1740 PPD_ILLEGAL_TRANSLATION = 18, 1741 PPD_ILLEGAL_WHITESPACE = 19 1742 } ppd_status_t; 1743 typedef enum { 1744 PPD_CONFORM_RELAXED = 0, 1745 PPD_CONFORM_STRICT = 1 1746 } ppd_conform_t; 1747 extern void ppdClose(ppd_file_t * ppd); 1748 extern int ppdCollect(ppd_file_t * ppd, ppd_section_t section, 1749 ppd_choice_t * **choices); 1750 extern int ppdConflicts(ppd_file_t * ppd); 1751 extern int ppdEmit(ppd_file_t * ppd, FILE * fp, ppd_section_t section); 1752 extern int ppdEmitFd(ppd_file_t * ppd, int fd, ppd_section_t section); 1753 extern int ppdEmitJCL(ppd_file_t * ppd, FILE * fp, int job_id, 1754 const char *user, const char *title); 1755 extern const char *ppdErrorString(ppd_status_t status); 1756 extern ppd_attr_t *ppdFindAttr(ppd_file_t * ppd, const char *name, 1757 const char *spec); 1758 extern ppd_choice_t *ppdFindChoice(ppd_option_t * o, const char *option); 1759 extern ppd_choice_t *ppdFindMarkedChoice(ppd_file_t * ppd, 1760 const char *keyword); 1761 extern ppd_attr_t *ppdFindNextAttr(ppd_file_t * ppd, const char *name, 1762 const char *spec); 1763 extern ppd_option_t *ppdFindOption(ppd_file_t * ppd, const char *keyword); 1764 extern int ppdIsMarked(ppd_file_t * ppd, const char *keyword, 1765 const char *option); 1766 extern ppd_status_t ppdLastError(int *line); 1767 extern void ppdMarkDefaults(ppd_file_t * ppd); 1768 extern int ppdMarkOption(ppd_file_t * ppd, const char *keyword, 1769 const char *option); 1770 extern ppd_file_t *ppdOpen(FILE * fp); 1771 extern ppd_file_t *ppdOpenFd(int fd); 1772 extern ppd_file_t *ppdOpenFile(const char *filename); 1773 extern float ppdPageLength(ppd_file_t * ppd, const char *name); 1774 extern ppd_size_t *ppdPageSize(ppd_file_t * ppd, const char *name); 1775 extern float ppdPageWidth(ppd_file_t * ppd, const char *name); 1776 extern void ppdSetConformance(ppd_conform_t c); 1777 __________________________________________________________ 1778 1779 7.3. Interface Definitions for libcups 1780 1781 Table of Contents 1782 cupsAddDest -- Add a destination to the list of destinations. 1783 cupsAddOption -- Add an option to an option array. 1784 cupsCancelJob -- Cancel a print job on the default server. 1785 cupsEncryption -- Get the default encryption settings. 1786 cupsFreeDests -- Free the memory used by the list of 1787 destinations. 1788 1789 cupsFreeJobs -- Free memory used by job data. 1790 cupsFreeOptions -- Free all memory used by options. 1791 cupsGetDefault -- Get the default printer or class for the 1792 default server. 1793 1794 cupsGetDest -- Get the named destination from the list. 1795 cupsGetDests -- Get the list of destinations from the default 1796 server. 1797 1798 cupsGetJobs -- Get the jobs from the default server. 1799 cupsGetOption -- Get an option value. 1800 cupsGetPPD -- Get the PPD file for a printer on the default 1801 server. 1802 1803 cupsGetPassword -- Get a password from the user. 1804 cupsLangEncoding -- Return the character encoding (us-ascii, 1805 etc.) 1806 1807 cupsLangFlush -- Flush all language data out of the cache. 1808 cupsLangFree -- Free language data. 1809 cupsLangGet -- Get a language. 1810 cupsLastError -- Return the last IPP status code. 1811 cupsMarkOptions -- Mark command-line options in a PPD file. 1812 cupsParseOptions -- Parse options from a command-line argument. 1813 cupsPrintFile -- Print a file to a printer or class on the 1814 default server. 1815 1816 cupsPrintFiles -- Print one or more files to a printer or class 1817 on the 1818 1819 cupsServer -- Return the hostname/address of the default 1820 server. 1821 1822 cupsSetDests -- Save the list of destinations for the default 1823 server. 1824 1825 cupsSetEncryption -- Set the encryption preference. 1826 cupsSetPasswordCB -- Set the password callback for CUPS. 1827 cupsSetServer -- Set the default server name. 1828 cupsSetUser -- Set the default user name. 1829 cupsTempFd -- Creates a temporary file. 1830 cupsUser -- Return the current user's name. 1831 ppdClose -- Free all memory used by the PPD file. 1832 ppdCollect -- Collect all marked options that reside in the 1833 specified 1834 1835 ppdConflicts -- Check to see if there are any conflicts. 1836 ppdEmit -- Emit code for marked options to a file. 1837 ppdEmitFd -- Emit code for marked options to a file. 1838 ppdEmitJCL -- Emit code for JCL options to a file. 1839 ppdErrorString -- Returns the text assocated with a status. 1840 ppdFindAttr -- Find the first matching attribute... 1841 ppdFindChoice -- Return a pointer to an option choice. 1842 ppdFindMarkedChoice -- Return the marked choice for the 1843 specified option. 1844 1845 ppdFindNextAttr -- Find the next matching attribute... 1846 ppdFindOption -- Return a pointer to the specified option. 1847 ppdIsMarked -- Check to see if an option is marked... 1848 ppdLastError -- Return the status from the last ppdOpen*(). 1849 ppdMarkDefaults -- Mark all default options in the PPD file. 1850 ppdMarkOption -- Mark an option in a PPD file. 1851 ppdOpen -- Read a PPD file into memory. 1852 ppdOpenFd -- Read a PPD file into memory. 1853 ppdOpenFile -- Read a PPD file into memory. 1854 ppdPageLength -- Get the page length for the given size. 1855 ppdPageSize -- Get the page size record for the given size. 1856 ppdPageWidth -- Get the page width for the given size. 1857 ppdSetConformance -- Set the conformance level for PPD files. 1858 1859 The interfaces defined on the following pages are included in 1860 libcups and are defined by this specification. Unless otherwise 1861 noted, these interfaces shall be included in the source 1862 standard. 1863 1864 Other interfaces listed in Section 7.1 shall behave as 1865 described in the referenced base document. 1866 1867 cupsAddDest 1868 1869 Name 1870 1871 cupsAddDest -- Add a destination to the list of destinations. 1872 1873 Synopsis 1874 1875 #include 1876 1877 int cupsAddDest(const char * name, const char * instance, int 1878 num_dests, cups_dest_t ** dests); 1879 1880 Description 1881 1882 Add a destination to the list of destinations. 1883 1884 This function cannot be used to add a new class or printer 1885 queue, it only adds a new container of saved options for the 1886 named destination or instance. 1887 1888 If the named destination already exists, the destination list 1889 is returned unchanged. Adding a new instance of a destination 1890 creates a copy of that destination's options. 1891 1892 Use the cupsSaveDests() function to save the updated list of 1893 destinations to the user's lpoptions file. 1894 1895 Return Value 1896 1897 New number of destinations 1898 1899 cupsAddOption 1900 1901 Name 1902 1903 cupsAddOption -- Add an option to an option array. 1904 1905 Synopsis 1906 1907 #include 1908 1909 int cupsAddOption(const char * name, const char * value, int 1910 num_options, cups_option_t ** options); 1911 1912 Description 1913 1914 Add an option to an option array. 1915 1916 Return Value 1917 1918 Number of options 1919 1920 cupsCancelJob 1921 1922 Name 1923 1924 cupsCancelJob -- Cancel a print job on the default server. 1925 1926 Synopsis 1927 1928 #include 1929 1930 int cupsCancelJob(const char * name, int job); 1931 1932 Description 1933 1934 Cancel a print job on the default server. 1935 1936 Use the cupsLastError() and cupsLastErrorString() functions to 1937 get the cause of any failure. 1938 1939 Return Value 1940 1941 1 on success, 0 on failure 1942 1943 cupsEncryption 1944 1945 Name 1946 1947 cupsEncryption -- Get the default encryption settings. 1948 1949 Synopsis 1950 1951 #include 1952 1953 http_encryption_t cupsEncryption(void); 1954 1955 Description 1956 1957 Get the default encryption settings. 1958 1959 The default encryption setting comes from the CUPS_ENCRYPTION 1960 environment variable, then the ~/.cupsrc file, and finally the 1961 /etc/cups/client.conf file. If not set, the default is 1962 HTTP_ENCRYPT_IF_REQUESTED. 1963 1964 Return Value 1965 1966 Encryption settings 1967 1968 cupsFreeDests 1969 1970 Name 1971 1972 cupsFreeDests -- Free the memory used by the list of 1973 destinations. 1974 1975 Synopsis 1976 1977 #include 1978 1979 void cupsFreeDests(int num_dests, cups_dest_t * dests); 1980 1981 Description 1982 1983 Free the memory used by the list of destinations. 1984 1985 Return Value 1986 1987 This function does not return a value. 1988 1989 cupsFreeJobs 1990 1991 Name 1992 1993 cupsFreeJobs -- Free memory used by job data. 1994 1995 Synopsis 1996 1997 #include 1998 1999 void cupsFreeJobs(int num_jobs, cups_job_t * jobs); 2000 2001 Description 2002 2003 Free memory used by job data. 2004 2005 Return Value 2006 2007 This function does not return a value. 2008 2009 cupsFreeOptions 2010 2011 Name 2012 2013 cupsFreeOptions -- Free all memory used by options. 2014 2015 Synopsis 2016 2017 #include 2018 2019 void cupsFreeOptions(int num_options, cups_option_t * options); 2020 2021 Description 2022 2023 Free all memory used by options. 2024 2025 Return Value 2026 2027 This function does not return a value. 2028 2029 cupsGetDefault 2030 2031 Name 2032 2033 cupsGetDefault -- Get the default printer or class for the 2034 default server. 2035 2036 Synopsis 2037 2038 #include 2039 2040 const char * cupsGetDefault(void); 2041 2042 Description 2043 2044 Get the default printer or class for the default server. 2045 2046 This function returns the default printer or class as defined 2047 by the LPDEST or PRINTER environment variables. If these 2048 environment variables are not set, the server default 2049 destination is returned. Applications should use the 2050 cupsGetDests() and cupsGetDest() functions to get the 2051 user-defined default printer, as this function does not support 2052 the lpoptions-defined default printer. 2053 2054 Return Value 2055 2056 Default printer or NULL 2057 2058 cupsGetDest 2059 2060 Name 2061 2062 cupsGetDest -- Get the named destination from the list. 2063 2064 Synopsis 2065 2066 #include 2067 2068 cups_dest_t * cupsGetDest(const char * name, const char * 2069 instance, int num_dests, cups_dest_t * dests); 2070 2071 Description 2072 2073 Get the named destination from the list. 2074 2075 Use the cupsGetDests() or cupsGetDests2() functions to get a 2076 list of supported destinations for the current user. 2077 2078 Return Value 2079 2080 Destination pointer or NULL 2081 2082 cupsGetDests 2083 2084 Name 2085 2086 cupsGetDests -- Get the list of destinations from the default 2087 server. 2088 2089 Synopsis 2090 2091 #include 2092 2093 int cupsGetDests(cups_dest_t ** dests); 2094 2095 Description 2096 2097 Get the list of destinations from the default server. 2098 2099 Starting with CUPS 1.2, the returned list of destinations 2100 include the printer-info, printer-is-accepting-jobs, 2101 printer-is-shared, printer-make-and-model, printer-state, 2102 printer-state-change-time, printer-state-reasons, and 2103 printer-type attributes as options. 2104 2105 Use the cupsFreeDests() function to free the destination list 2106 and the cupsGetDest() function to find a particular 2107 destination. 2108 2109 Return Value 2110 2111 Number of destinations 2112 2113 cupsGetJobs 2114 2115 Name 2116 2117 cupsGetJobs -- Get the jobs from the default server. 2118 2119 Synopsis 2120 2121 #include 2122 2123 int cupsGetJobs(cups_job_t ** jobs, const char * mydest, int 2124 myjobs, int completed); 2125 2126 Description 2127 2128 Get the jobs from the default server. 2129 2130 Return Value 2131 2132 Number of jobs 2133 2134 cupsGetOption 2135 2136 Name 2137 2138 cupsGetOption -- Get an option value. 2139 2140 Synopsis 2141 2142 #include 2143 2144 const char * cupsGetOption(const char * name, int num_options, 2145 cups_option_t * options); 2146 2147 Description 2148 2149 Get an option value. 2150 2151 Return Value 2152 2153 Option value or NULL 2154 2155 cupsGetPPD 2156 2157 Name 2158 2159 cupsGetPPD -- Get the PPD file for a printer on the default 2160 server. 2161 2162 Synopsis 2163 2164 #include 2165 2166 const char * cupsGetPPD(const char * name); 2167 2168 Description 2169 2170 Get the PPD file for a printer on the default server. 2171 2172 For classes, cupsGetPPD() returns the PPD file for the first 2173 printer in the class. 2174 2175 Return Value 2176 2177 Filename for PPD file 2178 2179 cupsGetPassword 2180 2181 Name 2182 2183 cupsGetPassword -- Get a password from the user. 2184 2185 Synopsis 2186 2187 #include 2188 2189 const char * cupsGetPassword(const char * prompt); 2190 2191 Description 2192 2193 Get a password from the user. 2194 2195 Uses the current password callback function. Returns NULL if 2196 the user does not provide a password. 2197 2198 Return Value 2199 2200 Password 2201 2202 cupsLangEncoding 2203 2204 Name 2205 2206 cupsLangEncoding -- Return the character encoding (us-ascii, 2207 etc.) 2208 2209 Synopsis 2210 2211 #include 2212 2213 const char * cupsLangEncoding(cups_lang_t * lang); 2214 2215 Description 2216 2217 Return the character encoding (us-ascii, etc.) for the given 2218 language. 2219 2220 Return Value 2221 2222 Character encoding 2223 2224 cupsLangFlush 2225 2226 Name 2227 2228 cupsLangFlush -- Flush all language data out of the cache. 2229 2230 Synopsis 2231 2232 #include 2233 2234 void cupsLangFlush(void); 2235 2236 Description 2237 2238 Flush all language data out of the cache. 2239 2240 Return Value 2241 2242 This function does not return a value. 2243 2244 cupsLangFree 2245 2246 Name 2247 2248 cupsLangFree -- Free language data. 2249 2250 Synopsis 2251 2252 #include 2253 2254 void cupsLangFree(cups_lang_t * lang); 2255 2256 Description 2257 2258 Free language data. 2259 2260 This does not actually free anything; use cupsLangFlush() for 2261 that. 2262 2263 Return Value 2264 2265 This function does not return a value. 2266 2267 cupsLangGet 2268 2269 Name 2270 2271 cupsLangGet -- Get a language. 2272 2273 Synopsis 2274 2275 #include 2276 2277 cups_lang_t * cupsLangGet(const char * language); 2278 2279 Description 2280 2281 Get a language. 2282 2283 Return Value 2284 2285 Language data 2286 2287 cupsLastError 2288 2289 Name 2290 2291 cupsLastError -- Return the last IPP status code. 2292 2293 Synopsis 2294 2295 #include 2296 2297 ipp_status_t cupsLastError(void); 2298 2299 Description 2300 2301 Return the last IPP status code. 2302 2303 Return Value 2304 2305 IPP status code from last request 2306 2307 cupsMarkOptions 2308 2309 Name 2310 2311 cupsMarkOptions -- Mark command-line options in a PPD file. 2312 2313 Synopsis 2314 2315 #include 2316 2317 int cupsMarkOptions(ppd_file_t * ppd, int num_options, 2318 cups_option_t * options); 2319 2320 Description 2321 2322 Mark command-line options in a PPD file. 2323 2324 Return Value 2325 2326 1 if conflicting 2327 2328 cupsParseOptions 2329 2330 Name 2331 2332 cupsParseOptions -- Parse options from a command-line argument. 2333 2334 Synopsis 2335 2336 #include 2337 2338 int cupsParseOptions(const char * arg, int num_options, 2339 cups_option_t ** options); 2340 2341 Description 2342 2343 Parse options from a command-line argument. 2344 2345 This function converts space-delimited name/value pairs 2346 according to the PAPI text option ABNF specification. 2347 Collection values ("name={a=... b=... c=...}") are stored with 2348 the curley brackets intact - use cupsParseOptions() on the 2349 value to extract the collection attributes. 2350 2351 Return Value 2352 2353 Number of options found 2354 2355 cupsPrintFile 2356 2357 Name 2358 2359 cupsPrintFile -- Print a file to a printer or class on the 2360 default server. 2361 2362 Synopsis 2363 2364 #include 2365 2366 int cupsPrintFile(const char * name, const char * filename, 2367 const char * title, int num_options, cups_option_t * options); 2368 2369 Description 2370 2371 Print a file to a printer or class on the default server. 2372 2373 Return Value 2374 2375 Job ID 2376 2377 cupsPrintFiles 2378 2379 Name 2380 2381 cupsPrintFiles -- Print one or more files to a printer or class 2382 on the 2383 2384 Synopsis 2385 2386 #include 2387 2388 int cupsPrintFiles(const char * name, int num_files, const char 2389 ** files, const char * title, int num_options, cups_option_t * 2390 options); 2391 2392 Description 2393 2394 Print one or more files to a printer or class on the default 2395 server. 2396 2397 Return Value 2398 2399 Job ID 2400 2401 cupsServer 2402 2403 Name 2404 2405 cupsServer -- Return the hostname/address of the default 2406 server. 2407 2408 Synopsis 2409 2410 #include 2411 2412 const char * cupsServer(void); 2413 2414 Description 2415 2416 Return the hostname/address of the default server. 2417 2418 The returned value can be a fully-qualified hostname, a numeric 2419 IPv4 or IPv6 address, or a domain socket pathname. 2420 2421 Return Value 2422 2423 Server name 2424 2425 cupsSetDests 2426 2427 Name 2428 2429 cupsSetDests -- Save the list of destinations for the default 2430 server. 2431 2432 Synopsis 2433 2434 #include 2435 2436 void cupsSetDests(int num_dests, cups_dest_t * dests); 2437 2438 Description 2439 2440 Save the list of destinations for the default server. 2441 2442 This function saves the destinations to /etc/cups/lpoptions 2443 when run as root and ~/.cups/lpoptions when run as a normal 2444 user. 2445 2446 Return Value 2447 2448 This function does not return a value. 2449 2450 cupsSetEncryption 2451 2452 Name 2453 2454 cupsSetEncryption -- Set the encryption preference. 2455 2456 Synopsis 2457 2458 #include 2459 2460 void cupsSetEncryption(http_encryption_t e); 2461 2462 Description 2463 2464 Set the encryption preference. 2465 2466 Return Value 2467 2468 This function does not return a value. 2469 2470 cupsSetPasswordCB 2471 2472 Name 2473 2474 cupsSetPasswordCB -- Set the password callback for CUPS. 2475 2476 Synopsis 2477 2478 #include 2479 2480 void cupsSetPasswordCB(cups_password_cb_t cb); 2481 2482 Description 2483 2484 Set the password callback for CUPS. 2485 2486 Pass NULL to restore the default (console) password callback. 2487 2488 Return Value 2489 2490 This function does not return a value. 2491 2492 cupsSetServer 2493 2494 Name 2495 2496 cupsSetServer -- Set the default server name. 2497 2498 Synopsis 2499 2500 #include 2501 2502 void cupsSetServer(const char * server); 2503 2504 Description 2505 2506 Set the default server name. 2507 2508 The "server" string can be a fully-qualified hostname, a 2509 numeric IPv4 or IPv6 address, or a domain socket pathname. Pass 2510 NULL to restore the default server name. 2511 2512 Return Value 2513 2514 This function does not return a value. 2515 2516 cupsSetUser 2517 2518 Name 2519 2520 cupsSetUser -- Set the default user name. 2521 2522 Synopsis 2523 2524 #include 2525 2526 void cupsSetUser(const char * user); 2527 2528 Description 2529 2530 Set the default user name. 2531 2532 Pass NULL to restore the default user name. 2533 2534 Return Value 2535 2536 This function does not return a value. 2537 2538 cupsTempFd 2539 2540 Name 2541 2542 cupsTempFd -- Creates a temporary file. 2543 2544 Synopsis 2545 2546 #include 2547 2548 int cupsTempFd(char * filename, int len); 2549 2550 Description 2551 2552 Creates a temporary file. 2553 2554 The temporary filename is returned in the filename buffer. The 2555 temporary file is opened for reading and writing. 2556 2557 Return Value 2558 2559 New file descriptor or -1 on error 2560 2561 cupsUser 2562 2563 Name 2564 2565 cupsUser -- Return the current user's name. 2566 2567 Synopsis 2568 2569 #include 2570 2571 const char * cupsUser(void); 2572 2573 Description 2574 2575 Return the current user's name. 2576 2577 Return Value 2578 2579 User name 2580 2581 ppdClose 2582 2583 Name 2584 2585 ppdClose -- Free all memory used by the PPD file. 2586 2587 Synopsis 2588 2589 #include 2590 2591 void ppdClose(ppd_file_t * ppd); 2592 2593 Description 2594 2595 Free all memory used by the PPD file. 2596 2597 Return Value 2598 2599 This function does not return a value. 2600 2601 ppdCollect 2602 2603 Name 2604 2605 ppdCollect -- Collect all marked options that reside in the 2606 specified 2607 2608 Synopsis 2609 2610 #include 2611 2612 int ppdCollect(ppd_file_t * ppd, ppd_section_t section, 2613 ppd_choice_t *** choices); 2614 2615 Description 2616 2617 Collect all marked options that reside in the specified 2618 section. 2619 2620 Return Value 2621 2622 Number of options marked 2623 2624 ppdConflicts 2625 2626 Name 2627 2628 ppdConflicts -- Check to see if there are any conflicts. 2629 2630 Synopsis 2631 2632 #include 2633 2634 int ppdConflicts(ppd_file_t * ppd); 2635 2636 Description 2637 2638 Check to see if there are any conflicts. 2639 2640 Return Value 2641 2642 Number of conflicts found 2643 2644 ppdEmit 2645 2646 Name 2647 2648 ppdEmit -- Emit code for marked options to a file. 2649 2650 Synopsis 2651 2652 #include 2653 2654 int ppdEmit(ppd_file_t * ppd, FILE * fp, ppd_section_t 2655 section); 2656 2657 Description 2658 2659 Emit code for marked options to a file. 2660 2661 Return Value 2662 2663 0 on success, -1 on failure 2664 2665 ppdEmitFd 2666 2667 Name 2668 2669 ppdEmitFd -- Emit code for marked options to a file. 2670 2671 Synopsis 2672 2673 #include 2674 2675 int ppdEmitFd(ppd_file_t * ppd, int fd, ppd_section_t section); 2676 2677 Description 2678 2679 Emit code for marked options to a file. 2680 2681 Return Value 2682 2683 0 on success, -1 on failure 2684 2685 ppdEmitJCL 2686 2687 Name 2688 2689 ppdEmitJCL -- Emit code for JCL options to a file. 2690 2691 Synopsis 2692 2693 #include 2694 2695 int ppdEmitJCL(ppd_file_t * ppd, FILE * fp, int job_id, const 2696 char * user, const char * title); 2697 2698 Description 2699 2700 Emit code for JCL options to a file. 2701 2702 Return Value 2703 2704 0 on success, -1 on failure 2705 2706 ppdErrorString 2707 2708 Name 2709 2710 ppdErrorString -- Returns the text assocated with a status. 2711 2712 Synopsis 2713 2714 #include 2715 2716 const char * ppdErrorString(ppd_status_t status); 2717 2718 Description 2719 2720 Returns the text assocated with a status. 2721 2722 Return Value 2723 2724 Status string 2725 2726 ppdFindAttr 2727 2728 Name 2729 2730 ppdFindAttr -- Find the first matching attribute... 2731 2732 Synopsis 2733 2734 #include 2735 2736 ppd_attr_t * ppdFindAttr(ppd_file_t * ppd, const char * name, 2737 const char * spec); 2738 2739 Description 2740 2741 Find the first matching attribute... 2742 2743 Return Value 2744 2745 Attribute or NULL if not found 2746 2747 ppdFindChoice 2748 2749 Name 2750 2751 ppdFindChoice -- Return a pointer to an option choice. 2752 2753 Synopsis 2754 2755 #include 2756 2757 ppd_choice_t * ppdFindChoice(ppd_option_t * o, const char * 2758 choice); 2759 2760 Description 2761 2762 Return a pointer to an option choice. 2763 2764 Return Value 2765 2766 Choice pointer or NULL 2767 2768 ppdFindMarkedChoice 2769 2770 Name 2771 2772 ppdFindMarkedChoice -- Return the marked choice for the 2773 specified option. 2774 2775 Synopsis 2776 2777 #include 2778 2779 ppd_choice_t * ppdFindMarkedChoice(ppd_file_t * ppd, const char 2780 * option); 2781 2782 Description 2783 2784 Return the marked choice for the specified option. 2785 2786 Return Value 2787 2788 Pointer to choice or NULL 2789 2790 ppdFindNextAttr 2791 2792 Name 2793 2794 ppdFindNextAttr -- Find the next matching attribute... 2795 2796 Synopsis 2797 2798 #include 2799 2800 ppd_attr_t * ppdFindNextAttr(ppd_file_t * ppd, const char * 2801 name, const char * spec); 2802 2803 Description 2804 2805 Find the next matching attribute... 2806 2807 Return Value 2808 2809 Attribute or NULL if not found 2810 2811 ppdFindOption 2812 2813 Name 2814 2815 ppdFindOption -- Return a pointer to the specified option. 2816 2817 Synopsis 2818 2819 #include 2820 2821 ppd_option_t * ppdFindOption(ppd_file_t * ppd, const char * 2822 option); 2823 2824 Description 2825 2826 Return a pointer to the specified option. 2827 2828 Return Value 2829 2830 Pointer to option or NULL 2831 2832 ppdIsMarked 2833 2834 Name 2835 2836 ppdIsMarked -- Check to see if an option is marked... 2837 2838 Synopsis 2839 2840 #include 2841 2842 int ppdIsMarked(ppd_file_t * ppd, const char * option, const 2843 char * choice); 2844 2845 Description 2846 2847 Check to see if an option is marked... 2848 2849 Return Value 2850 2851 Non-zero if option is marked 2852 2853 ppdLastError 2854 2855 Name 2856 2857 ppdLastError -- Return the status from the last ppdOpen*(). 2858 2859 Synopsis 2860 2861 #include 2862 2863 ppd_status_t ppdLastError(int * line); 2864 2865 Description 2866 2867 Return the status from the last ppdOpen*(). 2868 2869 Return Value 2870 2871 Status code 2872 2873 ppdMarkDefaults 2874 2875 Name 2876 2877 ppdMarkDefaults -- Mark all default options in the PPD file. 2878 2879 Synopsis 2880 2881 #include 2882 2883 void ppdMarkDefaults(ppd_file_t * ppd); 2884 2885 Description 2886 2887 Mark all default options in the PPD file. 2888 2889 Return Value 2890 2891 This function does not return a value. 2892 2893 ppdMarkOption 2894 2895 Name 2896 2897 ppdMarkOption -- Mark an option in a PPD file. 2898 2899 Synopsis 2900 2901 #include 2902 2903 int ppdMarkOption(ppd_file_t * ppd, const char * option, const 2904 char * choice); 2905 2906 Description 2907 2908 Mark an option in a PPD file. 2909 2910 Notes: 2911 2912 -1 is returned if the given option would conflict with any 2913 currently selected option. 2914 2915 Return Value 2916 2917 Number of conflicts 2918 2919 ppdOpen 2920 2921 Name 2922 2923 ppdOpen -- Read a PPD file into memory. 2924 2925 Synopsis 2926 2927 #include 2928 2929 ppd_file_t * ppdOpen(FILE * fp); 2930 2931 Description 2932 2933 Read a PPD file into memory. 2934 2935 Return Value 2936 2937 PPD file record 2938 2939 ppdOpenFd 2940 2941 Name 2942 2943 ppdOpenFd -- Read a PPD file into memory. 2944 2945 Synopsis 2946 2947 #include 2948 2949 ppd_file_t * ppdOpenFd(int fd); 2950 2951 Description 2952 2953 Read a PPD file into memory. 2954 2955 Return Value 2956 2957 PPD file record 2958 2959 ppdOpenFile 2960 2961 Name 2962 2963 ppdOpenFile -- Read a PPD file into memory. 2964 2965 Synopsis 2966 2967 #include 2968 2969 ppd_file_t * ppdOpenFile(const char * filename); 2970 2971 Description 2972 2973 Read a PPD file into memory. 2974 2975 Return Value 2976 2977 PPD file record 2978 2979 ppdPageLength 2980 2981 Name 2982 2983 ppdPageLength -- Get the page length for the given size. 2984 2985 Synopsis 2986 2987 #include 2988 2989 float ppdPageLength(ppd_file_t * ppd, const char * name); 2990 2991 Description 2992 2993 Get the page length for the given size. 2994 2995 Return Value 2996 2997 Length of page in points or 0.0 2998 2999 ppdPageSize 3000 3001 Name 3002 3003 ppdPageSize -- Get the page size record for the given size. 3004 3005 Synopsis 3006 3007 #include 3008 3009 ppd_size_t * ppdPageSize(ppd_file_t * ppd, const char * name); 3010 3011 Description 3012 3013 Get the page size record for the given size. 3014 3015 Return Value 3016 3017 Size record for page or NULL 3018 3019 ppdPageWidth 3020 3021 Name 3022 3023 ppdPageWidth -- Get the page width for the given size. 3024 3025 Synopsis 3026 3027 #include 3028 3029 float ppdPageWidth(ppd_file_t * ppd, const char * name); 3030 3031 Description 3032 3033 Get the page width for the given size. 3034 3035 Return Value 3036 3037 Width of page in points or 0.0 3038 3039 ppdSetConformance 3040 3041 Name 3042 3043 ppdSetConformance -- Set the conformance level for PPD files. 3044 3045 Synopsis 3046 3047 #include 3048 3049 void ppdSetConformance(ppd_conform_t c); 3050 3051 Description 3052 3053 Set the conformance level for PPD files. 3054 3055 Return Value 3056 3057 This function does not return a value. 3058 __________________________________________________________ 3059 3060 7.4. Interfaces for libcupsimage 3061 3062 Table 7-3 defines the library name and shared object name for 3063 the libcupsimage library 3064 3065 Table 7-3. libcupsimage Definition 3066 Library: libcupsimage 3067 SONAME: libcupsimage.so.2 3068 3069 The behavior of the interfaces in this library is specified by 3070 the following specifications: 3071 3072 [LSB] This Specification 3073 __________________________________________________________ 3074 3075 7.4.1. CUPS Raster ABI 3076 __________________________________________________________ 3077 3078 7.4.1.1. Interfaces for CUPS Raster ABI 3079 3080 An LSB conforming implementation shall provide the generic 3081 functions for CUPS Raster ABI specified in Table 7-4, with the 3082 full mandatory functionality as described in the referenced 3083 underlying specification. 3084 3085 Table 7-4. libcupsimage - CUPS Raster ABI Function Interfaces 3086 cupsRasterClose [LSB] cupsRasterOpen [LSB] cupsRasterReadHeader 3087 [LSB] cupsRasterReadPixels [LSB] 3088 cupsRasterWriteHeader [LSB] cupsRasterWritePixels [LSB] 3089 __________________________________________________________ 3090 3091 7.5. Data Definitions for libcupsimage 3092 3093 This section defines global identifiers and their values that 3094 are associated with interfaces contained in libcupsimage. These 3095 definitions are organized into groups that correspond to system 3096 headers. This convention is used as a convenience for the 3097 reader, and does not imply the existence of these headers, or 3098 their content. Where an interface is defined as requiring a 3099 particular system header file all of the data definitions for 3100 that system header file presented here shall be in effect. 3101 3102 This section gives data definitions to promote binary 3103 application portability, not to repeat source interface 3104 definitions available elsewhere. System providers and 3105 application developers should use this ABI to supplement - not 3106 to replace - source interface definition specifications. 3107 3108 This specification uses the ISO C (1999) C Language as the 3109 reference programming language, and data definitions are 3110 specified in ISO C format. The C language is used here as a 3111 convenient notation. Using a C language description of these 3112 data objects does not preclude their use by other programming 3113 languages. 3114 __________________________________________________________ 3115 3116 7.5.1. cups/raster.h 3117 3118 #define _CUPS_RASTER_H_ 3119 #define CUPS_RASTER_SYNC 0x52615374 3120 #define CUPS_RASTER_REVSYNC 0x74536152 3121 #define CUPS_RASTER_HAVE_COLORIMETRIC 1 3122 3123 typedef enum { 3124 CUPS_RASTER_READ = 0, 3125 CUPS_RASTER_WRITE = 1 3126 } cups_mode_t; 3127 typedef struct _cups_raster_s cups_raster_t; 3128 typedef enum { 3129 CUPS_ADVANCE_NONE = 0, 3130 CUPS_ADVANCE_FILE = 1, 3131 CUPS_ADVANCE_JOB = 2, 3132 CUPS_ADVANCE_SET = 3, 3133 CUPS_ADVANCE_PAGE = 4 3134 } cups_adv_t; 3135 typedef enum { 3136 CUPS_FALSE = 0, 3137 CUPS_TRUE = 1 3138 } cups_bool_t; 3139 typedef enum { 3140 CUPS_CUT_NONE = 0, 3141 CUPS_CUT_FILE = 1, 3142 CUPS_CUT_JOB = 2, 3143 CUPS_CUT_SET = 3, 3144 CUPS_CUT_PAGE = 4 3145 } cups_cut_t; 3146 typedef enum { 3147 CUPS_JOG_NONE = 0, 3148 CUPS_JOG_FILE = 1, 3149 CUPS_JOG_JOB = 2, 3150 CUPS_JOG_SET = 3 3151 } cups_jog_t; 3152 typedef enum { 3153 CUPS_EDGE_TOP = 0, 3154 CUPS_EDGE_RIGHT = 1, 3155 CUPS_EDGE_BOTTOM = 2, 3156 CUPS_EDGE_LEFT = 3 3157 } cups_edge_t; 3158 typedef enum { 3159 CUPS_ORIENT_0 = 0, 3160 CUPS_ORIENT_90 = 1, 3161 CUPS_ORIENT_180 = 2, 3162 CUPS_ORIENT_270 = 3 3163 } cups_orient_t; 3164 typedef enum { 3165 CUPS_ORDER_CHUNKED = 0, 3166 CUPS_ORDER_BANDED = 1, 3167 CUPS_ORDER_PLANAR = 2 3168 } cups_order_t; 3169 typedef enum { 3170 CUPS_CSPACE_W = 0, 3171 CUPS_CSPACE_RGB = 1, 3172 CUPS_CSPACE_RGBA = 2, 3173 CUPS_CSPACE_K = 3, 3174 CUPS_CSPACE_CMY = 4, 3175 CUPS_CSPACE_YMC = 5, 3176 CUPS_CSPACE_CMYK = 6, 3177 CUPS_CSPACE_YMCK = 7, 3178 CUPS_CSPACE_KCMY = 8, 3179 CUPS_CSPACE_KCMYcm = 9, 3180 CUPS_CSPACE_GMCK = 10, 3181 CUPS_CSPACE_GMCS = 11, 3182 CUPS_CSPACE_WHITE = 12, 3183 CUPS_CSPACE_GOLD = 13, 3184 CUPS_CSPACE_SILVER = 14, 3185 CUPS_CSPACE_CIEXYZ = 15, 3186 CUPS_CSPACE_CIELab = 16, 3187 CUPS_CSPACE_ICC1 = 32, 3188 CUPS_CSPACE_ICC2 = 33, 3189 CUPS_CSPACE_ICC3 = 34, 3190 CUPS_CSPACE_ICC4 = 35, 3191 CUPS_CSPACE_ICC5 = 36, 3192 CUPS_CSPACE_ICC6 = 37, 3193 CUPS_CSPACE_ICC7 = 38, 3194 CUPS_CSPACE_ICC8 = 39, 3195 CUPS_CSPACE_ICC9 = 40, 3196 CUPS_CSPACE_ICCA = 41, 3197 CUPS_CSPACE_ICCB = 42, 3198 CUPS_CSPACE_ICCC = 43, 3199 CUPS_CSPACE_ICCD = 44, 3200 CUPS_CSPACE_ICCE = 45, 3201 CUPS_CSPACE_ICCF = 46 3202 } cups_cspace_t; 3203 typedef struct { 3204 char MediaClass[64]; 3205 char MediaColor[64]; 3206 char MediaType[64]; 3207 char OutputType[64]; 3208 unsigned int AdvanceDistance; 3209 cups_adv_t AdvanceMedia; 3210 cups_bool_t Collate; 3211 cups_cut_t CutMedia; 3212 cups_bool_t Duplex; 3213 unsigned int HWResolution[2]; 3214 unsigned int ImagingBoundingBox[4]; 3215 cups_bool_t InsertSheet; 3216 cups_jog_t Jog; 3217 cups_edge_t LeadingEdge; 3218 unsigned int Margins[2]; 3219 cups_bool_t ManualFeed; 3220 unsigned int MediaPosition; 3221 unsigned int MediaWeight; 3222 cups_bool_t MirrorPrint; 3223 cups_bool_t NegativePrint; 3224 unsigned int NumCopies; 3225 cups_orient_t Orientation; 3226 cups_bool_t OutputFaceUp; 3227 unsigned int PageSize[2]; 3228 cups_bool_t Separations; 3229 cups_bool_t TraySwitch; 3230 cups_bool_t Tumble; 3231 unsigned int cupsWidth; 3232 unsigned int cupsHeight; 3233 unsigned int cupsMediaType; 3234 unsigned int cupsBitsPerColor; 3235 unsigned int cupsBitsPerPixel; 3236 unsigned int cupsBytesPerLine; 3237 cups_order_t cupsColorOrder; 3238 cups_cspace_t cupsColorSpace; 3239 unsigned int cupsCompression; 3240 unsigned int cupsRowCount; 3241 unsigned int cupsRowFeed; 3242 unsigned int cupsRowStep; 3243 } cups_page_header_t; 3244 extern void cupsRasterClose(cups_raster_t * r); 3245 extern cups_raster_t *cupsRasterOpen(int fd, cups_mode_t mode); 3246 extern unsigned int cupsRasterReadHeader(cups_raster_t * r, 3247 cups_page_header_t * h); 3248 extern unsigned int cupsRasterReadPixels(cups_raster_t * r, 3249 unsigned char *p, 3250 unsigned int len); 3251 extern unsigned int cupsRasterWriteHeader(cups_raster_t * r, 3252 cups_page_header_t * h); 3253 extern unsigned int cupsRasterWritePixels(cups_raster_t * r, 3254 unsigned char *p, 3255 unsigned int len); 3256 __________________________________________________________ 3257 3258 7.6. Interface Definitions for libcupsimage 3259 3260 Table of Contents 3261 cupsRasterClose -- Close a raster stream. 3262 cupsRasterOpen -- Open a raster stream. 3263 cupsRasterReadHeader -- Read a raster page header and store it 3264 in a 3265 3266 cupsRasterReadPixels -- Read raster pixels. 3267 cupsRasterWriteHeader -- Write a raster page header from a V1 3268 page 3269 3270 cupsRasterWritePixels -- Write raster pixels. 3271 3272 The interfaces defined on the following pages are included in 3273 libcupsimage and are defined by this specification. Unless 3274 otherwise noted, these interfaces shall be included in the 3275 source standard. 3276 3277 Other interfaces listed in Section 7.4 shall behave as 3278 described in the referenced base document. 3279 3280 cupsRasterClose 3281 3282 Name 3283 3284 cupsRasterClose -- Close a raster stream. 3285 3286 Synopsis 3287 3288 #include 3289 3290 void cupsRasterClose(cups_raster_t * r); 3291 3292 Description 3293 3294 Close a raster stream. 3295 3296 Return Value 3297 3298 This function does not return a value. 3299 3300 cupsRasterOpen 3301 3302 Name 3303 3304 cupsRasterOpen -- Open a raster stream. 3305 3306 Synopsis 3307 3308 #include 3309 3310 cups_raster_t * cupsRasterOpen(int fd, cups_mode_t mode); 3311 3312 Description 3313 3314 Open a raster stream. 3315 3316 Return Value 3317 3318 New stream 3319 3320 cupsRasterReadHeader 3321 3322 Name 3323 3324 cupsRasterReadHeader -- Read a raster page header and store it 3325 in a 3326 3327 Synopsis 3328 3329 #include 3330 3331 unsigned cupsRasterReadHeader(cups_raster_t * r, 3332 cups_page_header_t * h); 3333 3334 Description 3335 3336 Read a raster page header and store it in a V1 page header 3337 structure. 3338 3339 Return Value 3340 3341 1 on success, 0 on fail 3342 3343 cupsRasterReadPixels 3344 3345 Name 3346 3347 cupsRasterReadPixels -- Read raster pixels. 3348 3349 Synopsis 3350 3351 #include 3352 3353 unsigned cupsRasterReadPixels(cups_raster_t * r, unsigned char 3354 * p, unsigned len); 3355 3356 Description 3357 3358 Read raster pixels. 3359 3360 Return Value 3361 3362 Number of bytes read 3363 3364 cupsRasterWriteHeader 3365 3366 Name 3367 3368 cupsRasterWriteHeader -- Write a raster page header from a V1 3369 page 3370 3371 Synopsis 3372 3373 #include 3374 3375 unsigned cupsRasterWriteHeader(cups_raster_t * r, 3376 cups_page_header_t * h); 3377 3378 Description 3379 3380 Write a raster page header from a V1 page header structure. 3381 3382 Return Value 3383 3384 1 on success, 0 on failure 3385 3386 cupsRasterWritePixels 3387 3388 Name 3389 3390 cupsRasterWritePixels -- Write raster pixels. 3391 3392 Synopsis 3393 3394 #include 3395 3396 unsigned cupsRasterWritePixels(cups_raster_t * r, unsigned char 3397 * p, unsigned len); 3398 3399 Description 3400 3401 Write raster pixels. 3402 3403 Return Value 3404 3405 Number of bytes written 3406 3407 III. Printing Commands 3408 3409 Table of Contents 3410 8. Printing Commands 3411 3412 8.1. Printing Commands 3413 8.2. Command Behavior 3414 3415 FOOMATIC-RIP -- Universal print filter/RIP wrapper 3416 GS -- GhostScript (PostScript and PDF language 3417 interpreter) 3418 __________________________________________________________ 3419 3420 Chapter 8. Printing Commands 3421 3422 8.1. Printing Commands 3423 3424 An LSB conforming implementation shall provide the commands and 3425 utilities as described in Table 8-1, with at least the behavior 3426 described as mandatory in the referenced underlying 3427 specification, with the following exceptions: 3428 3429 1. If any operand (except one which follows --) starts with a 3430 hyphen, the behavior is unspecified. 3431 3432 Rationale (Informative): Applications should place options 3433 before operands, or use --, as needed. This text is needed 3434 because, by default, GNU option parsing differs from POSIX, 3435 unless the environment variable POSIXLY_CORRECT is set. For 3436 example, ls . -a in GNU ls means to list the current 3437 directory, showing all files (that is, "." is an operand and 3438 -a is an option). In POSIX, "." and -a are both operands, 3439 and the command means to list the current directory, and 3440 also the file named -a. Suggesting that applications rely on 3441 the setting of the POSIXLY_CORRECT environment variable, or 3442 try to set it, seems worse than just asking the applications 3443 to invoke commands in ways which work with either the POSIX 3444 or GNU behaviors. 3445 3446 Table 8-1. Commands And Utilities 3447 foomatic-rip [1] gs [1] 3448 3449 Referenced Specification(s) 3450 3451 [1]. This Specification 3452 __________________________________________________________ 3453 3454 8.2. Command Behavior 3455 3456 Table of Contents 3457 FOOMATIC-RIP -- Universal print filter/RIP wrapper 3458 GS -- GhostScript (PostScript and PDF language interpreter) 3459 3460 This section contains descriptions for commands and utilities 3461 whose specified behavior in the LSB contradicts or extends the 3462 standards referenced. It also contains commands and utilities 3463 only required by the LSB and not specified by other standards. 3464 3465 FOOMATIC-RIP 3466 3467 Name 3468 3469 foomatic-rip -- Universal print filter/RIP wrapper 3470 3471 SYNOPSIS 3472 3473 Standalone Mode 3474 3475 foomatic-rip [-v] [-q] [-d] [ --ppd ppdfile ] [ -J jobtitle ] [ 3476 -o option=value [...] ] [ files ] 3477 3478 CUPS Mode 3479 3480 foomatic-rip jobid user jobtitle numcopies options [file] 3481 3482 DESCRIPTION 3483 3484 foomatic-rip is a universal print filter which works with every 3485 known free software printer spooler. 3486 3487 This page describes the facilities of foomatic-rip when used as 3488 a CUPS filter and when used outside of a print system. While 3489 implementations of foomatic-rip may support other print 3490 systems, such use is not documented here. 3491 3492 When run as a CUPS filter, foomatic-rip reads the job from the 3493 specified file, or from standard input if no file is specified. 3494 It renders the file into a printer-specific format, and writes 3495 the result to standard output. 3496 3497 When run standalone, foomatic-rip will read the job from the 3498 specified files, or from standard input if no files are given. 3499 The files are rendered into a printer-specific format, which is 3500 then output according to the PPD option "FoomaticRIPPostPipe", 3501 documented in the LSB. 3502 3503 Printer capabilities are described to foomatic-rip via PPD 3504 files, as described (with extensions used by foomatic-rip) in 3505 the LSB. The method foomatic-rip uses to determine the proper 3506 PPD file for the printer in question is defined by the 3507 implementation of both the spooler and foomatic-rip. 3508 3509 CUPS OPTIONS 3510 3511 Unless otherwise noted, all parameters are required when 3512 running foomatic-rip as a CUPS filter. 3513 3514 jobid 3515 3516 The internal Job ID from CUPS. 3517 username 3518 3519 The username of the user who submitted the job. 3520 jobtitle 3521 3522 The job's title, as submitted by the user. 3523 numcopies 3524 3525 The number of copies of the job requested. 3526 options 3527 3528 A series of printer options, separated by spaces, each of which 3529 take the form name or name=value. The specific list of options 3530 supported is dependent on the printer and spooler, and is 3531 usually documented in the PPD file for the printer. 3532 3533 An option may be preceded by a page specification, describing 3534 the pages to which the option should apply. A page 3535 specification consists of one or more items, separated by 3536 commas, and separated from the option name by a colon. Valid 3537 items include the words "even" and "odd", a single page number, 3538 and a page range. Page ranges are described with a starting 3539 page, a dash ("-"), and an ending page. If omitted, the 3540 starting and ending pages are the first and last page, 3541 respectively, but only one of the ends of the range may be 3542 omitted. 3543 file 3544 3545 The full path to the file containing the job. This parameter is 3546 optional; if it is not supplied, the job is read from standard 3547 input. 3548 3549 SPOOLER-LESS OPTIONS 3550 3551 -v 3552 3553 Verbose mode. Intended for debugging and testing purposes only. 3554 -q 3555 3556 Quiet mode - minimal information output. 3557 -d 3558 3559 Identical to the 'opts' option, but option information is left 3560 in text format. The PPD file will need to be specified using 3561 the --ppd option. 3562 --ppd ppdfile 3563 3564 The PPD file ppdfile should be applied for processing this job. 3565 -J jobtitle 3566 3567 Print the given job title in the header of every page of a 3568 plain text job. 3569 -o option=value 3570 3571 Set an option setting for this job. 3572 3573 EXIT STATUS 3574 3575 foomatic-rip returns 0 unless something unexpected happens. 3576 3577 AUTHOR 3578 3579 Till Kamppeter with parts of Manfred 3580 Wassmanns's man pages for the 3581 Foomatic 2.0.x filters. 3582 3583 Jeff Licquia adapted the 3584 original man page for the LSB. 3585 3586 GS 3587 3588 Name 3589 3590 gs -- GhostScript (PostScript and PDF language interpreter) 3591 3592 SYNOPSIS 3593 3594 gs -h | --help 3595 3596 gs [ options ] ps-file [ [ options ] ps-file2 ] ... 3597 3598 DESCRIPTION 3599 3600 The gs command invokes Ghostscript, an interpreter of Adobe 3601 Systems' PostScript(tm) and Portable Document Format (PDF) 3602 languages. gs reads the files named by ps-file in sequence and 3603 executes them as Ghostscript programs. After doing this, it 3604 reads further input from the standard input stream (normally 3605 the keyboard), interpreting each line separately. The 3606 interpreter exits gracefully when it encounters the "quit" 3607 command (either in a file or from the keyboard), at 3608 end-of-file, or at an interrupt signal (such as Control-C at 3609 the keyboard). 3610 3611 Some of GhostScript's options are set via command-line options; 3612 others are set as processing parameters, each of which consists 3613 of a name and a value. 3614 3615 OPTIONS 3616 3617 -h --help 3618 3619 Show GhostScript's help, as well as lists of the supported 3620 input formats, supported devices, and the search path for gs 3621 components. 3622 -q 3623 3624 Suppress normal startup messages, and also set the processing 3625 parameter QUIET. 3626 -c 3627 3628 Begin interpreting arguments as PostScript code. All following 3629 arguments are sent to the interpreter up to the next argument 3630 beginning with "-" followed by a non-digit, or with "@". This 3631 code is interpolated with the file list, so files specified 3632 before -c are interpreted beforehand, and files after -c are 3633 interpreted afterwards. 3634 -f 3635 3636 Specifies a PostScript file to run as its argument. This is 3637 equivalent to the ps-file arguments, but is useful for 3638 terminating PostScript code as passed via -c. 3639 -d -D 3640 3641 Set a processing parameter. The "name=value" pair follows 3642 immediately after the option, as in "-Dfoo=bar". The values 3643 here must be integers or the values "true" or "false". The 3644 equals sign and value may be omitted; this is assumed to set 3645 the name to "true". 3646 -s -S 3647 3648 Set a processing parameter to a string value. The "name=value" 3649 pair follows immediately after the option, as in "-Sfoo=bar". 3650 -u 3651 3652 Unset a processing parameter. The name to be unset follows 3653 immediately after the option, as in "-ufoo". 3654 -o 3655 3656 Write rendered output to the named file, and also inhibit 3657 pauses and the interactive shell. This is equivalent to setting 3658 the processing parameters BATCH and NOPAUSE to true, and 3659 OutputFile to the parameter after -o. 3660 -r 3661 3662 Set the device resolution. The resolution is specified as two 3663 numbers separated with an "x", as in "300x150", corresponding 3664 to the X and Y axis resolutions, respectively. If a single 3665 number is given without an "x", it is treated as the value for 3666 both resolutions. 3667 3668 This is equivalent to setting DEVICEXRESOLUTION and 3669 DEVICEYRESOLUTION in systemdict. 3670 -g 3671 3672 Set the device size, in pixels. The size is specified as two 3673 numbers separated with an "x", as in "640x480", corresponding 3674 to the width and height, respectively. 3675 3676 This is equivalent to setting DEVICEWIDTH and DEVICEHEIGHT in 3677 systemdict. 3678 3679 RECOGNIZED PROCESSING PARAMETERS 3680 3681 Processing parameters may have arbitrary names; no limits are 3682 placed on the settings that may be made. However, certain 3683 settings have meaning to the gs interpreter, and drivers may 3684 use other settings. Below is a list of recognized settings that 3685 the gs interpreter must respect. 3686 3687 BATCH 3688 3689 If set to true, do not enter an interactive shell after 3690 processing all command-line files. 3691 DEVICE 3692 3693 Contains the name of the device used to render the page, as a 3694 string. 3695 3696 The list of available devices can be discovered with the -h 3697 parameter, as described above. At least the following devices 3698 must be present: cups (CUPS Raster), ijs, pxlmono, pxlcolor, 3699 and opvp (OpenPrinting Vector). 3700 DEVICEHEIGHT 3701 3702 Contains the height, in pixels, of the output device. 3703 3704 The effect of this setting when the current driver is a vector 3705 driver is undefined. 3706 DEVICEHEIGHTPOINTS 3707 3708 Sets the initial page height, in units of 1/72 of an inch. 3709 DEVICEWIDTH 3710 3711 Contains the width, in pixels, of the output device. 3712 3713 The effect of this setting when the current driver is a vector 3714 driver is undefined. 3715 DEVICEWIDTHPOINTS 3716 3717 Sets the initial page width, in units of 1/72 of an inch. 3718 DEVICEXRESOLUTION 3719 3720 Contains the resolution, in pixels per inch, of the X dimension 3721 (horizontal) of the output device. 3722 DEVICEYRESOLUTION 3723 3724 Contains the resolution, in pixels per inch, of the Y dimension 3725 (vertical) of the output device. 3726 NOPAUSE 3727 3728 If set to true, disable the prompt and pause normally displayed 3729 after rendering a page. 3730 OutputFile 3731 3732 Contains the path to the file to which gs should write its 3733 output, as a string. This parameter may be set to '-', in which 3734 case gs's output is sent to standard output. 3735 PAPERSIZE 3736 3737 Contains the string representation of the paper size. The ISO 3738 paper sizes a0-a10 (plus a4small), isob0-isob6, and c0-c6 are 3739 recognized, as are jisb0-jisb6 (JIS standard sizes) and the US 3740 paper sizes 11x17, ledger, legal, letter, lettersmall, and 3741 archA-archE. 3742 QUIET 3743 3744 If set to true, suppress routine information comments on 3745 standard output. 3746 SAFER 3747 3748 If set to true, disable several unsafe PostScript features: the 3749 deletefile and renamefile operators, piped commands, reading or 3750 writing to general files, and changing of certain system 3751 settings. 3752 STRICT 3753 3754 If set to true, disable as many extensions to the Adobe 3755 PostScript specification as possible. 3756 3757 EXIT STATUS 3758 3759 gs returns 0 on successful execution. Any other return value 3760 indicates an error. 3761 3762 AUTHOR 3763 3764 Jeff Licquia (licquia@linux-foundation.org) wrote this man page 3765 for the LSB specification. 3766 3767 Portions of this page were taken from the GhostScript 3768 documentation. The maintainer and rights holder for GhostScript 3769 is Artifex Software, Inc. 3770 3771 IV. Execution Environment 3772 3773 Table of Contents 3774 9. File System Hierarchy 3775 __________________________________________________________ 3776 3777 Chapter 9. File System Hierarchy 3778 3779 In addition to the requirements for /usr/share in the 3780 Filesystem Hierarchy Standard, an LSB conforming system shall 3781 also provide the following directories or symbolic links to 3782 directories: 3783 3784 /usr/share/ppd 3785 3786 ppd files