CUPS Interface Design Description

CUPS Interface Design Description


CUPS-IDD-1.1
Easy Software Products
Copyright 1997-2005, All Rights Reserved

Table of Contents



1 Scope 2 References 3 Internal Interfaces 4 External Interfaces 5 Directories

A Glossary

1 Scope

1.1 Identification

This interface design description document provides detailed file formats, message formats, and program conventions for the Common UNIX Printing System ("CUPS") Version 1.1.

1.2 System Overview

CUPS provides a portable printing layer for UNIX®-based 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 ("IPP") as the basis for managing print jobs and queues. The Line Printer Daemon ("LPD") Server Message Block ("SMB"), and AppSocket (a.k.a. JetDirect) protocols are also supported with reduced functionality. CUPS adds network printer browsing and PostScript Printer Description ("PPD") based printing options to support real-world printing under UNIX.

CUPS includes an image file RIP that supports printing of image files to non-PostScript printers. A customized version of GNU Ghostscript 7.05 for CUPS called ESP Ghostscript is available separately to support printing of PostScript files within the CUPS driver framework. Sample drivers for Dymo, EPSON, HP, and OKIDATA printers are included that use these filters.

Drivers for thousands of printers are provided with our ESP Print Pro software, available at:

    http://www.easysw.com/printpro/

CUPS is licensed under the GNU General Public License and GNU Library General Public License. Please contact Easy Software Products for commercial support and "binary distribution" rights.

1.3 Document Overview

This interface design description document is organized into the following sections:

2 References

2.1 CUPS Documentation

The following CUPS documentation is referenced by this document:

2.2 Other Documents

The following non-CUPS documents are referenced by this document:

3 Internal Interfaces

3.1 Character Set Files

The character set files define a mapping between 8-bit characters and the Unicode character set, or between Unicode and printer fonts. They are named using the IETF charset names defined in RFCnnnn. These files are ASCII text, the content of which is described below. Comments can be included by using the # character in the first column of a line.

3.1.1 8-Bit Character Set Files

8-bit character set files start with a line reading:

Following this are lines that define the font information:

First and last are the first and last glyphs in the font mapping that correspond to that font; a maximum of 256 characters can be mapped within each group, with a maximum of 256 mappings (this is a PostScript limitation.) The glyph values are hexadecimal.

Direction is the string "ltor", "rtol", or "rtola" indicating left-to-right, right-to-left, or right-to-left Arabic text.

Width is the string "single" or "double"; double means that the glyphs are twice as wide as ASCII characters in the Courier typeface.

Normal, bold, italic, and bold-italic are the typefaces to use for each presentation. If characters are only available in a single style then only one typeface should be listed (e.g. "Symbol".) Each font that is listed will be used (and downloaded if needed) when printing.

The remaining lines define a character to Unicode glyph mapping for the character set. The character and glyph values are hexadecimal:

3.1.2 Unicode Character Set Files

Unicode character set files start with a line reading:

Encoding is the encoding to use for the text; currently only the string "utf8" is supported.

Following this are lines defining the font information:

First and last are the first and last glyphs in the font mapping that correspond to that font; a maximum of 256 characters can be mapped within each group, with a maximum of 256 mappings (this is a PostScript limitation.) The glyph values are hexadecimal.

Direction is the string "ltor", "rtol", or "rtola" indicating left-to-right, right-to-left, or right-to-left Arabic text.

Width is the string "single" or "double"; double means that the glyphs are twice as wide as ASCII characters in the Courier typeface.

Normal, bold, italic, and bold-italic are the typefaces to use for each presentation. If characters are only available in a single style then only one typeface should be listed (e.g. "Symbol".) Each font that is listed will be used (and downloaded if needed) when printing.

3.2 Language Files

The 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.

3.3 MIME Files

CUPS uses two MIME files in its standard configuration.

3.3.1 mime.types

The 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:

The int and short rules match look for integers in network byte order (a.k.a. big-endian) with the most-significant byte first.

3.3.2 mime.convs

The 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:

