3 <META NAME="COPYRIGHT" CONTENT="Copyright 1997-2003, All Rights Reserved">
4 <META NAME="DOCNUMBER" CONTENT="CUPS-IDD-1.2">
5 <META NAME="Author" CONTENT="Easy Software Products">
6 <TITLE>CUPS Interface Design Description</TITLE>
12 <H2>Identification</H2>
14 <P>This interface design description document provides detailed file
15 formats, message formats, and program conventions for the Common UNIX
16 Printing System ("CUPS") Version 1.2.
18 <EMBED SRC="system-overview.shtml">
20 <H2>Document Overview</H2>
22 <P>This interface design description document is organized into the following
28 <LI>3 - Internal Interfaces
29 <LI>4 - External Interfaces
34 <EMBED SRC="references.shtml">
36 <H1>Internal Interfaces</H1>
38 <H2>Character Set Files</H2>
40 <P>The character set files define a mapping between 8-bit characters
41 and the Unicode character set, or between Unicode and printer fonts.
42 They are named using the IETF charset names defined in RFCnnnn. These
43 files are ASCII text, the content of which is described below. Comments
44 can be included by using the <TT>#</TT> character in the first column
47 <H3>8-Bit Character Set Files</H3>
49 <P>8-bit character set files start with a line reading:
55 <P>Following this are lines that define the font information:
58 first last direction width normal bold italic bold-italic
61 <P><VAR>First</VAR> and <VAR>last</VAR> are the first and last glyphs
62 in the font mapping that correspond to that font; a maximum of 256
63 characters can be mapped within each group, with a maximum of 256
64 mappings (this is a PostScript limitation.) The glyph values are
67 <P><VAR>Direction</VAR> is the string "ltor", "rtol", or "rtola" indicating
68 left-to-right, right-to-left, or right-to-left Arabic text.
70 <P><VAR>Width</VAR> is the string "single" or "double"; double means that the
71 glyphs are twice as wide as ASCII characters in the Courier typeface.
73 <P><VAR>Normal, bold, italic</VAR>, and <VAR>bold-italic</VAR> are the
74 typefaces to use for each presentation. If characters are only available in
75 a single style then only one typeface should be listed (e.g. "Symbol".)
76 Each font that is listed will be used (and downloaded if needed) when
79 <P>The remaining lines define a character to Unicode glyph mapping for the
80 character set. The character and glyph values are hexadecimal:
86 <H3>Unicode Character Set Files</H3>
88 <P>Unicode character set files start with a line reading:
94 <P><VAR>Encoding</VAR> is the encoding to use for the text; currently only
95 the string "utf8" is supported.
97 <P>Following this are lines defining the font information:
100 first last direction width normal bold italic bold-italic
103 <P><VAR>First</VAR> and <VAR>last</VAR> are the first and last glyphs
104 in the font mapping that correspond to that font; a maximum of 256
105 characters can be mapped within each group, with a maximum of 256
106 mappings (this is a PostScript limitation.) The glyph values are
109 <P><VAR>Direction</VAR> is the string "ltor", "rtol", or "rtola" indicating
110 left-to-right, right-to-left, or right-to-left Arabic text.
112 <P><VAR>Width</VAR> is the string "single" or "double"; double means that the
113 glyphs are twice as wide as ASCII characters in the Courier typeface.
115 <P><VAR>Normal, bold, italic</VAR>, and <VAR>bold-italic</VAR> are the
116 typefaces to use for each presentation. If characters are only available in
117 a single style then only one typeface should be listed (e.g. "Symbol".)
118 Each font that is listed will be used (and downloaded if needed) when
121 <H2>Language Files</H2>
123 <P>The language files define the default character set and a collection of
124 text messages in that language. They are named by prefixing the string "cups_"
125 to the front of the language specifier (e.g. "cups_en", "cups_fr", etc.) Each
126 file consists of two or more lines of ASCII text.
128 <P>The first line identifies the character set to be used for the messages.
129 The currently recognized values are:
161 <P>The second and succeeding lines define text messages. If the message text
162 is preceded by a number, then the current message number is updated and the
163 text after the number is used.
167 <P>CUPS uses two MIME files in its standard configuration.
171 <P>The mime.types file defines the recognized file types and consists
172 of 1 or more lines of ASCII text. Comment lines start with the pound
173 ("#") character. The backslash ("\") character can be used at the end
174 of a line to continue that line to the next.
176 <P>Each non-blank line starts with a MIME type identifier ("super/type")
177 as registered with the IANA. All text following the MIME type is treated as
178 a series of type recognition rules:
181 mime-type := super "/" type { SP rule }*
182 super := { "a-z" | "A-Z" }*
183 type := { "a-z" | "A-Z" | "-" | "." | "0-9" }*
184 rule := { extension | match | operator | "(" rule ")" }*
185 extension := { "a-z" | "A-Z" | "0-9" }*
186 match := "match(" regexp ")" |
187 "ascii(" offset "," length ")" |
188 "printable(" offset "," length ")" |
189 "string(" offset "," string ")" |
190 "contains(" offset "," length "," string ")" |
191 "char(" offset "," value ")" |
192 "short(" offset "," value ")" |
193 "int(" offset "," value ")" |
195 operator := "+" | [ logical AND ]
196 "," | SP [ logical OR ]
200 <P>The <CODE>int</CODE> and <CODE>short</CODE> rules match look for integers
201 in network byte order (a.k.a. big-endian) with the most-significant byte first.
205 <P>The mime.types file defines the recognized file filters and consists
206 of 1 or more lines of ASCII text. Comment lines start with the pound
209 <P>Each non-blank line starts with two MIME type identifiers ("super/type")
210 representing the source and destination types. Following the MIME types are
211 a cost value (0 to 100) and the filter program to use. If the filter program
212 is not specified using the full path then it must reside in the CUPS filter
216 super/type SP super/type2 SP cost SP program
219 <H2>Option Files</H2>
221 <P>CUPS maintains user-defined printer and option files for each
222 printer and user on the system. The printers and options defined in the
223 system option file (<CODE>/etc/cups/lpoptions</CODE>) are loaded first,
224 followed by the user option file (<CODE>$HOME/.lpoptions</CODE>).
225 Options in the user file replace those defined in the system file for
226 the same destination. Each line in the files can be one of the
230 Dest name option=value option=value ... option=value
231 Dest name/instance option=value option=value ... option=value
232 Default name option=value option=value ... option=value
233 Default name/instance option=value option=value ... option=value
236 <P>The line beginning with "Default" indicates the default destination for
237 print jobs; a default line in the user option file overrides the default
238 defined in the system option file.
240 <P><VAR>Name</VAR> is the name of a printer known to the local server.
242 <P><VAR>Instance</VAR> can be any string of letters, numbers, and the underscore
243 up to 127 characters in length.
245 <P>The remainder of the line contains a list of space-separated options
248 <H2>PostScript Printer Description Files</H2>
250 <P>PostScript Printer Description ("PPD") files describe the capabilities
251 of each printer and are used by CUPS to support printer-specific features
252 and intelligent filtering.
254 <H3>PPD Specification</H3>
256 <P>The PPD file format is described in
257 <A HREF="http://partners.adobe.com/asn/developer/PDFS/TN/5003.PPD_Spec_v4.3.pdf">
258 Adobe TechNote #5003: PostScript Printer Description File Format
259 Specification Version 4.3</A>.
261 <H3>CUPS Extensions to PPD Files</H3>
263 <P>CUPS adds several new attributes that are described below.
267 <P>This string attribute provides a conversion rule of the form:
270 source/type cost program
273 <P>The destination type is assumed to the printer's type. If a printer
274 supports the source type directly the special filter program "-" may be
277 <H4>cupsFlipDuplex</H4>
279 <P>This boolean attribute notifies the RIP filters that the
280 destination printer requires an upside-down image for the back
281 page. The default value is false.
283 <H4>cupsManualCopies</H4>
285 <P>This boolean attribute notifies the RIP filters that the destination printer
286 does not support copy generation in hardware. The default value is false.
288 <H4>cupsModelNumber</H4>
290 <P>This integer attribute specifies a printer-specific model number. This number
291 can be used by a filter program to adjust the output for a specific model of
296 <P>This string attribute specifies a color profile of the form:
299 resolution/type density gamma m00 m01 m02 m10 m11 m12 m20 m21 m22
302 <P>The <I>resolution</I> and <I>type</I> values may be "-" to act as a
303 wildcard. Otherwise they must match one of the <CODE>Resolution</CODE> or
304 <CODE>MediaType</CODE> attributes defined in the PPD file.
306 <P>The <I>density</I> and <I>gamma</I> values define gamma and density
307 adjustment function such that:
310 f(x) = density * x<SUP>gamma</SUP>
313 <P>The <I>m00</I> through <I>m22</I> values define a 3x3 transformation
314 matrix for the CMY color values. The density function is applied <I>after</I>
315 the CMY transformation.
317 <H4>cupsProtocol</H4>
319 <P>This optional attribute describes which binary communication
320 protocol to use when printing binary PostScript data. The
321 strings "None", "BCP", and "TBCP" are recognized, corresponding
322 to no encoding, BCP, and TBCP respectively.
326 <P>This required attribute describes which version of the CUPS
327 IDD was used for the PPD file extensions. Currently it must be
328 the string "1.0", "1.1", or "1.2".
330 <H2>Scheduler Configuration Files</H2>
332 <P>The scheduler reads three configuration files that define the available
333 printers, classes, and services:
338 <DD>This file defines all of the printer classes known to the
342 <DD>This file defines the files, directories, passwords, etc.
343 used by the scheduler.
346 <DD>This file defines all of the printers known to the system.
350 <H3>classes.conf</H3>
352 <P>The classes.conf file consists of 1 or more lines of ASCII text.
353 Comment lines start with the pound ("#") character.
355 <P>Each non-blank line starts with the name of a configuration directive
356 followed by its value. The following directives are understood:
358 <CENTER><TABLE WIDTH="90%" BORDER="1">
360 <TH WIDTH="25%">Directive</TH>
364 <TD><Class name><BR>
366 <TD>Surrounds a class definition.</TD>
369 <TD><DefaultClass name><BR>
371 <TD>Surrounds a class definition for the default destination.</TD>
375 <TD>Specifies whether the class is accepting new jobs. May be
376 the names "Yes" or "No".</TD>
380 <TD>Specifies a list of users that are allowed to access the class.</TD>
384 <TD>Specifies the banner that is printed before other files in a
389 <TD>Specifies the banner that is printed after other files in a
394 <TD>Specifies a list of users that are not allowed to access the
399 <TD>A textual description of the class.</TD>
403 <TD>A textual location of the class.</TD>
407 <TD>Specifies a printer that is a member of the class.</TD>
411 <TD>Specifies the initial state of the class; can be "Idle" or
415 <TD>StateMessage</TD>
416 <TD>Specifies a textual message for the current class state.</TD>
422 <P>The cupsd.conf file consists of 1 or more lines of ASCII text.
423 Comment lines start with the pound ("#") character.
425 <P>Each non-blank line starts with the name of a configuration directive
426 followed by its value. The following directives are understood:
428 <CENTER><TABLE WIDTH="90%" BORDER="1">
430 <TH WIDTH="25%">Directive</TH>
437 <TD>Specifies the location of the access log file. The special name
438 "syslog" can be used to send access log information to the system
444 <TD>Allows connections from the specified host, network, or
450 <TD>Specifies what level of authentication is required; may be
451 "User", "System", or "Group".</TD>
456 <TD>Specifies the type of authentication to perform; may be
457 "None", "Basic", or "Digest".</TD>
460 <TD>BrowseAddress</TD>
461 <TD>255.255.255.255</TD>
462 <TD>Specifies a broadcast address to send CUPS browsing packets to.</TD>
467 <TD>Specifies hosts or addresses from which browsing information
473 <TD>Specifies hosts or addresses from which browsing information
474 should not be used.</TD>
477 <TD>BrowseInterval</TD>
479 <TD>Specifies the number of seconds between browsing updates. A
480 browse interval of 0 seconds disables outgoing packets.</TD>
485 <TD>Specifies the order of BrowseAllow and BrowseDeny directive
486 processing; can be "Deny,Allow" to implicitly deny hosts unless
487 they are allowed by a BrowseAllow line, or "Allow,Deny" to
488 implicitly allow hosts unless they are denied by a BrowseDeny
494 <TD>Specifies a server to poll for available printers and classes.</TD>
499 <TD>Specifies the UDP port number to use for browse packets.</TD>
504 <TD>Specifies a source and destination address for relaying browser
505 information from one subnet to another.</TD>
508 <TD>BrowseShortNames</TD>
510 <TD>Specifies whether or not to provide short names (without the
511 "@server" part) for remote printers.</TD>
514 <TD>BrowseTimeout</TD>
516 <TD>Specifies the number of seconds to wait until remote destinations
517 are removed from the local destination list.</TD>
522 <TD>Specifies whether or not printer and class browsing is enabled; can
523 be "On" or "Off".</TD>
527 <TD>/usr/share/cups</TD>
528 <TD>Specifies the directory where CUPS data files are stored.</TD>
531 <TD>DefaultCharset</TD>
533 <TD>Specifies the default character set.</TD>
536 <TD>DefaultLanguage</TD>
537 <TD>current locale</TD>
538 <TD>Specifies the default language.</TD>
543 <TD>Refuses connections from the specified host, network, or
547 <TD>DocumentRoot</TD>
548 <TD>/usr/share/doc/cups</TD>
549 <TD>Specifies the document data root directory.</TD>
554 <TD>Specifies the error log file location. The special name
555 "syslog" can be used to send error log information to the system
560 <TD>root, sys, system</TD>
561 <TD>Specifies the group name or ID that is used when running
562 external programs.</TD>
565 <TD>HostNameLookups</TD>
567 <TD>Specifies whether or not to perform reverse IP address lookups to
568 get the actual hostname; may be "On" or "Off". Hostname lookups can
569 significantly degrade the performance of the CUPS server if one or
570 more DNS servers is not functioning properly.</TD>
573 <TD>ImplicitClasses</TD>
575 <TD>Specifies whether or not to automatically create printer classes
576 when more than one printer or class of the same name is detected on
577 the network; may be "On" or "Off".</TD>
582 <TD>Specifies whether or not to use the HTTP Keep-Alive feature; may
583 be "On" or "Off".</TD>
586 <TD>KeepAliveTimeout</TD>
588 <TD>Specifies the amount of time to keep the HTTP connection alive
589 before closing it.</TD>
592 <TD><Location path><BR>
593 </Location></TD>
595 <TD>Specifies a location to restrict access to.</TD>
600 <TD>Controls the amount of information that is logged in the
601 error log file. Can be one of "debug", "info", "warn", "error",
602 or "none", in decreasing order or verbosity.</TD>
607 <TD>Specifies the maximum number of simultaneous active clients.
608 This value is internally limited to 1/3 of the total number of
609 available file descriptors.</TD>
614 <TD>Specifies the maximum size of the access, error, and page
615 log files in bytes. If set to 0 then no maximum size is set.
616 Log files are rotated automatically when this size is
620 <TD>MaxRequestSize</TD>
622 <TD>Specifies the maximum size of HTTP requests in bytes. If set to 0
623 then there is no maximum.</TD>
628 <TD>Specifies the order of Allow and Deny directive processing; can
629 be "Deny,Allow" to implicitly deny hosts unless they are allowed by
630 an Allow line, or "Allow,Deny" to implicitly allow hosts unless they
631 are denied by a Deny line.</TD>
636 <TD>Specifies the location of the page log file. The special name
637 "syslog" can be used to send page log information to the system
643 <TD>Specifies a port number to listen to for HTTP connections.</TD>
647 <TD>/etc/printcap</TD>
648 <TD>Specifies the location of a Berkeley printcap file to update
649 with a list of current printers and classes. If no filename is
650 supplied then this automatic generation is disabled.</TD>
654 <TD>/var/spool/cups</TD>
655 <TD>Specifies the location of request files.</TD>
660 <TD>Specifies the size of the memory cache in bytes that is used by
665 <TD>root@ServerName</TD>
666 <TD>Specifies the person to contact with problems.</TD>
671 <TD>Specifies the hostname that is supplied to HTTP clients. This
672 is also used to determine the default CUPS server for the CUPS IPP
673 client applications.</TD>
678 <TD>Specifies the root directory for server configuration files.</TD>
682 <TD>root, sys, system</TD>
683 <TD>Specifies the group name used for System class authentication.</TD>
688 <TD>Specifies the temporary directory to use.</TD>
693 <TD>The timeout in seconds before client connections are closed
694 in the middle of a request.</TD>
699 <TD>Specifies the user that is used when running external programs.</TD>
703 <H3>printers.conf</H3>
705 <P>The printers.conf file consists of 1 or more lines of ASCII text.
706 Comment lines start with the pound ("#") character.
708 <P>Each non-blank line starts with the name of a configuration directive
709 followed by its value. The following directives are understood:
711 <CENTER><TABLE WIDTH="90%" BORDER="1">
713 <TH WIDTH="25%">Directive</TH>
718 <TD>Specifies whether the printer is accepting new jobs. May be
719 the names "Yes" or "No".</TD>
722 <TD><DefaultPrinter name><BR>
723 </Printer></TD>
724 <TD>Surrounds the printer definition for a default destination.</TD>
728 <TD>Specifies a list of users that are allowed to access the printer.</TD>
732 <TD>Specifies the banner that is printed before other files in a
737 <TD>Specifies the banner that is printed after other files in a
742 <TD>Specifies a list of users that are not allowed to access the
747 <TD>Specifies the device-uri attribute for the printer.</TD>
751 <TD>A textual description of the printer.</TD>
755 <TD>A textual location of the printer.</TD>
758 <TD><Printer name><BR>
759 </Printer></TD>
760 <TD>Surrounds the printer definition.</TD>
764 <TD>Specifies the initial state of the printer; can be "Idle" or
768 <TD>StateMessage</TD>
769 <TD>Specifies a textual message for the current printer state.</TD>
773 <H1>External Interfaces</H1>
775 <H2>AppSocket Protocol</H2>
777 <P>The AppSocket protocol is an 8-bit clean TCP/IP socket connection.
778 The default IP service port is 9100. The URI method name is "socket".
780 <P>The AppSocket protocol is used by the Hewlett Packard JetDirect
781 network interfaces and print servers, as well as many other vendors'
782 products. See the CUPS Software Administrators Manual for a list of
785 <H2>CUPS Browsing Protocol</H2>
787 <P>The CUPS Browsing Protocol is a UDP/IP-based broadcast service. By default
788 this service operates on IP service port 631.
790 <P>Each broadcast packet describes the state of a single printer or class and
791 is an ASCII text string of up to 1450 bytes ending with a newline (0x0a). The
792 string is formatted as follows:
795 type SP state SP uri SP "location" SP "info" SP "make-and-model" NL
798 <P><VAR>State, uri, location, info</VAR>, and <VAR>make-and-model</VAR>,
799 correspond to the IPP <CODE>printer-state</CODE>,
800 <CODE>printer-uri-supported</CODE>, <CODE>printer-location</CODE>,
801 <CODE>printer-info</CODE>, and <CODE>printer-make-and-model</CODE>
804 <P><VAR>Type</VAR> is a hexadecimal number string representing
805 capability/type bits:
807 <CENTER><TABLE WIDTH="40%" BORDER="1">
809 <TH WIDTH="8%">Bit</TH>
825 <TD>1 = can print B&W</TD>
829 <TD>1 = can print color</TD>
833 <TD>1 = can duplex</TD>
837 <TD>1 = can staple</TD>
841 <TD>1 = can do fast copies</TD>
845 <TD>1 = can do fast collating</TD>
849 <TD>1 = can punch holes</TD>
853 <TD>1 = can cover</TD>
857 <TD>1 = can bind</TD>
861 <TD>1 = can sort</TD>
865 <TD>1 = can print up to 9x14 inches</TD>
869 <TD>1 = can print up to 18x24 inches</TD>
873 <TD>1 = can print up to 36x48 inches</TD>
877 <TD>1 = can print variable sizes</TD>
881 <H2>CUPS Form File</H2>
883 <P>CUPS Form files are XML files used by the CUPS <CODE>formtops</CODE>
884 filter to produce dynamic banner pages and support preprinted forms.
886 <P>The MIME type for CUPS Form files is
887 <CODE>application/vnd.cups-form</CODE>.
889 <H3>CUPS Form DTD</H3>
891 <P>The following DTD describes the available elements and attributes in
894 <CENTER><TABLE BORDER>
897 <!ENTITY % Angle "CDATA" -- angle in degrees -->
899 <!ENTITY % Color "CDATA" -- a color using sRGB: #RRGGBB as Hex values -->
901 <!ENTITY % Length "CDATA" -- nn for pixels or nn% for percentage length -->
903 <!ENTITY % Lengths "CDATA" -- comma-separated Length values -->
905 <!ENTITY % Text "CDATA">
907 <!ENTITY % heading "H1|H2|H3|H4|H5|H6">
909 <!ENTITY % preformatted "PRE">
912 "lang %LanguageCode; #IMPLIED -- language code --
913 dir (ltr|rtl) #IMPLIED -- direction for weak/neutral text --"
916 <!ENTITY % attrs "%i18n;">
918 <!ENTITY % fontstyle
921 <!ENTITY % graphics
922 "BOX | RECT | LINE | POLY | ARC | PIE | TEXT">
927 <!-- %inline; covers inline or "text-level" elements -->
928 <!ENTITY % inline "#PCDATA | %fontstyle; | %graphics; | %insert;">
930 <!ELEMENT (%fontstyle;) - - (%inline;)*>
931 <!ATTLIST (%fontstyle;)
935 <!ELEMENT BR - O EMPTY -- forced line break -->
941 "P | %heading; | %preformatted;">
943 <!ENTITY % flow "%block; | %inline;">
945 <!ELEMENT PAGE O O (%flow;)+ -- document body -->
948 align (left|center|right) #IMPLIED -- horizontal alignment --
949 valign (top|middle|center|bottom) #IMPLIED -- vertical alignment --
952 <!ELEMENT P - O (%inline;)* -- paragraph -->
955 align (left|center|right) #IMPLIED -- horizontal alignment --
958 <!ELEMENT (%heading;) - - (%inline;)* -- heading -->
959 <!ATTLIST (%heading;)
961 align (left|center|right) #IMPLIED -- horizontal alignment --
964 <!ELEMENT PRE - - (%inline;)* -- preformatted text -->
967 align (left|center|right) #IMPLIED -- horizontal alignment --
970 <!ELEMENT BOX - O EMPTY -- unfilled box -->
972 color %Color; #IMPLIED -- override color --
973 height %Length; #REQUIRED -- height of box --
974 thickness %Length; #IMPLIED -- override line thickness --
975 width %Length; #REQUIRED -- width of box --
976 x %Length; #REQUIRED -- horizontal position --
977 y %Length; #REQUIRED -- vertical position --
980 <!ELEMENT RECT - O EMPTY -- filled box -->
982 color %Color; #IMPLIED -- override color --
983 height %Length; #REQUIRED -- height of box --
984 width %Length; #REQUIRED -- width of box --
985 x %Length; #REQUIRED -- horizontal position --
986 y %Length; #REQUIRED -- vertical position --
989 <!ELEMENT LINE - O EMPTY -- polyline -->
991 color %Color; #IMPLIED -- override color --
992 thickness %Length; #IMPLIED -- override line thickness --
993 x %Lengths; #REQUIRED -- horizontal positions --
994 y %Lengths; #REQUIRED -- vertical positions --
997 <!ELEMENT POLY - O EMPTY -- polygon (filled) -->
999 color %Color; #IMPLIED -- override color --
1000 x %Lengths; #REQUIRED -- horizontal positions --
1001 y %Lengths; #REQUIRED -- vertical positions --
1004 <!ELEMENT ARC - O EMPTY -- unfilled arc -->
1006 color %Color; #IMPLIED -- override color --
1007 end %Angle; #IMPLIED -- override end angle --
1008 height %Length; #REQUIRED -- height of arc --
1009 start %Angle; #IMPLIED -- override start angle --
1010 thickness %Length; #IMPLIED -- override line thickness --
1011 width %Length; #REQUIRED -- width of arc --
1012 x %Length; #REQUIRED -- horizontal position --
1013 y %Length; #REQUIRED -- vertical position --
1016 <!ELEMENT PIE - O EMPTY -- filled arc -->
1018 color %Color; #IMPLIED -- override color --
1019 end %Angle; #IMPLIED -- override end angle --
1020 height %Length; #REQUIRED -- height of arc --
1021 start %Angle; #IMPLIED -- override start angle --
1022 width %Length; #REQUIRED -- width of arc --
1023 x %Length; #REQUIRED -- horizontal position --
1024 y %Length; #REQUIRED -- vertical position --
1027 <!ELEMENT TEXT - - (%flow;)* -- text box -->
1029 align (left|center|right) #IMPLIED -- horizontal alignment --
1030 height %Length; #REQUIRED -- height of box --
1031 valign (top|middle|center|bottom) #IMPLIED -- vertical alignment --
1032 width %Length; #REQUIRED -- width of box --
1033 x %Length; #REQUIRED -- horizontal position --
1034 y %Length; #REQUIRED -- vertical position --
1038 <!ELEMENT IMG - O EMPTY -- Embedded image -->
1040 %attrs; -- %coreattrs, %i18n, %events --
1041 src %URI; #REQUIRED -- URI of image to embed --
1042 height %Length; #IMPLIED -- override height --
1043 width %Length; #IMPLIED -- override width --
1046 <!ELEMENT HEAD O O (DEFVAR)* -- document head -->
1048 %i18n; -- lang, dir --
1051 <!ELEMENT DEFVAR - O EMPTY -- variable definition -->
1053 name CDATA #REQUIRED -- name
1054 value CDATA #REQUIRED -- value
1058 <!ENTITY % html.content "HEAD, PAGE">
1060 <!ELEMENT CUPSFORM - - (HEAD) (PAGE)+ -- document root element -->
1061 <!ATTLIST CUPSFORM
1062 %i18n; -- lang, dir --
1068 <H2>CUPS PostScript File</H2>
1070 <P>CUPS PostScript files are device-dependent Adobe PostScript program files.
1071 The PostScript language is described in the
1072 <A HREF="http://partners.adobe.com/asn/developer/PDFS/TN/PLRM.pdf">
1073 Adobe PostScript Language Reference Manual, Third Edition</A>.
1075 <P>The MIME type for CUPS PostScript files is
1076 <CODE>application/vnd.cups-postscript</CODE>.
1078 <H2>CUPS Raster File</H2>
1080 <P>CUPS raster files are device-dependent raster image files that contain a
1081 PostScript page device dictionary and device-dependent raster imagery for
1082 each page in the document. These files are used to transfer raster data
1083 from the PostScript and image file RIPs to device-dependent filters that
1084 convert the raster data to a printable format.
1086 <P>A raster file begins with a four byte synchronization word: 0x52615374
1087 ("RaSt") for big-endian architectures and 0x74536152 ("tSaR") for little-endian
1088 architectures. The writer of the raster file will use the native word order,
1089 and the reader is responsible for detecting a reversed word order file and
1090 swapping bytes as needed. The CUPS Image Library raster functions perform
1091 this function automatically.
1093 <P>Following the synchronization word are a series of raster pages. Each page
1094 starts with a page device dictionary header and is followed immediately by the
1095 raster data for that page.
1097 <CENTER><TABLE WIDTH="80%" BORDER="1">
1099 <TH WIDTH="10%">Bytes</TH>
1100 <TH WIDTH="20%">Description</TH>
1106 <TD>Nul-terminated ASCII string</TD>
1111 <TD>Nul-terminated ASCII string</TD>
1116 <TD>Nul-terminated ASCII string</TD>
1121 <TD>Nul-terminated ASCII string</TD>
1125 <TD>AdvanceDistance</TD>
1126 <TD>0 to 2<SUP>32</SUP> - 1 points</TD>
1130 <TD>AdvanceMedia</TD>
1131 <TD>0 = Never advance roll<BR>
1132 1 = Advance roll after file<BR>
1133 2 = Advance roll after job<BR>
1134 3 = Advance roll after set<BR>
1135 4 = Advance roll after page</TD>
1140 <TD>0 = do not collate copies<BR>
1141 1 = collate copies</TD>
1146 <TD>0 = Never cut media<BR>
1147 1 = Cut roll after file<BR>
1148 2 = Cut roll after job<BR>
1149 3 = Cut roll after set<BR>
1150 4 = Cut roll after page</TD>
1155 <TD>0 = Print single-sided<BR>
1156 1 = Print double-sided</TD>
1160 <TD>HWResolution</TD>
1161 <TD>Horizontal and vertical resolution in dots-per-inch.</TD>
1165 <TD>ImagingBoundingBox</TD>
1166 <TD>Four integers giving the left, bottom, right, and top positions
1167 of the page bounding box in points</TD>
1171 <TD>InsertSheet</TD>
1172 <TD>0 = Do not insert separator sheets<BR>
1173 1 = Insert separator sheets</TD>
1178 <TD>0 = Do no jog pages<BR>
1179 1 = Jog pages after file<BR>
1180 2 = Jog pages after job<BR>
1181 3 = Jog pages after set</TD>
1185 <TD>LeadingEdge</TD>
1186 <TD>0 = Top edge is first<BR>
1187 1 = Right edge is first<BR>
1188 2 = Bottom edge is first<BR>
1189 3 = Left edge is first</TD>
1194 <TD>Left and bottom origin of image in points</TD>
1199 <TD>0 = Do not manually feed media<BR>
1200 1 = Manually feed media</TD>
1204 <TD>MediaPosition</TD>
1205 <TD>Input slot position from 0 to N</TD>
1209 <TD>MediaWeight</TD>
1210 <TD>Media weight in grams per meter squared</TD>
1214 <TD>MirrorPrint</TD>
1215 <TD>0 = Do not mirror prints<BR>
1216 1 = Mirror prints</TD>
1220 <TD>NegativePrint</TD>
1221 <TD>0 = Do not invert prints<BR>
1222 1 = Invert prints</TD>
1227 <TD>1 to 2<SUP>32</SUP> - 1</TD>
1231 <TD>Orientation</TD>
1232 <TD>0 = Do not rotate page<BR>
1233 1 = Rotate page counter-clockwise<BR>
1234 2 = Turn page upside down<BR>
1235 3 = Rotate page clockwise</TD>
1239 <TD>OutputFaceUp</TD>
1240 <TD>0 = Output face down<BR>
1241 1 = Output face up</TD>
1246 <TD>Width and length in points</TD>
1250 <TD>Separations</TD>
1251 <TD>0 = Print composite image<BR>
1252 1 = Print color separations</TD>
1257 <TD>0 = Do not change trays if selected tray is empty<BR>
1258 1 = Change trays if selected tray is empty</TD>
1263 <TD>0 = Do not rotate even pages when duplexing<BR>
1264 1 = Rotate even pages when duplexing</TD>
1269 <TD>Width of page image in pixels</TD>
1274 <TD>Height of page image in pixels</TD>
1278 <TD>cupsMediaType</TD>
1279 <TD>Driver-specific 0 to 2<SUP>32</SUP> - 1</TD>
1283 <TD>cupsBitsPerColor</TD>
1284 <TD>1, 2, 4, 8 bits</TD>
1288 <TD>cupsBitsPerPixel</TD>
1289 <TD>1 to 32 bits</TD>
1293 <TD>cupsBytesPerLine</TD>
1294 <TD>1 to 2<SUP>32</SUP> - 1 bytes</TD>
1298 <TD>cupsColorOrder</TD>
1299 <TD>0 = chunky pixels (CMYK CMYK CMYK)<BR>
1300 1 = banded pixels (CCC MMM YYY KKK)<BR>
1301 2 = planar pixels (CCC... MMM... YYY... KKK...)</TD>
1305 <TD>cupsColorSpace</TD>
1319 <TD>cupsCompression</TD>
1320 <TD>Driver-specific 0 to 2<SUP>32</SUP> - 1</TD>
1324 <TD>cupsRowCount</TD>
1325 <TD>Driver-specific 0 to 2<SUP>32</SUP> - 1</TD>
1329 <TD>cupsRowFeed</TD>
1330 <TD>Driver-specific 0 to 2<SUP>32</SUP> - 1</TD>
1334 <TD>cupsRowStep</TD>
1335 <TD>Driver-specific 0 to 2<SUP>32</SUP> - 1</TD>
1339 <P>The MIME type for CUPS Raster files is
1340 <CODE>application/vnd.cups-raster</CODE>.
1342 <H2>CUPS Raw Files</H2>
1344 <P>Raw files are printer-dependent print files that are in a format suitable
1345 to the destination printer (e.g. HP-PCL, HP-RTL, etc.) The MIME type for CUPS
1346 Raw files is <CODE>application/vnd.cups-raw</CODE>.
1348 <H2>Internet Printing Protocol</H2>
1350 <P>The Internet Printing Protocol and the CUPS extensions to it are
1351 described in the CUPS Implementation of IPP document.
1353 <H2>Line Printer Daemon Protocol</H2>
1355 <P>The Line Printer Daemon (LPD) protocol is described by
1356 <A HREF="http://www.ietf.org/rfc/rfc1179.txt">RFC 1179: Line Printer Daemon
1359 <P>The URI method name for LPD is "lpd".
1361 <H2>Server Message Block Protocol</H2>
1363 <P>The Server Message Block (SMB) and related Common Internet File
1364 System (CIFS) protocols are described at
1365 <A HREF="http://anu.samba.org/cifs">http://anu.samba.org/cifs</A>.
1367 <P>The URI method name for SMB is "smb". Support for this protocol is
1368 provided via the SAMBA <CODE>smbspool(1)</CODE> program provided with
1369 SAMBA 2.0.6 and higher.
1371 <H1>Directories</H1>
1376 <DD>The scheduler configuration and MIME files reside here.
1379 <DD>The authentication certificates reside here.
1381 <DT>/etc/cups/interfaces
1382 <DD>System V interface scripts reside here.
1385 <DD>This directory contains PPD files for each printer.
1388 <DD>The <CODE>cancel</CODE>, <CODE>lp</CODE>, <CODE>lpq</CODE>,
1389 <CODE>lpr</CODE>, <CODE>lprm</CODE>, and <CODE>lpstat</CODE> commands
1392 <DT>/usr/lib, /usr/lib32
1393 <DD>The shared libraries (DSOs) reside here.
1395 <DT>/usr/lib/cups/backend
1396 <DD>The backend filters reside here.
1398 <DT>/usr/lib/cups/cgi-bin
1399 <DD>The CGI programs reside here.
1401 <DT>/usr/lib/cups/daemon
1402 <DD>The polling and LPD daemons reside here.
1404 <DT>/usr/lib/cups/filter
1405 <DD>The file filters reside here.
1408 <DD>The <CODE>accept</CODE>, <CODE>cupsd</CODE>,
1409 <CODE>lpadmin</CODE>, <CODE>lpc</CODE>, and <CODE>reject</CODE>
1410 commands reside here.
1413 <DD>This is the root directory of the CUPS static data.
1415 <DT>/usr/share/cups/charsets
1416 <DD>The character set files reside here.
1418 <DT>/usr/share/cups/data
1419 <DD>The filter data files reside here.
1421 <DT>/usr/share/cups/fonts
1422 <DD>The <CODE>pstoraster</CODE> font files reside here.
1424 <DT>/usr/share/cups/model
1425 <DD>The sample PPD files reside here.
1427 <DT>/usr/share/cups/pstoraster
1428 <DD>The <CODE>pstoraster</CODE> data files reside here.
1430 <DT>/usr/share/doc/cups
1431 <DD>The scheduler documentation files reside here.
1434 <DD>The <CODE>access_log</CODE>, <CODE>error_log</CODE>, and
1435 <CODE>page_log</CODE> files reside here.
1438 <DD>This directory contains print job files.
1442 <EMBED SRC="glossary.shtml">