|
Table of Contents1 Scope 2 References 3 Internal Interfaces
A Glossary |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
1 Scope |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents Next |
1.1 IdentificationThis interface design description document provides detailed file formats, message formats, and program conventions for the Common UNIX Printing System ("CUPS") Version 1.0. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents Previous Next |
1.2 System OverviewThe Common UNIX Printing System provides a portable printing layer for UNIX® operating systems. It has been developed by Easy Software Products to promote a standard printing solution for all UNIX vendors and users. CUPS provides the System V and Berkeley command-line interfaces. CUPS uses the Internet Printing Protocol (IETF-IPP) as the basis for managing print jobs and queues. The Line Printer Daemon (LPD, RFC1179), Server Message Block (SMB), and AppSocket protocols are also supported with reduced functionality. CUPS adds network printer browsing and PostScript Printer Description ("PPD")-based printing options to support real world applications under UNIX. CUPS also includes a customized version of GNU GhostScript (currently based off GNU GhostScript 4.03) and an image file RIP that can be used to support non-PostScript printers. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents Previous Next |
1.3 Document OverviewThis interface design description document is organized into the following sections:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents Previous Next |
2 References |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents Previous Next |
2.1 CUPS DocumentationThe following CUPS documentation is referenced by this document:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents Previous Next |
2.2 Other DocumentsThe following non-CUPS documents are referenced by this document:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents Previous Next |
3 Internal Interfaces |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents Previous Next |
3.1 Character Set FilesThe character set files define a mapping between 8-bit characters and the Unicode character set. They are named using the ISO standard number defined for the character set. Each file consists of up to 256 lines of ASCII text. Each line consists of two hexadecimal numbers; the first number is the character number in the character set (0x00 to 0xff), and the second number is the Unicode character number (0x0000 to 0xffff). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents Previous Next |
3.2 Language FilesThe language files define the default character set and a collection of text messages in that language. They are named by prefixing the string "cups_" to the front of the language specifier (e.g. "cups_en", "cups_fr", etc.) Each file consists of two or more lines of ASCII text. The first line identifies the character set to be used for the messages. The currently recognized values are:
The second and succeeding lines define text messages. If the message text is preceded by a number, then the current message number is updated and the text after the number is used. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents Previous Next |
3.3 MIME FilesCUPS uses two MIME files in its standard configuration. 3.3.1 mime.typesThe mime.types file defines the recognized file types and consists of 1 or more lines of ASCII text. Comment lines start with the pound ("#") character. The backslash ("\") character can be used at the end of a line to continue that line to the next. Each non-blank line starts with a MIME type identifier ("super/type") as registered with the IANA. All text following the MIME type is treated as a series of type recognition rules: mime-type := super "/" type { SP rule }* super := { "a-z" | "A-Z" }* type := { "a-z" | "A-Z" | "-" | "." | "0-9" }* rule := { extension | match | operator | "(" rule ")" }* extension := { "a-z" | "A-Z" | "0-9" }* match := "match(" regexp ")" | "ascii(" offset "," length ")" | "printable(" offset "," length ")" | "string(" offset "," string ")" | "char(" offset "," value ")" | "short(" offset "," value ")" | "int(" offset "," value ")" | "locale(" string ")" operator := "+" | [ logical AND ] "," | SP [ logical OR ] "!" [ unary NOT ] The 3.3.2 mime.convsThe mime.types file defines the recognized file filters and consists of 1 or more lines of ASCII text. Comment lines start with the pound ("#") character. Each non-blank line starts with two MIME type identifiers ("super/type") representing the source and destination types. Following the MIME types are a cost value (0 to 100) and the filter program to use. If the filter program is not specified using the full path then it must reside in the CUPS filter directory. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents Previous Next |
3.4 PostScript Printer Description FilesThe PostScript Printer Description (PPD) file format is described in Adobe TechNote #5003: PostScript Printer Description File Format Specification Version 4.3. 3.4.1 CUPS Extensions to PPD FilesCUPS adds several new attributes that are described below. 3.4.1.1 cupsFilterThis string attribute provides a conversion rule of the form: source/type cost program The destination type is assumed to the printer's type. If a printer supports the source type directly the special filter program "-" may be specified. 3.4.1.2 cupsManualCopiesThis boolean attribute notifies the RIP filters that the destination printer does not support copy generation in hardware. The default value is false. 3.4.1.3 cupsModelNumberThis integer attribute specifies a printer-specific model number. This number can be used by a filter program to adjust the output for a specific model of printer. 3.4.1.4 cupsProfileThis string attribute specifies a color profile of the form: resolution/type density gamma m00 m01 m02 m10 m11 m12 m20 m21 m22 The resolution and type values may be "-" to act as a wildcard. Otherwise they must match
one of the The density and gamma values define gamma and density adjustment function such that: f(x) = density * xgamma The m00 through m22 values define a 3x3 transformation matrix for the CMY color values. The density function is applied after the CMY transformation. 3.4.1.5 cupsVersionThis required attribute describes which version of the CUPS IDD was used for the PPD file extensions. Currently it must be the string "1.0". |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents Previous Next |
3.5 Scheduler Configuration FilesThe scheduler reads three configuration files that define the available printers, classes, and services:
3.5.1 classes.confThe classes.conf file consists of 1 or more lines of ASCII text. Comment lines start with the pound ("#") character. Each non-blank line starts with the name of a configuration directive followed by its value. The following directives are understood:
3.5.2 cupsd.confThe cupsd.conf file consists of 1 or more lines of ASCII text. Comment lines start with the pound ("#") character. Each non-blank line starts with the name of a configuration directive followed by its value. The following directives are understood:
3.5.3 printers.confThe printers.conf file consists of 1 or more lines of ASCII text. Comment lines start with the pound ("#") character. Each non-blank line starts with the name of a configuration directive followed by its value. The following directives are understood:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents Previous Next |
4 External Interfaces |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents Previous Next |
4.1 AppSocket ProtocolThe AppSocket protocol is an 8-bit clean TCP/IP socket connection. The default IP service port is 9100. The URI method name is "socket". |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents Previous Next |
4.2 CUPS Browsing ProtocolThe CUPS Browsing Protocol is a UDP/IP-based broadcast service. By default this service operates on IP service port 631. Each broadcast packet describes the state of a single printer or class and is an ASCII text string of up to 1450 bytes ending with a newline (0x0a). The string is formatted as follows: type SP state SP uri NL The state and uri values correspond to the IPP The type value is a hexadecimal number string representing capability/type bits:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents Previous Next |
4.3 CUPS PostScript FileCUPS PostScript files are device-dependent Adobe PostScript program files. The PostScript language is described in the Adobe PostScript Language Reference Manual, Third Edition. The MIME type for CUPS PostScript files is |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents Previous Next |
4.4 CUPS Raster FileCUPS raster files are device-dependent raster image files that contain a PostScript page device dictionary and device-dependent raster imagery for each page in the document. These files are used to transfer raster data from the PostScript and image file RIPs to device-dependent filters that convert the raster data to a printable format. A raster file begins with a four byte synchronization word: 0x52615374 ("RaSt") for big-endian architectures and 0x74536152 ("tSaR") for little-endian architectures. The writer of the raster file will use the native word order, and the reader is responsible for detecting a reversed word order file and swapping bytes as needed. The CUPS Interface Library raster functions perform this function automatically. Following the synchronization word are a series of raster pages. Each page starts with a page device dictionary header and is followed immediately by the raster data for that page.
The MIME type for CUPS Raster files is |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents Previous Next |
4.5 CUPS Raw FilesRaw files are printer-dependent print files that are in a format
suitable to the destination printer (e.g. HP-PCL, HP-RTL, etc.) The
MIME type for CUPS Raw files is |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents Previous Next |
4.6 Internet Printing ProtocolThe Internet Printing Protocol is described by the following RFCs:
The URI method name for IPP is "ipp". CUPS defines the following extension operations to IPP. 4.6.1 Get Default Destination (CUPS_GET_DEFAULT = 0x4001)The get default destination operation returns the printer attributes
for the system default printer or class. The only required attributes
are Get default destination will only return 4.6.2 Get Printers (CUPS_GET_PRINTERS = 0x4002)The get printers operation returns the printer attributes for all
printers known to the system. The only required attributes are Get printers will only return 4.6.3 Add Printer (CUPS_ADD_PRINTER = 0x4003)The add printer operation adds or replaces the specified printer.
The The A PPD file or System V interface script may follow the IPP request body. If a valid interface script or PPD file is not provided then the printer is treated as a generic PostScript device. Add printer will return 4.6.4 Delete Printer (CUPS_DELETE_PRINTER = 0x4004)The delete printer operation removes the specified printer. The only
required attributes are Delete printer will return 4.6.5 Get Classes (CUPS_GET_CLASSES = 0x4005)The get classes operation returns the printer attributes for all
classes known to the system. The only required attributes are Get classes will only return 4.6.6 Add Class (CUPS_ADD_CLASS = 0x4006)The add class operation adds or replaces the specified class. The The Add class will return 4.6.7 Delete Class (CUPS_DELETE_CLASS = 0x4007)The delete class operation removes the specified class. The only
required attributes are Delete class will return 4.6.8 Accept Jobs (CUPS_ACCEPT_JOBS = 0x4008)The accept jobs operation allows jobs to be accepted by the
specified destination. The only required attributes are Accept jobs will return 4.6.9 Reject Jobs (CUPS_REJECT_JOBS = 0x4009)The reject jobs operation prevents jobs from being accepted by the
specified destination. The only required attributes are Reject jobs will return 4.6.10 Set Default Destination (CUPS_SET_DEFAULT = 0x400A)The set default destination operation returns the printer attributes
for the system default printer or class. The only required attributes
are Set default destination will return |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents Previous Next |
4.7 Line Printer Daemon ProtocolThe Line Printer Daemon (LPD) protocol is described by RFC 1179: Line Printer Daemon Protocol. The URI method name for LPD is "lpd". |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents Previous Next |
4.8 Server Message Block ProtocolThe Server Message Block (SMB) and related Common Internet File System (CIFS) protocols are described at http://anu.samba.org/cifs. The URI method name for SMB is "smb". |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents Previous Next |
5 5 - Directories
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents Previous Next |
A Glossary |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents Previous Next |
A.1 Terms
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents Previous Next |
A.2 Acronyms
|