3.4 Option Files

CUPS maintains user-defined printer and option files for each printer and user on the system. The printers and options defined in the system option file (/etc/cups/lpoptions) are loaded first, followed by the user option file ($HOME/.lpoptions). Options in the user file replace those defined in the system file for the same destination. Each line in the files can be one of the following:

The line beginning with "Default" indicates the default destination for print jobs; a default line in the user option file overrides the default defined in the system option file.

Name is the name of a printer known to the local server.

Instance can be any string of letters, numbers, and the underscore up to 127 characters in length.

The remainder of the line contains a list of space-separated options and their values.

3.5 PostScript Printer Description Files

PostScript Printer Description ("PPD") files describe the capabilities of each printer and are used by CUPS to support printer-specific features and intelligent filtering.

3.5.1 PPD Specification

The PPD file format is described in Adobe TechNote #5003: PostScript Printer Description File Format Specification Version 4.3.

3.5.2 CUPS Extensions to PPD Files

CUPS adds several new attributes that are described below.

3.5.2.1 cupsFax

This optional boolean attributes specifies whether the printer should be treated as a facsimile device, where failed jobs should be retried according to the FaxRetryInterval and FaxRetryLimit directives in the cupsd.conf file.

3.5.2.2 cupsFilter

This optional string attribute provides a conversion rule of the form:

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.5.2.3 cupsFlipDuplex

This optional boolean attribute notifies the RIP filters that the destination printer requires an upside-down image for the back page. The default value is false.

3.5.2.4 cupsManualCopies

This optional boolean attribute notifies the RIP filters that the destination printer does not support copy generation in hardware. The default value is false.

3.5.2.5 cupsModelNumber

This optional 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.5.2.6 cupsProfile

This optional string attribute specifies a color profile of the form:

The resolution and type values may be "-" to act as a wildcard. Otherwise they must match one of the Resolution or MediaType attributes defined in the PPD file.

The density and gamma values define gamma and density adjustment function such that:

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.5.2.7 cupsProtocol

This optional attribute describes which binary communication protocol to use when printing binary PostScript data. The strings "None", "BCP", and "TBCP" are recognized, corresponding to no encoding, BCP, and TBCP respectively.

3.5.2.8 cupsVersion

This required attribute describes which version of the CUPS IDD was used for the PPD file extensions. Currently it must be the string "1.0" or "1.1".

3.6 Scheduler Configuration Files

The scheduler reads three configuration files that define the available printers, classes, and services:

classes.conf
This file defines all of the printer classes known to the system.
cupsd.conf
This file defines the files, directories, passwords, etc. used by the scheduler.
printers.conf
This file defines all of the printers known to the system.

3.6.1 classes.conf

The 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:

DirectiveDescription
<Class name>
</Class>
Surrounds a class definition.
<DefaultClass name>
</Class>
Surrounds a class definition for the default destination.
AcceptingSpecifies whether the class is accepting new jobs. May be the names "Yes" or "No".
AllowUsersSpecifies a list of users that are allowed to access the class.
BannerStartSpecifies the banner that is printed before other files in a job.
BannerEndSpecifies the banner that is printed after other files in a job.
DenyUsersSpecifies a list of users that are not allowed to access the class.
InfoA textual description of the class.
LocationA textual location of the class.
PrinterSpecifies a printer that is a member of the class.
StateSpecifies the initial state of the class; can be "Idle" or "Stopped".
StateMessageSpecifies a textual message for the current class state.

3.6.2 cupsd.conf

The 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:

DirectiveDefaultDescription
AccessLogaccess_logSpecifies the location of the access log file. The special name "syslog" can be used to send access log information to the system log.
Allow-Allows connections from the specified host, network, or domain.
AuthClass-Specifies what level of authentication is required; may be "User", "System", or "Group".
AuthTypeNoneSpecifies the type of authentication to perform; may be "None", "Basic", or "Digest".
BrowseAddress255.255.255.255Specifies a broadcast address to send CUPS browsing packets to.
BrowseAllow-Specifies hosts or addresses from which browsing information should be used.
BrowseDeny-Specifies hosts or addresses from which browsing information should not be used.
BrowseInterval30Specifies the number of seconds between browsing updates. A browse interval of 0 seconds disables outgoing packets.
BrowseOrderAllow,DenySpecifies the order of BrowseAllow and BrowseDeny directive processing; can be "Deny,Allow" to implicitly deny hosts unless they are allowed by a BrowseAllow line, or "Allow,Deny" to implicitly allow hosts unless they are denied by a BrowseDeny line.
BrowsePoll-Specifies a server to poll for available printers and classes.
BrowsePort631Specifies the UDP port number to use for browse packets.
BrowseRelay-Specifies a source and destination address for relaying browser information from one subnet to another.
BrowseShortNamesyesSpecifies whether or not to provide short names (without the "@server" part) for remote printers.
BrowseTimeout300Specifies the number of seconds to wait until remote destinations are removed from the local destination list.
BrowsingOnSpecifies whether or not printer and class browsing is enabled; can be "On" or "Off".
DataDir/usr/share/cupsSpecifies the directory where CUPS data files are stored.
DefaultCharsetiso-8859-1Specifies the default character set.
DefaultLanguagecurrent localeSpecifies the default language.
Deny-Refuses connections from the specified host, network, or domain.
DocumentRoot/usr/share/doc/cupsSpecifies the document data root directory.
ErrorLogerror_logSpecifies the error log file location. The special name "syslog" can be used to send error log information to the system log.
Grouproot, sys, systemSpecifies the group name or ID that is used when running external programs.
HostNameLookupsOffSpecifies whether or not to perform reverse IP address lookups to get the actual hostname; may be "On" or "Off". Hostname lookups can significantly degrade the performance of the CUPS server if one or more DNS servers is not functioning properly.
ImplicitClassesOnSpecifies whether or not to automatically create printer classes when more than one printer or class of the same name is detected on the network; may be "On" or "Off".
KeepAliveOnSpecifies whether or not to use the HTTP Keep-Alive feature; may be "On" or "Off".
KeepAliveTimeout30Specifies the amount of time to keep the HTTP connection alive before closing it.
<Location path>
</Location>
-Specifies a location to restrict access to.
LogLevelinfoControls the amount of information that is logged in the error log file. Can be one of "debug", "info", "warn", "error", or "none", in decreasing order or verbosity.
MaxClients100Specifies the maximum number of simultaneous active clients. This value is internally limited to 1/3 of the total number of available file descriptors.
MaxLogSize0Specifies the maximum size of the access, error, and page log files in bytes. If set to 0 then no maximum size is set. Log files are rotated automatically when this size is exceeded.
MaxRequestSize0Specifies the maximum size of HTTP requests in bytes. If set to 0 then there is no maximum.
OrderAllow,DenySpecifies the order of Allow and Deny directive processing; can be "Deny,Allow" to implicitly deny hosts unless they are allowed by an Allow line, or "Allow,Deny" to implicitly allow hosts unless they are denied by a Deny line.
PageLogpage_logSpecifies the location of the page log file. The special name "syslog" can be used to send page log information to the system log.
Port631Specifies a port number to listen to for HTTP connections.
Printcap/etc/printcapSpecifies the location of a Berkeley printcap file to update with a list of current printers and classes. If no filename is supplied then this automatic generation is disabled.
RequestRoot/var/spool/cupsSpecifies the location of request files.
RIPCache8mSpecifies the size of the memory cache in bytes that is used by RIP filters.
ServerAdminroot@ServerNameSpecifies the person to contact with problems.
ServerNamehostnameSpecifies the hostname that is supplied to HTTP clients. This is also used to determine the default CUPS server for the CUPS IPP client applications.
ServerRoot/etc/cupsSpecifies the root directory for server configuration files.
SystemGrouproot, sys, systemSpecifies the group name used for System class authentication.
TempDir/var/tmpSpecifies the temporary directory to use.
Timeout300The timeout in seconds before client connections are closed in the middle of a request.
UserlpSpecifies the user that is used when running external programs.

3.6.3 printers.conf

The 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:

DirectiveDescription
AcceptingSpecifies whether the printer is accepting new jobs. May be the names "Yes" or "No".
<DefaultPrinter name>
</Printer>
Surrounds the printer definition for a default destination.
AllowUsersSpecifies a list of users that are allowed to access the printer.
BannerStartSpecifies the banner that is printed before other files in a job.
BannerEndSpecifies the banner that is printed after other files in a job.
DenyUsersSpecifies a list of users that are not allowed to access the printer.
DeviceURISpecifies the device-uri attribute for the printer.
InfoA textual description of the printer.
LocationA textual location of the printer.
<Printer name>
</Printer>
Surrounds the printer definition.
StateSpecifies the initial state of the printer; can be "Idle" or "Stopped".
StateMessageSpecifies a textual message for the current printer state.

4 External Interfaces

4.1 AppSocket Protocol

The AppSocket protocol is an 8-bit clean TCP/IP socket connection. The default IP service port is 9100. The URI method name is "socket".

The AppSocket protocol is used by the Hewlett Packard JetDirect network interfaces and print servers, as well as many other vendors' products. See the CUPS Software Administrators Manual for a list of supported products.

4.2 CUPS Browsing Protocol

The 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:

State, uri, location, info, and make-and-model, correspond to the IPP printer-state, printer-uri-supported, printer-location, printer-info, and printer-make-and-model attributes.

Type is a hexadecimal number string representing capability/type bits:

BitDescription
00 = printer
1 = class
10 = local
1 = remote
(always 1)
21 = can print B&W
31 = can print color
41 = can duplex
51 = can staple
61 = can do fast copies
71 = can do fast collating
81 = can punch holes
91 = can cover
101 = can bind
111 = can sort
121 = can print up to 9x14 inches
131 = can print up to 18x24 inches
141 = can print up to 36x48 inches
151 = can print variable sizes
161 = is an implicit class (bit 1 must be 0)
171 = is the default printer on the network
181 = is a fax device
191 = printer is rejecting new jobs

4.3 CUPS Form File

CUPS Form files are XML files used by the CUPS formtops filter to produce dynamic banner pages and support preprinted forms.

The MIME type for CUPS Form files is application/vnd.cups-form .

4.3.1 CUPS Form DTD

The following DTD describes the available elements and attributes in a CUPS Form file:

<!ENTITY % Angle "CDATA" -- angle in degrees -->

<!ENTITY % Color "CDATA" -- a color using sRGB: #RRGGBB as Hex values -->

<!ENTITY % Length "CDATA" -- nn for pixels or nn% for percentage length -->

<!ENTITY % Lengths "CDATA" -- comma-separated Length values -->

<!ENTITY % Text "CDATA">

<!ENTITY % heading "H1|H2|H3|H4|H5|H6">

<!ENTITY % preformatted "PRE">

<!ENTITY % i18n
 "lang        %LanguageCode; #IMPLIED  -- language code --
  dir         (ltr|rtl)      #IMPLIED  -- direction for weak/neutral text --"
  >

<!ENTITY % attrs "%i18n;">

<!ENTITY % fontstyle
 "B | FONT | I | TT">

<!ENTITY % graphics
 "BOX | RECT | LINE | POLY | ARC | PIE | TEXT">

<!ENTITY % insert
 "IMG | VAR">

<!-- %inline; covers inline or "text-level" elements -->
<!ENTITY % inline "#PCDATA | %fontstyle; | %graphics; | %insert;">

<!ELEMENT (%fontstyle;) - - (%inline;)*>
<!ATTLIST (%fontstyle;)
  %attrs;                              -- %i18n --
  >

<!ELEMENT BR - O EMPTY                 -- forced line break -->
<!ATTLIST BR
  %attrs;                              -- %i18n --
  >

<!ENTITY % block
     "P | %heading; | %preformatted;">

<!ENTITY % flow "%block; | %inline;">

<!ELEMENT PAGE O O (%flow;)+           -- document body -->
<!ATTLIST PAGE
  %attrs;                              -- %i18n --
  align       (left|center|right) #IMPLIED -- horizontal alignment --
  valign      (top|middle|center|bottom) #IMPLIED -- vertical alignment --
  >

<!ELEMENT P - O (%inline;)*            -- paragraph -->
<!ATTLIST P
  %attrs;                              -- %i18n --
  align       (left|center|right) #IMPLIED -- horizontal alignment --
  >

<!ELEMENT (%heading;)  - - (%inline;)* -- heading -->
<!ATTLIST (%heading;)
  %attrs;                              -- %i18n --
  align       (left|center|right) #IMPLIED -- horizontal alignment --
  >

<!ELEMENT PRE - - (%inline;)*          -- preformatted text -->
<!ATTLIST PRE
  %attrs;                              -- %i18n --
  align       (left|center|right) #IMPLIED -- horizontal alignment --
  >

<!ELEMENT BOX - O EMPTY                -- unfilled box -->
<!ATTLIST BOX
  color       %Color;        #IMPLIED  -- override color --
  height      %Length;       #REQUIRED -- height of box --
  thickness   %Length;       #IMPLIED  -- override line thickness --
  width       %Length;       #REQUIRED -- width of box --
  x           %Length;       #REQUIRED -- horizontal position --
  y           %Length;       #REQUIRED -- vertical position --
  >

<!ELEMENT RECT - O EMPTY               -- filled box -->
<!ATTLIST RECT
  color       %Color;        #IMPLIED  -- override color --
  height      %Length;       #REQUIRED -- height of box --
  width       %Length;       #REQUIRED -- width of box --
  x           %Length;       #REQUIRED -- horizontal position --
  y           %Length;       #REQUIRED -- vertical position --
  >

<!ELEMENT LINE - O EMPTY               -- polyline -->
<!ATTLIST LINE
  color       %Color;        #IMPLIED  -- override color --
  thickness   %Length;       #IMPLIED  -- override line thickness --
  x           %Lengths;      #REQUIRED -- horizontal positions --
  y           %Lengths;      #REQUIRED -- vertical positions --
  >

<!ELEMENT POLY - O EMPTY               -- polygon (filled) -->
<!ATTLIST POLY
  color       %Color;        #IMPLIED  -- override color --
  x           %Lengths;      #REQUIRED -- horizontal positions --
  y           %Lengths;      #REQUIRED -- vertical positions --
  >

<!ELEMENT ARC - O EMPTY                -- unfilled arc -->
<!ATTLIST ARC
  color       %Color;        #IMPLIED  -- override color --
  end         %Angle;        #IMPLIED  -- override end angle --
  height      %Length;       #REQUIRED -- height of arc --
  start       %Angle;        #IMPLIED  -- override start angle --
  thickness   %Length;       #IMPLIED  -- override line thickness --
  width       %Length;       #REQUIRED -- width of arc --
  x           %Length;       #REQUIRED -- horizontal position --
  y           %Length;       #REQUIRED -- vertical position --
  >

<!ELEMENT PIE - O EMPTY                -- filled arc -->
<!ATTLIST PIE
  color       %Color;        #IMPLIED  -- override color --
  end         %Angle;        #IMPLIED  -- override end angle --
  height      %Length;       #REQUIRED -- height of arc --
  start       %Angle;        #IMPLIED  -- override start angle --
  width       %Length;       #REQUIRED -- width of arc --
  x           %Length;       #REQUIRED -- horizontal position --
  y           %Length;       #REQUIRED -- vertical position --
  >

<!ELEMENT TEXT - - (%flow;)*           -- text box -->
<!ATTLIST RECT
  align       (left|center|right) #IMPLIED -- horizontal alignment --
  height      %Length;       #REQUIRED -- height of box --
  valign      (top|middle|center|bottom) #IMPLIED -- vertical alignment --
  width       %Length;       #REQUIRED -- width of box --
  x           %Length;       #REQUIRED -- horizontal position --
  y           %Length;       #REQUIRED -- vertical position --
  >


<!ELEMENT IMG - O EMPTY                -- Embedded image -->
<!ATTLIST IMG
  %attrs;                              -- %coreattrs, %i18n, %events --
  src         %URI;          #REQUIRED -- URI of image to embed --
  height      %Length;       #IMPLIED  -- override height --
  width       %Length;       #IMPLIED  -- override width --
  >

<!ELEMENT HEAD O O (DEFVAR)*           -- document head -->
<!ATTLIST HEAD
  %i18n;                               -- lang, dir --
  >

<!ELEMENT DEFVAR - O EMPTY             -- variable definition -->
<!ATTLIST DEFVAR
  name        CDATA          #REQUIRED -- name
  value       CDATA          #REQUIRED -- value
  >


<!ENTITY % html.content "HEAD, PAGE">

<!ELEMENT CUPSFORM - - (HEAD) (PAGE)+  -- document root element -->
<!ATTLIST CUPSFORM
  %i18n;                               -- lang, dir --
  >

4.4 CUPS PostScript File

CUPS 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 application/vnd.cups-postscript.

4.5 CUPS Raster File

CUPS 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 Image 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.

BytesDescriptionValues
0-63MediaClassNul-terminated ASCII string
64-127MediaColorNul-terminated ASCII string
128-191MediaTypeNul-terminated ASCII string
192-255OutputTypeNul-terminated ASCII string
256-259AdvanceDistance0 to 232 - 1 points
260-263AdvanceMedia0 = Never advance roll
1 = Advance roll after file
2 = Advance roll after job
3 = Advance roll after set
4 = Advance roll after page
264-267Collate0 = do not collate copies
1 = collate copies
268-271CutMedia0 = Never cut media
1 = Cut roll after file
2 = Cut roll after job
3 = Cut roll after set
4 = Cut roll after page
272-275Duplex0 = Print single-sided
1 = Print double-sided
276-283HWResolutionHorizontal and vertical resolution in dots-per-inch.
284-299ImagingBoundingBoxFour integers giving the left, bottom, right, and top positions of the page bounding box in points
300-303InsertSheet0 = Do not insert separator sheets
1 = Insert separator sheets
304-307Jog0 = Do no jog pages
1 = Jog pages after file
2 = Jog pages after job
3 = Jog pages after set
308-311LeadingEdge0 = Top edge is first
1 = Right edge is first
2 = Bottom edge is first
3 = Left edge is first
312-319MarginsLeft and bottom origin of image in points
320-323ManualFeed0 = Do not manually feed media
1 = Manually feed media
324-327MediaPositionInput slot position from 0 to N
328-331MediaWeightMedia weight in grams per meter squared
332-335MirrorPrint0 = Do not mirror prints
1 = Mirror prints
336-339NegativePrint0 = Do not invert prints
1 = Invert prints
340-343NumCopies1 to 232 - 1
344-347Orientation0 = Do not rotate page
1 = Rotate page counter-clockwise
2 = Turn page upside down
3 = Rotate page clockwise
348-351OutputFaceUp0 = Output face down
1 = Output face up
352-359PageSizeWidth and length in points
360-363Separations0 = Print composite image
1 = Print color separations
364-367TraySwitch0 = Do not change trays if selected tray is empty
1 = Change trays if selected tray is empty
368-371Tumble0 = Do not rotate even pages when duplexing
1 = Rotate even pages when duplexing
372-375cupsWidthWidth of page image in pixels
376-379cupsHeightHeight of page image in pixels
380-383cupsMediaTypeDriver-specific 0 to 2 32 - 1
384-387cupsBitsPerColor1, 2, 4, 8 bits
388-391cupsBitsPerPixel1 to 32 bits
392-395cupsBytesPerLine1 to 232 - 1 bytes
396-399cupsColorOrder0 = chunky pixels (CMYK CMYK CMYK)
1 = banded pixels (CCC MMM YYY KKK)
2 = planar pixels (CCC... MMM... YYY... KKK...)
400-403cupsColorSpace0 = white
1 = RGB
2 = RGBA
3 = black
4 = CMY
5 = YMC
6 = CMYK
7 = YMCK
8 = KCMY
9 = KCMYcm
10 = GMCK
11 = GMCS
12 = WHITE
13 = GOLD
14 = SILVER
15 = CIE XYZ
16 = CIE Lab
32 = ICC1
33 = ICC2
34 = ICC3
35 = ICC4
36 = ICC5
37 = ICC6
38 = ICC7
39 = ICC8
40 = ICC9
41 = ICCA (10)
42 = ICCB (11)
43 = ICCC (12)
44 = ICCD (13)
45 = ICCE (14)
46 = ICCF (15)
404-407cupsCompressionDriver-specific 0 to 2 32 - 1
408-411cupsRowCountDriver-specific 0 to 2 32 - 1
412-415cupsRowFeedDriver-specific 0 to 2 32 - 1
416-419cupsRowStepDriver-specific 0 to 2 32 - 1

The MIME type for CUPS Raster files is application/vnd.cups-raster.

4.6 CUPS Raw Files

Raw 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 application/vnd.cups-raw.

4.7 Internet Printing Protocol

The Internet Printing Protocol and the CUPS extensions to it are described in the CUPS Implementation of IPP document.

4.8 Line Printer Daemon Protocol

The Line Printer Daemon (LPD) protocol is described by RFC 1179: Line Printer Daemon Protocol.

The URI method name for LPD is "lpd".

4.9 Server Message Block Protocol

The 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". Support for this protocol is provided via the SAMBA smbspool(1) program provided with SAMBA 2.0.6 and higher.

5 Directories

/etc/cups
The scheduler configuration and MIME files reside here.
/etc/cups/certs
The authentication certificates reside here.
/etc/cups/interfaces
System V interface scripts reside here.
/etc/cups/ppd
This directory contains PPD files for each printer.
/usr/bin
The cancel, lp, lpq, lpr, lprm, and lpstat commands reside here.
/usr/lib, /usr/lib32
The shared libraries (DSOs) reside here.
/usr/lib/cups/backend
The backend filters reside here.
/usr/lib/cups/cgi-bin
The CGI programs reside here.
/usr/lib/cups/daemon
The polling and LPD daemons reside here.
/usr/lib/cups/filter
The file filters reside here.
/usr/sbin
The accept, cupsd, lpadmin, lpc, and reject commands reside here.
/usr/share/cups
This is the root directory of the CUPS static data.
/usr/share/cups/charsets
The character set files reside here.
/usr/share/cups/data
The filter data files reside here.
/usr/share/cups/fonts
The pstoraster font files reside here.
/usr/share/cups/model
The sample PPD files reside here.
/usr/share/cups/pstoraster
The pstoraster data files reside here.
/usr/share/doc/cups
The scheduler documentation files reside here.
/var/log/cups
The access_log, error_log, and page_log files reside here.
/var/spool/cups
This directory contains print job files.

A Glossary

A.1 Terms

C
A computer language.
parallel
Sending or receiving data more than 1 bit at a time.
pipe
A one-way communications channel between two programs.
serial
Sending or receiving data 1 bit at a time.
socket
A two-way network communications channel.

A.2 Acronyms

ASCII
American Standard Code for Information Interchange
CUPS
Common UNIX Printing System
ESC/P
EPSON Standard Code for Printers
FTP
File Transfer Protocol
HP-GL
Hewlett-Packard Graphics Language
HP-PCL
Hewlett-Packard Page Control Language
HP-PJL
Hewlett-Packard Printer Job Language
IETF
Internet Engineering Task Force
IPP
Internet Printing Protocol
ISO
International Standards Organization
LPD
Line Printer Daemon
MIME
Multimedia Internet Mail Exchange
PPD
PostScript Printer Description
SMB
Server Message Block
TFTP
Trivial File Transfer Protocol