]> git.ipfire.org Git - thirdparty/cups.git/blob - doc/idd.html
Copyright updates
[thirdparty/cups.git] / doc / idd.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
2 <HTML>
3 <HEAD>
4 <TITLE> CUPS Interface Design Description</TITLE>
5 <META NAME="author" CONTENT="Easy Software Products">
6 <META NAME="copyright" CONTENT="Copyright 1997-2001, All Rights Reserved">
7 <META NAME="docnumber" CONTENT="CUPS-IDD-1.1">
8 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-8859-1">
9 <STYLE TYPE="text/css"><!--
10 BODY { font-family: serif; font-size: 11.0pt }
11 H1 { font-family: sans-serif; font-size: 20.0pt }
12 H2 { font-family: sans-serif; font-size: 17.0pt }
13 H3 { font-family: sans-serif; font-size: 14.0pt }
14 H4 { font-family: sans-serif; font-size: 11.0pt }
15 H5 { font-family: sans-serif; font-size: 9.0pt }
16 H6 { font-family: sans-serif; font-size: 8.0pt }
17 SUB { font-size: 8.0pt }
18 SUP { font-size: 8.0pt }
19 PRE { font-size: 9.0pt }
20 --></STYLE>
21 </HEAD>
22 <BODY>
23 <CENTER><A HREF="#CONTENTS"><IMG SRC="images/cups-large.gif" BORDER="0" WIDTH="100%"><BR>
24 <H1> CUPS Interface Design Description</H1></A><BR>
25 CUPS-IDD-1.1<BR>
26 Easy Software Products<BR>
27 Copyright 1997-2001, All Rights Reserved<BR>
28 </CENTER>
29 <HR>
30 <H1 ALIGN="CENTER"><A NAME="CONTENTS">Table of Contents</A></H1>
31 <BR>
32 <BR><B><A HREF="#1">1 Scope</A></B>
33 <UL>
34 <LI><A HREF="#1_1">1.1 Identification</A></LI>
35 <LI><A HREF="#1_2">1.2 System Overview</A></LI>
36 <LI><A HREF="#1_3">1.3 Document Overview</A></LI>
37 </UL>
38 <B><A HREF="#2">2 References</A></B>
39 <UL>
40 <LI><A HREF="#2_1">2.1 CUPS Documentation</A></LI>
41 <LI><A HREF="#2_2">2.2 Other Documents</A></LI>
42 </UL>
43 <B><A HREF="#3">3 Internal Interfaces</A></B>
44 <UL>
45 <LI><A HREF="#3_1">3.1 Character Set Files</A></LI>
46 <UL>
47 <LI><A HREF="#3_1_1">3.1.1 8-Bit Character Set Files</A></LI>
48 <LI><A HREF="#3_1_2">3.1.2 Unicode Character Set Files</A></LI>
49 </UL>
50 <LI><A HREF="#3_2">3.2 Language Files</A></LI>
51 <LI><A HREF="#3_3">3.3 MIME Files</A></LI>
52 <UL>
53 <LI><A HREF="#3_3_1">3.3.1 mime.types</A></LI>
54 <LI><A HREF="#3_3_2">3.3.2 mime.convs</A></LI>
55 </UL>
56 <LI><A HREF="#3_4">3.4 Option Files</A></LI>
57 <LI><A HREF="#3_5">3.5 PostScript Printer Description Files</A></LI>
58 <UL>
59 <LI><A HREF="#3_5_1">3.5.1 PPD Specification</A></LI>
60 <LI><A HREF="#3_5_2">3.5.2 CUPS Extensions to PPD Files</A></LI>
61 </UL>
62 <LI><A HREF="#3_6">3.6 Scheduler Configuration Files</A></LI>
63 <UL>
64 <LI><A HREF="#3_6_1">3.6.1 classes.conf</A></LI>
65 <LI><A HREF="#3_6_2">3.6.2 cupsd.conf</A></LI>
66 <LI><A HREF="#3_6_3">3.6.3 printers.conf</A></LI>
67 </UL>
68 </UL>
69 <B><A HREF="#4">4 External Interfaces</A></B>
70 <UL>
71 <LI><A HREF="#4_1">4.1 AppSocket Protocol</A></LI>
72 <LI><A HREF="#4_2">4.2 CUPS Browsing Protocol</A></LI>
73 <LI><A HREF="#4_3">4.3 CUPS Form File</A></LI>
74 <UL>
75 <LI><A HREF="#4_3_1">4.3.1 CUPS Form DTD</A></LI>
76 </UL>
77 <LI><A HREF="#4_4">4.4 CUPS PostScript File</A></LI>
78 <LI><A HREF="#4_5">4.5 CUPS Raster File</A></LI>
79 <LI><A HREF="#4_6">4.6 CUPS Raw Files</A></LI>
80 <LI><A HREF="#4_7">4.7 Internet Printing Protocol</A></LI>
81 <LI><A HREF="#4_8">4.8 Line Printer Daemon Protocol</A></LI>
82 <LI><A HREF="#4_9">4.9 Server Message Block Protocol</A></LI>
83 </UL>
84 <B><A HREF="#5">5 Directories</A></B>
85 <BR>
86 <BR><B><A HREF="#6">A Glossary</A></B>
87 <UL>
88 <LI><A HREF="#6_1">A.1 Terms</A></LI>
89 <LI><A HREF="#6_2">A.2 Acronyms</A></LI>
90 </UL>
91 <HR>
92 <H1><A NAME="1">1 Scope</A></H1>
93 <H2><A NAME="1_1">1.1 Identification</A></H2>
94 <P>This interface design description document provides detailed file
95 formats, message formats, and program conventions for the Common UNIX
96 Printing System (&quot;CUPS&quot;) Version 1.1. </P>
97 <H2><A NAME="1_2">1.2 System Overview</A></H2>
98 <P>CUPS provides a portable printing layer for UNIX&reg;-based operating
99 systems. It has been developed by <A HREF="http://www.easysw.com">Easy
100 Software Products</A> to promote a standard printing solution for all
101 UNIX vendors and users. CUPS provides the System V and Berkeley
102 command-line interfaces. </P>
103 <P>CUPS uses the Internet Printing Protocol (&quot;IPP&quot;) as the basis for
104 managing print jobs and queues. The Line Printer Daemon (&quot;LPD&quot;) Server
105 Message Block (&quot;SMB&quot;), and AppSocket (a.k.a. JetDirect) protocols are
106 also supported with reduced functionality. CUPS adds network printer
107 browsing and PostScript Printer Description (&quot;PPD&quot;) based printing
108 options to support real-world printing under UNIX. </P>
109 <P>CUPS also includes a customized version of GNU Ghostscript
110 (currently based off GNU Ghostscript 5.50) and an image file RIP that
111 are used to support non-PostScript printers. Sample drivers for HP and
112 EPSON printers are included that use these filters. </P>
113 <H2><A NAME="1_3">1.3 Document Overview</A></H2>
114 <P>This interface design description document is organized into the
115 following sections: </P>
116 <UL>
117 <LI>1 - Scope </LI>
118 <LI>2 - References </LI>
119 <LI>3 - Internal Interfaces </LI>
120 <LI>4 - External Interfaces </LI>
121 <LI>5 - Directories </LI>
122 <LI>A - Glossary </LI>
123 </UL>
124 <H1><A NAME="2">2 References</A></H1>
125 <H2><A NAME="2_1">2.1 CUPS Documentation</A></H2>
126 <P>The following CUPS documentation is referenced by this document: </P>
127 <UL>
128 <LI>CUPS-CMP-1.1: CUPS Configuration Management Plan </LI>
129 <LI>CUPS-IDD-1.1: CUPS System Interface Design Description </LI>
130 <LI>CUPS-IPP-1.1: CUPS Implementation of IPP </LI>
131 <LI>CUPS-SAM-1.1.x: CUPS Software Administrators Manual </LI>
132 <LI>CUPS-SDD-1.1: CUPS Software Design Description </LI>
133 <LI>CUPS-SPM-1.1.x: CUPS Software Programming Manual </LI>
134 <LI>CUPS-SSR-1.1: CUPS Software Security Report </LI>
135 <LI>CUPS-STP-1.1: CUPS Software Test Plan </LI>
136 <LI>CUPS-SUM-1.1.x: CUPS Software Users Manual </LI>
137 <LI>CUPS-SVD-1.1: CUPS Software Version Description </LI>
138 </UL>
139 <H2><A NAME="2_2">2.2 Other Documents</A></H2>
140 <P>The following non-CUPS documents are referenced by this document: </P>
141 <UL>
142 <LI><A HREF="http://partners.adobe.com/asn/developer/PDFS/TN/5003.PPD_Spec_v4.3.pdf">
143 Adobe PostScript Printer Description File Format Specification,
144 Version 4.3.</A></LI>
145 <LI><A HREF="http://partners.adobe.com/asn/developer/PDFS/TN/PLRM.pdf">
146 Adobe PostScript Language Reference, Third Edition.</A></LI>
147 <LI>IPP: Job and Printer Set Operations </LI>
148 <LI>IPP/1.1: Encoding and Transport </LI>
149 <LI>IPP/1.1: Implementers Guide </LI>
150 <LI>IPP/1.1: Model and Semantics </LI>
151 <LI><A HREF="http://www.ietf.org/rfc/rfc1179.txt">RFC 1179, Line
152 Printer Daemon Protocol</A></LI>
153 <LI><A HREF="http://www.ietf.org/rfc/rfc2567.txt">RFC 2567, Design
154 Goals for an Internet Printing Protocol</A></LI>
155 <LI><A HREF="http://www.ietf.org/rfc/rfc2568.txt">RFC 2568, Rationale
156 for the Structure of the Model and Protocol</A> for the Internet
157 Printing Protocol</LI>
158 <LI><A HREF="http://www.ietf.org/rfc/rfc2569.txt">RFC 2569, Mapping
159 between LPD and IPP Protocols</A></LI>
160 <LI><A HREF="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616, Hypertext
161 Transfer Protocol -- HTTP/1.1</A></LI>
162 <LI><A HREF="http://www.ietf.org/rfc/rfc2617.txt">RFC 2617, HTTP
163 Authentication: Basic and Digest Access</A> Authentication </LI>
164 </UL>
165 <H1><A NAME="3">3 Internal Interfaces</A></H1>
166 <H2><A NAME="3_1">3.1 Character Set Files</A></H2>
167 <P>The character set files define a mapping between 8-bit characters
168 and the Unicode character set, or between Unicode and printer fonts.
169 They are named using the IETF charset names defined in RFCnnnn. These
170 files are ASCII text, the content of which is described below. Comments
171 can be included by using the <TT>#</TT> character in the first column
172 of a line. </P>
173 <H3><A NAME="3_1_1">3.1.1 8-Bit Character Set Files</A></H3>
174 <P>8-bit character set files start with a line reading: </P>
175 <UL>
176 <PRE>
177 charset 8bit
178 </PRE>
179 </UL>
180 <P>Following this are lines that define the font information: </P>
181 <UL>
182 <PRE>
183 first last direction width normal bold italic bold-italic
184 </PRE>
185 </UL>
186 <P><VAR>First</VAR> and <VAR>last</VAR> are the first and last glyphs
187 in the font mapping that correspond to that font; a maximum of 256
188 characters can be mapped within each group, with a maximum of 256
189 mappings (this is a PostScript limitation.) The glyph values are
190 hexadecimal. </P>
191 <P><VAR>Direction</VAR> is the string &quot;ltor&quot;, &quot;rtol&quot;, or &quot;rtola&quot;
192 indicating left-to-right, right-to-left, or right-to-left Arabic text. </P>
193 <P><VAR>Width</VAR> is the string &quot;single&quot; or &quot;double&quot;; double means
194 that the glyphs are twice as wide as ASCII characters in the Courier
195 typeface. </P>
196 <P><VAR>Normal, bold, italic</VAR>, and <VAR>bold-italic</VAR> are the
197 typefaces to use for each presentation. If characters are only
198 available in a single style then only one typeface should be listed
199 (e.g. &quot;Symbol&quot;.) Each font that is listed will be used (and downloaded
200 if needed) when printing. </P>
201 <P>The remaining lines define a character to Unicode glyph mapping for
202 the character set. The character and glyph values are hexadecimal: </P>
203 <UL>
204 <PRE>
205 xx yyyy
206 </PRE>
207 </UL>
208 <H3><A NAME="3_1_2">3.1.2 Unicode Character Set Files</A></H3>
209 <P>Unicode character set files start with a line reading: </P>
210 <UL>
211 <PRE>
212 charset encoding
213 </PRE>
214 </UL>
215 <P><VAR>Encoding</VAR> is the encoding to use for the text; currently
216 only the string &quot;utf8&quot; is supported. </P>
217 <P>Following this are lines defining the font information: </P>
218 <UL>
219 <PRE>
220 first last direction width normal bold italic bold-italic
221 </PRE>
222 </UL>
223 <P><VAR>First</VAR> and <VAR>last</VAR> are the first and last glyphs
224 in the font mapping that correspond to that font; a maximum of 256
225 characters can be mapped within each group, with a maximum of 256
226 mappings (this is a PostScript limitation.) The glyph values are
227 hexadecimal. </P>
228 <P><VAR>Direction</VAR> is the string &quot;ltor&quot;, &quot;rtol&quot;, or &quot;rtola&quot;
229 indicating left-to-right, right-to-left, or right-to-left Arabic text. </P>
230 <P><VAR>Width</VAR> is the string &quot;single&quot; or &quot;double&quot;; double means
231 that the glyphs are twice as wide as ASCII characters in the Courier
232 typeface. </P>
233 <P><VAR>Normal, bold, italic</VAR>, and <VAR>bold-italic</VAR> are the
234 typefaces to use for each presentation. If characters are only
235 available in a single style then only one typeface should be listed
236 (e.g. &quot;Symbol&quot;.) Each font that is listed will be used (and downloaded
237 if needed) when printing. </P>
238 <H2><A NAME="3_2">3.2 Language Files</A></H2>
239 <P>The language files define the default character set and a collection
240 of text messages in that language. They are named by prefixing the
241 string &quot;cups_&quot; to the front of the language specifier (e.g. &quot;cups_en&quot;,
242 &quot;cups_fr&quot;, etc.) Each file consists of two or more lines of ASCII text. </P>
243 <P>The first line identifies the character set to be used for the
244 messages. The currently recognized values are: </P>
245 <UL>
246 <LI>iso-8859-1 </LI>
247 <LI>iso-8859-2 </LI>
248 <LI>iso-8859-3 </LI>
249 <LI>iso-8859-4 </LI>
250 <LI>iso-8859-5 </LI>
251 <LI>iso-8859-6 </LI>
252 <LI>iso-8859-7 </LI>
253 <LI>iso-8859-8 </LI>
254 <LI>iso-8859-9 </LI>
255 <LI>iso-8859-10 </LI>
256 <LI>iso-8859-13 </LI>
257 <LI>iso-8859-14 </LI>
258 <LI>iso-8859-15 </LI>
259 <LI>us-ascii </LI>
260 <LI>utf-8 </LI>
261 <LI>windows-874 </LI>
262 <LI>windows-1250 </LI>
263 <LI>windows-1251 </LI>
264 <LI>windows-1252 </LI>
265 <LI>windows-1253 </LI>
266 <LI>windows-1254 </LI>
267 <LI>windows-1255 </LI>
268 <LI>windows-1256 </LI>
269 <LI>windows-1257 </LI>
270 <LI>windows-1258 </LI>
271 </UL>
272 <P>The second and succeeding lines define text messages. If the message
273 text is preceded by a number, then the current message number is
274 updated and the text after the number is used. </P>
275 <H2><A NAME="3_3">3.3 MIME Files</A></H2>
276 <P>CUPS uses two MIME files in its standard configuration. </P>
277 <H3><A NAME="3_3_1">3.3.1 mime.types</A></H3>
278 <P>The mime.types file defines the recognized file types and consists
279 of 1 or more lines of ASCII text. Comment lines start with the pound
280 (&quot;#&quot;) character. The backslash (&quot;\&quot;) character can be used at the end
281 of a line to continue that line to the next. </P>
282 <P>Each non-blank line starts with a MIME type identifier
283 (&quot;super/type&quot;) as registered with the IANA. All text following the MIME
284 type is treated as a series of type recognition rules: </P>
285 <UL>
286 <PRE>
287 mime-type := super &quot;/&quot; type { SP rule }*
288 super := { &quot;a-z&quot; | &quot;A-Z&quot; }*
289 type := { &quot;a-z&quot; | &quot;A-Z&quot; | &quot;-&quot; | &quot;.&quot; | &quot;0-9&quot; }*
290 rule := { extension | match | operator | &quot;(&quot; rule &quot;)&quot; }*
291 extension := { &quot;a-z&quot; | &quot;A-Z&quot; | &quot;0-9&quot; }*
292 match := &quot;match(&quot; regexp &quot;)&quot; |
293 &quot;ascii(&quot; offset &quot;,&quot; length &quot;)&quot; |
294 &quot;printable(&quot; offset &quot;,&quot; length &quot;)&quot; |
295 &quot;string(&quot; offset &quot;,&quot; string &quot;)&quot; |
296 &quot;contains(&quot; offset &quot;,&quot; length &quot;,&quot; string &quot;)&quot; |
297 &quot;char(&quot; offset &quot;,&quot; value &quot;)&quot; |
298 &quot;short(&quot; offset &quot;,&quot; value &quot;)&quot; |
299 &quot;int(&quot; offset &quot;,&quot; value &quot;)&quot; |
300 &quot;locale(&quot; string &quot;)&quot;
301 operator := &quot;+&quot; | [ logical AND ]
302 &quot;,&quot; | SP [ logical OR ]
303 &quot;!&quot; [ unary NOT ]
304 </PRE>
305 </UL>
306 <P>The <CODE>int</CODE> and <CODE>short</CODE> rules match look for
307 integers in network byte order (a.k.a. big-endian) with the
308 most-significant byte first. </P>
309 <H3><A NAME="3_3_2">3.3.2 mime.convs</A></H3>
310 <P>The mime.types file defines the recognized file filters and consists
311 of 1 or more lines of ASCII text. Comment lines start with the pound
312 (&quot;#&quot;) character. </P>
313 <P>Each non-blank line starts with two MIME type identifiers
314 (&quot;super/type&quot;) representing the source and destination types. Following
315 the MIME types are a cost value (0 to 100) and the filter program to
316 use. If the filter program is not specified using the full path then it
317 must reside in the CUPS filter directory: </P>
318 <UL>
319 <PRE>
320 super/type SP super/type2 SP cost SP program
321 </PRE>
322 </UL>
323 <H2><A NAME="3_4">3.4 Option Files</A></H2>
324 <P>CUPS maintains user-defined printer and option files for each
325 printer and user on the system. The printers and options defined in the
326 system option file (<CODE>/etc/cups/lpoptions</CODE>) are loaded first,
327 followed by the user option file (<CODE>$HOME/.lpoptions</CODE>).
328 Options in the user file replace those defined in the system file for
329 the same destination. Each line in the files can be one of the
330 following: </P>
331 <UL>
332 <PRE>
333 Dest name option=value option=value ... option=value
334 Dest name/instance option=value option=value ... option=value
335 Default name option=value option=value ... option=value
336 Default name/instance option=value option=value ... option=value
337 </PRE>
338 </UL>
339 <P>The line beginning with &quot;Default&quot; indicates the default destination
340 for print jobs; a default line in the user option file overrides the
341 default defined in the system option file. </P>
342 <P><VAR>Name</VAR> is the name of a printer known to the local server. </P>
343 <P><VAR>Instance</VAR> can be any string of letters, numbers, and the
344 underscore up to 127 characters in length. </P>
345 <P>The remainder of the line contains a list of space-separated options
346 and their values. </P>
347 <H2><A NAME="3_5">3.5 PostScript Printer Description Files</A></H2>
348 <P>PostScript Printer Description (&quot;PPD&quot;) files describe the
349 capabilities of each printer and are used by CUPS to support
350 printer-specific features and intelligent filtering. </P>
351 <H3><A NAME="3_5_1">3.5.1 PPD Specification</A></H3>
352 <P>The PPD file format is described in <A HREF="http://partners.adobe.com/asn/developer/PDFS/TN/5003.PPD_Spec_v4.3.pdf">
353 Adobe TechNote #5003: PostScript Printer Description File Format
354 Specification Version 4.3</A>. </P>
355 <H3><A NAME="3_5_2">3.5.2 CUPS Extensions to PPD Files</A></H3>
356 <P>CUPS adds several new attributes that are described below. </P>
357 <H4>3.5.2.1 cupsFilter</H4>
358 <P>This string attribute provides a conversion rule of the form: </P>
359 <UL>
360 <PRE>
361 source/type cost program
362 </PRE>
363 </UL>
364 <P>The destination type is assumed to the printer's type. If a printer
365 supports the source type directly the special filter program &quot;-&quot; may be
366 specified. </P>
367 <H4>3.5.2.2 cupsManualCopies</H4>
368 <P>This boolean attribute notifies the RIP filters that the destination
369 printer does not support copy generation in hardware. The default value
370 is false. </P>
371 <H4>3.5.2.3 cupsModelNumber</H4>
372 <P>This integer attribute specifies a printer-specific model number.
373 This number can be used by a filter program to adjust the output for a
374 specific model of printer. </P>
375 <H4>3.5.2.4 cupsProfile</H4>
376 <P>This string attribute specifies a color profile of the form: </P>
377 <UL>
378 <PRE>
379 resolution/type density gamma m00 m01 m02 m10 m11 m12 m20 m21 m22
380 </PRE>
381 </UL>
382 <P>The <I>resolution</I> and <I>type</I> values may be &quot;-&quot; to act as a
383 wildcard. Otherwise they must match one of the <CODE>Resolution</CODE>
384 or <CODE>MediaType</CODE> attributes defined in the PPD file. </P>
385 <P>The <I>density</I> and <I>gamma</I> values define gamma and density
386 adjustment function such that: </P>
387 <UL>
388 <PRE>
389 f(x) = density * x<SUP>gamma</SUP>
390 </PRE>
391 </UL>
392 <P>The <I>m00</I> through <I>m22</I> values define a 3x3 transformation
393 matrix for the CMY color values. The density function is applied <I>
394 after</I> the CMY transformation. </P>
395 <H4>3.5.2.5 cupsVersion</H4>
396 <P>This required attribute describes which version of the CUPS IDD was
397 used for the PPD file extensions. Currently it must be the string &quot;1.0&quot;
398 or &quot;1.1&quot;. </P>
399 <H2><A NAME="3_6">3.6 Scheduler Configuration Files</A></H2>
400 <P>The scheduler reads three configuration files that define the
401 available printers, classes, and services: </P>
402 <DL>
403 <DT>classes.conf </DT>
404 <DD>This file defines all of the printer classes known to the system. </DD>
405 <DT>cupsd.conf </DT>
406 <DD>This file defines the files, directories, passwords, etc. used by
407 the scheduler. </DD>
408 <DT>printers.conf </DT>
409 <DD>This file defines all of the printers known to the system. </DD>
410 </DL>
411 <H3><A NAME="3_6_1">3.6.1 classes.conf</A></H3>
412 <P>The classes.conf file consists of 1 or more lines of ASCII text.
413 Comment lines start with the pound (&quot;#&quot;) character. </P>
414 <P>Each non-blank line starts with the name of a configuration
415 directive followed by its value. The following directives are
416 understood:
417 <CENTER>
418 <TABLE BORDER="1" WIDTH="90%">
419 <TR><TH WIDTH="25%">Directive</TH><TH>Description</TH></TR>
420 <TR><TD>&lt;Class name&gt;
421 <BR> &lt;/Class&gt;</TD><TD>Surrounds a class definition.</TD></TR>
422 <TR><TD>&lt;DefaultClass name&gt;
423 <BR> &lt;/Class&gt;</TD><TD>Surrounds a class definition for the default
424 destination.</TD></TR>
425 <TR><TD>Accepting</TD><TD>Specifies whether the class is accepting new
426 jobs. May be the names &quot;Yes&quot; or &quot;No&quot;.</TD></TR>
427 <TR><TD>AllowUsers</TD><TD>Specifies a list of users that are allowed
428 to access the class.</TD></TR>
429 <TR><TD>BannerStart</TD><TD>Specifies the banner that is printed before
430 other files in a job.</TD></TR>
431 <TR><TD>BannerEnd</TD><TD>Specifies the banner that is printed after
432 other files in a job.</TD></TR>
433 <TR><TD>DenyUsers</TD><TD>Specifies a list of users that are not
434 allowed to access the class.</TD></TR>
435 <TR><TD>Info</TD><TD>A textual description of the class.</TD></TR>
436 <TR><TD>Location</TD><TD>A textual location of the class.</TD></TR>
437 <TR><TD>Printer</TD><TD>Specifies a printer that is a member of the
438 class.</TD></TR>
439 <TR><TD>State</TD><TD>Specifies the initial state of the class; can be
440 &quot;Idle&quot; or &quot;Stopped&quot;.</TD></TR>
441 <TR><TD>StateMessage</TD><TD>Specifies a textual message for the
442 current class state.</TD></TR>
443 </TABLE>
444 </CENTER>
445 </P>
446 <H3><A NAME="3_6_2">3.6.2 cupsd.conf</A></H3>
447 <P>The cupsd.conf file consists of 1 or more lines of ASCII text.
448 Comment lines start with the pound (&quot;#&quot;) character. </P>
449 <P>Each non-blank line starts with the name of a configuration
450 directive followed by its value. The following directives are
451 understood:
452 <CENTER>
453 <TABLE BORDER="1" WIDTH="90%">
454 <TR><TH WIDTH="25%">Directive</TH><TH>Default</TH><TH>Description</TH></TR>
455 <TR><TD>AccessLog</TD><TD>access_log</TD><TD>Specifies the location of
456 the access log file. The special name &quot;syslog&quot; can be used to send
457 access log information to the system log.</TD></TR>
458 <TR><TD>Allow</TD><TD>-</TD><TD>Allows connections from the specified
459 host, network, or domain.</TD></TR>
460 <TR><TD>AuthClass</TD><TD>-</TD><TD>Specifies what level of
461 authentication is required; may be &quot;User&quot;, &quot;System&quot;, or &quot;Group&quot;.</TD></TR>
462 <TR><TD>AuthType</TD><TD>None</TD><TD>Specifies the type of
463 authentication to perform; may be &quot;None&quot;, &quot;Basic&quot;, or &quot;Digest&quot;.</TD></TR>
464 <TR><TD>BrowseAddress</TD><TD>255.255.255.255</TD><TD>Specifies a
465 broadcast address to send CUPS browsing packets to.</TD></TR>
466 <TR><TD>BrowseAllow</TD><TD>-</TD><TD>Specifies hosts or addresses from
467 which browsing information should be used.</TD></TR>
468 <TR><TD>BrowseDeny</TD><TD>-</TD><TD>Specifies hosts or addresses from
469 which browsing information should not be used.</TD></TR>
470 <TR><TD>BrowseInterval</TD><TD>30</TD><TD>Specifies the number of
471 seconds between browsing updates. A browse interval of 0 seconds
472 disables outgoing packets.</TD></TR>
473 <TR><TD>BrowseOrder</TD><TD>Allow,Deny</TD><TD>Specifies the order of
474 BrowseAllow and BrowseDeny directive processing; can be &quot;Deny,Allow&quot;
475 to implicitly deny hosts unless they are allowed by a BrowseAllow
476 line, or &quot;Allow,Deny&quot; to implicitly allow hosts unless they are denied
477 by a BrowseDeny line.</TD></TR>
478 <TR><TD>BrowsePoll</TD><TD>-</TD><TD>Specifies a server to poll for
479 available printers and classes.</TD></TR>
480 <TR><TD>BrowsePort</TD><TD>631</TD><TD>Specifies the UDP port number to
481 use for browse packets.</TD></TR>
482 <TR><TD>BrowseRelay</TD><TD>-</TD><TD>Specifies a source and
483 destination address for relaying browser information from one subnet
484 to another.</TD></TR>
485 <TR><TD>BrowseShortNames</TD><TD>yes</TD><TD>Specifies whether or not
486 to provide short names (without the &quot;@server&quot; part) for remote
487 printers.</TD></TR>
488 <TR><TD>BrowseTimeout</TD><TD>300</TD><TD>Specifies the number of
489 seconds to wait until remote destinations are removed from the local
490 destination list.</TD></TR>
491 <TR><TD>Browsing</TD><TD>On</TD><TD>Specifies whether or not printer
492 and class browsing is enabled; can be &quot;On&quot; or &quot;Off&quot;.</TD></TR>
493 <TR><TD>DataDir</TD><TD>/usr/share/cups</TD><TD>Specifies the directory
494 where CUPS data files are stored.</TD></TR>
495 <TR><TD>DefaultCharset</TD><TD>iso-8859-1</TD><TD>Specifies the default
496 character set.</TD></TR>
497 <TR><TD>DefaultLanguage</TD><TD>current locale</TD><TD>Specifies the
498 default language.</TD></TR>
499 <TR><TD>Deny</TD><TD>-</TD><TD>Refuses connections from the specified
500 host, network, or domain.</TD></TR>
501 <TR><TD>DocumentRoot</TD><TD>/usr/share/doc/cups</TD><TD>Specifies the
502 document data root directory.</TD></TR>
503 <TR><TD>ErrorLog</TD><TD>error_log</TD><TD>Specifies the error log file
504 location. The special name &quot;syslog&quot; can be used to send error log
505 information to the system log.</TD></TR>
506 <TR><TD>Group</TD><TD>root, sys, system</TD><TD>Specifies the group
507 name or ID that is used when running external programs.</TD></TR>
508 <TR><TD>HostNameLookups</TD><TD>Off</TD><TD>Specifies whether or not to
509 perform reverse IP address lookups to get the actual hostname; may be
510 &quot;On&quot; or &quot;Off&quot;. Hostname lookups can significantly degrade the
511 performance of the CUPS server if one or more DNS servers is not
512 functioning properly.</TD></TR>
513 <TR><TD>ImplicitClasses</TD><TD>On</TD><TD>Specifies whether or not to
514 automatically create printer classes when more than one printer or
515 class of the same name is detected on the network; may be &quot;On&quot; or
516 &quot;Off&quot;.</TD></TR>
517 <TR><TD>KeepAlive</TD><TD>On</TD><TD>Specifies whether or not to use
518 the HTTP Keep-Alive feature; may be &quot;On&quot; or &quot;Off&quot;.</TD></TR>
519 <TR><TD>KeepAliveTimeout</TD><TD>30</TD><TD>Specifies the amount of
520 time to keep the HTTP connection alive before closing it.</TD></TR>
521 <TR><TD>&lt;Location path&gt;
522 <BR> &lt;/Location&gt;</TD><TD>-</TD><TD>Specifies a location to restrict
523 access to.</TD></TR>
524 <TR><TD>LogLevel</TD><TD>info</TD><TD>Controls the amount of
525 information that is logged in the error log file. Can be one of
526 &quot;debug&quot;, &quot;info&quot;, &quot;warn&quot;, &quot;error&quot;, or &quot;none&quot;, in decreasing order or
527 verbosity.</TD></TR>
528 <TR><TD>MaxClients</TD><TD>100</TD><TD>Specifies the maximum number of
529 simultaneous active clients. This value is internally limited to 1/3
530 of the total number of available file descriptors.</TD></TR>
531 <TR><TD>MaxLogSize</TD><TD>0</TD><TD>Specifies the maximum size of the
532 access, error, and page log files in bytes. If set to 0 then no
533 maximum size is set. Log files are rotated automatically when this
534 size is exceeded.</TD></TR>
535 <TR><TD>MaxRequestSize</TD><TD>0</TD><TD>Specifies the maximum size of
536 HTTP requests in bytes. If set to 0 then there is no maximum.</TD></TR>
537 <TR><TD>Order</TD><TD>Allow,Deny</TD><TD>Specifies the order of Allow
538 and Deny directive processing; can be &quot;Deny,Allow&quot; to implicitly deny
539 hosts unless they are allowed by an Allow line, or &quot;Allow,Deny&quot; to
540 implicitly allow hosts unless they are denied by a Deny line.</TD></TR>
541 <TR><TD>PageLog</TD><TD>page_log</TD><TD>Specifies the location of the
542 page log file. The special name &quot;syslog&quot; can be used to send page log
543 information to the system log.</TD></TR>
544 <TR><TD>Port</TD><TD>631</TD><TD>Specifies a port number to listen to
545 for HTTP connections.</TD></TR>
546 <TR><TD>Printcap</TD><TD>/etc/printcap</TD><TD>Specifies the location
547 of a Berkeley printcap file to update with a list of current printers
548 and classes. If no filename is supplied then this automatic generation
549 is disabled.</TD></TR>
550 <TR><TD>RequestRoot</TD><TD>/var/spool/cups</TD><TD>Specifies the
551 location of request files.</TD></TR>
552 <TR><TD>RIPCache</TD><TD>8m</TD><TD>Specifies the size of the memory
553 cache in bytes that is used by RIP filters.</TD></TR>
554 <TR><TD>ServerAdmin</TD><TD>root@ServerName</TD><TD>Specifies the
555 person to contact with problems.</TD></TR>
556 <TR><TD>ServerName</TD><TD>hostname</TD><TD>Specifies the hostname that
557 is supplied to HTTP clients. This is also used to determine the
558 default CUPS server for the CUPS IPP client applications.</TD></TR>
559 <TR><TD>ServerRoot</TD><TD>/etc/cups</TD><TD>Specifies the root
560 directory for server configuration files.</TD></TR>
561 <TR><TD>SystemGroup</TD><TD>root, sys, system</TD><TD>Specifies the
562 group name used for System class authentication.</TD></TR>
563 <TR><TD>TempDir</TD><TD>/var/tmp</TD><TD>Specifies the temporary
564 directory to use.</TD></TR>
565 <TR><TD>Timeout</TD><TD>300</TD><TD>The timeout in seconds before
566 client connections are closed in the middle of a request.</TD></TR>
567 <TR><TD>User</TD><TD>lp</TD><TD>Specifies the user that is used when
568 running external programs.</TD></TR>
569 </TABLE>
570 </CENTER>
571 </P>
572 <H3><A NAME="3_6_3">3.6.3 printers.conf</A></H3>
573 <P>The printers.conf file consists of 1 or more lines of ASCII text.
574 Comment lines start with the pound (&quot;#&quot;) character. </P>
575 <P>Each non-blank line starts with the name of a configuration
576 directive followed by its value. The following directives are
577 understood:
578 <CENTER>
579 <TABLE BORDER="1" WIDTH="90%">
580 <TR><TH WIDTH="25%">Directive</TH><TH>Description</TH></TR>
581 <TR><TD>Accepting</TD><TD>Specifies whether the printer is accepting
582 new jobs. May be the names &quot;Yes&quot; or &quot;No&quot;.</TD></TR>
583 <TR><TD>&lt;DefaultPrinter name&gt;
584 <BR> &lt;/Printer&gt;</TD><TD>Surrounds the printer definition for a default
585 destination.</TD></TR>
586 <TR><TD>AllowUsers</TD><TD>Specifies a list of users that are allowed
587 to access the printer.</TD></TR>
588 <TR><TD>BannerStart</TD><TD>Specifies the banner that is printed before
589 other files in a job.</TD></TR>
590 <TR><TD>BannerEnd</TD><TD>Specifies the banner that is printed after
591 other files in a job.</TD></TR>
592 <TR><TD>DenyUsers</TD><TD>Specifies a list of users that are not
593 allowed to access the printer.</TD></TR>
594 <TR><TD>DeviceURI</TD><TD>Specifies the device-uri attribute for the
595 printer.</TD></TR>
596 <TR><TD>Info</TD><TD>A textual description of the printer.</TD></TR>
597 <TR><TD>Location</TD><TD>A textual location of the printer.</TD></TR>
598 <TR><TD>&lt;Printer name&gt;
599 <BR> &lt;/Printer&gt;</TD><TD>Surrounds the printer definition.</TD></TR>
600 <TR><TD>State</TD><TD>Specifies the initial state of the printer; can
601 be &quot;Idle&quot; or &quot;Stopped&quot;.</TD></TR>
602 <TR><TD>StateMessage</TD><TD>Specifies a textual message for the
603 current printer state.</TD></TR>
604 </TABLE>
605 </CENTER>
606 </P>
607 <H1><A NAME="4">4 External Interfaces</A></H1>
608 <H2><A NAME="4_1">4.1 AppSocket Protocol</A></H2>
609 <P>The AppSocket protocol is an 8-bit clean TCP/IP socket connection.
610 The default IP service port is 9100. The URI method name is &quot;socket&quot;. </P>
611 <P>The AppSocket protocol is used by the Hewlett Packard JetDirect
612 network interfaces and print servers, as well as many other vendors'
613 products. See the CUPS Software Administrators Manual for a list of
614 supported products. </P>
615 <H2><A NAME="4_2">4.2 CUPS Browsing Protocol</A></H2>
616 <P>The CUPS Browsing Protocol is a UDP/IP-based broadcast service. By
617 default this service operates on IP service port 631. </P>
618 <P>Each broadcast packet describes the state of a single printer or
619 class and is an ASCII text string of up to 1450 bytes ending with a
620 newline (0x0a). The string is formatted as follows: </P>
621 <UL>
622 <PRE>
623 type SP state SP uri SP &quot;location&quot; SP &quot;info&quot; SP &quot;make-and-model&quot; NL
624 </PRE>
625 </UL>
626 <P><VAR>State, uri, location, info</VAR>, and <VAR>make-and-model</VAR>
627 , correspond to the IPP <CODE>printer-state</CODE>, <CODE>
628 printer-uri-supported</CODE>, <CODE>printer-location</CODE>, <CODE>
629 printer-info</CODE>, and <CODE>printer-make-and-model</CODE>
630 attributes. </P>
631 <P><VAR>Type</VAR> is a hexadecimal number string representing
632 capability/type bits:
633 <CENTER>
634 <TABLE BORDER="1" WIDTH="40%">
635 <TR><TH WIDTH="8%">Bit</TH><TH>Description</TH></TR>
636 <TR><TD>0</TD><TD>0 = printer
637 <BR> 1 = class</TD></TR>
638 <TR><TD>1</TD><TD>0 = local
639 <BR> 1 = remote
640 <BR> (always 1)</TD></TR>
641 <TR><TD>2</TD><TD>1 = can print B</TD></TR>
642 <TR><TD>3</TD><TD>1 = can print color</TD></TR>
643 <TR><TD>4</TD><TD>1 = can duplex</TD></TR>
644 <TR><TD>5</TD><TD>1 = can staple</TD></TR>
645 <TR><TD>6</TD><TD>1 = can do fast copies</TD></TR>
646 <TR><TD>7</TD><TD>1 = can do fast collating</TD></TR>
647 <TR><TD>8</TD><TD>1 = can punch holes</TD></TR>
648 <TR><TD>9</TD><TD>1 = can cover</TD></TR>
649 <TR><TD>10</TD><TD>1 = can bind</TD></TR>
650 <TR><TD>11</TD><TD>1 = can sort</TD></TR>
651 <TR><TD>12</TD><TD>1 = can print up to 9x14 inches</TD></TR>
652 <TR><TD>13</TD><TD>1 = can print up to 18x24 inches</TD></TR>
653 <TR><TD>14</TD><TD>1 = can print up to 36x48 inches</TD></TR>
654 <TR><TD>15</TD><TD>1 = can print variable sizes</TD></TR>
655 </TABLE>
656 </CENTER>
657 </P>
658 <H2><A NAME="4_3">4.3 CUPS Form File</A></H2>
659 <P>CUPS Form files are XML files used by the CUPS <CODE>formtops</CODE>
660 filter to produce dynamic banner pages and support preprinted forms. </P>
661 <P>The MIME type for CUPS Form files is <CODE>application/vnd.cups-form</CODE>
662 . </P>
663 <H3><A NAME="4_3_1">4.3.1 CUPS Form DTD</A></H3>
664 <P>The following DTD describes the available elements and attributes in
665 a CUPS Form file:
666 <CENTER>
667 <TABLE BORDER>
668 <TR><TD>
669 <PRE>
670 &lt;!ENTITY % Angle &quot;CDATA&quot; -- angle in degrees --&gt;
671
672 &lt;!ENTITY % Color &quot;CDATA&quot; -- a color using sRGB: #RRGGBB as Hex values --&gt;
673
674 &lt;!ENTITY % Length &quot;CDATA&quot; -- nn for pixels or nn% for percentage length --&gt;
675
676 &lt;!ENTITY % Lengths &quot;CDATA&quot; -- comma-separated Length values --&gt;
677
678 &lt;!ENTITY % Text &quot;CDATA&quot;&gt;
679
680 &lt;!ENTITY % heading &quot;H1|H2|H3|H4|H5|H6&quot;&gt;
681
682 &lt;!ENTITY % preformatted &quot;PRE&quot;&gt;
683
684 &lt;!ENTITY % i18n
685 &quot;lang %LanguageCode; #IMPLIED -- language code --
686 dir (ltr|rtl) #IMPLIED -- direction for weak/neutral text --&quot;
687 &gt;
688
689 &lt;!ENTITY % attrs &quot;%i18n;&quot;&gt;
690
691 &lt;!ENTITY % fontstyle
692 &quot;B | FONT | I | TT&quot;&gt;
693
694 &lt;!ENTITY % graphics
695 &quot;BOX | RECT | LINE | POLY | ARC | PIE | TEXT&quot;&gt;
696
697 &lt;!ENTITY % insert
698 &quot;IMG | VAR&quot;&gt;
699
700 &lt;!-- %inline; covers inline or &quot;text-level&quot; elements --&gt;
701 &lt;!ENTITY % inline &quot;#PCDATA | %fontstyle; | %graphics; | %insert;&quot;&gt;
702
703 &lt;!ELEMENT (%fontstyle;) - - (%inline;)*&gt;
704 &lt;!ATTLIST (%fontstyle;)
705 %attrs; -- %i18n --
706 &gt;
707
708 &lt;!ELEMENT BR - O EMPTY -- forced line break --&gt;
709 &lt;!ATTLIST BR
710 %attrs; -- %i18n --
711 &gt;
712
713 &lt;!ENTITY % block
714 &quot;P | %heading; | %preformatted;&quot;&gt;
715
716 &lt;!ENTITY % flow &quot;%block; | %inline;&quot;&gt;
717
718 &lt;!ELEMENT PAGE O O (%flow;)+ -- document body --&gt;
719 &lt;!ATTLIST PAGE
720 %attrs; -- %i18n --
721 align (left|center|right) #IMPLIED -- horizontal alignment --
722 valign (top|middle|center|bottom) #IMPLIED -- vertical alignment --
723 &gt;
724
725 &lt;!ELEMENT P - O (%inline;)* -- paragraph --&gt;
726 &lt;!ATTLIST P
727 %attrs; -- %i18n --
728 align (left|center|right) #IMPLIED -- horizontal alignment --
729 &gt;
730
731 &lt;!ELEMENT (%heading;) - - (%inline;)* -- heading --&gt;
732 &lt;!ATTLIST (%heading;)
733 %attrs; -- %i18n --
734 align (left|center|right) #IMPLIED -- horizontal alignment --
735 &gt;
736
737 &lt;!ELEMENT PRE - - (%inline;)* -- preformatted text --&gt;
738 &lt;!ATTLIST PRE
739 %attrs; -- %i18n --
740 align (left|center|right) #IMPLIED -- horizontal alignment --
741 &gt;
742
743 &lt;!ELEMENT BOX - O EMPTY -- unfilled box --&gt;
744 &lt;!ATTLIST BOX
745 color %Color; #IMPLIED -- override color --
746 height %Length; #REQUIRED -- height of box --
747 thickness %Length; #IMPLIED -- override line thickness --
748 width %Length; #REQUIRED -- width of box --
749 x %Length; #REQUIRED -- horizontal position --
750 y %Length; #REQUIRED -- vertical position --
751 &gt;
752
753 &lt;!ELEMENT RECT - O EMPTY -- filled box --&gt;
754 &lt;!ATTLIST RECT
755 color %Color; #IMPLIED -- override color --
756 height %Length; #REQUIRED -- height of box --
757 width %Length; #REQUIRED -- width of box --
758 x %Length; #REQUIRED -- horizontal position --
759 y %Length; #REQUIRED -- vertical position --
760 &gt;
761
762 &lt;!ELEMENT LINE - O EMPTY -- polyline --&gt;
763 &lt;!ATTLIST LINE
764 color %Color; #IMPLIED -- override color --
765 thickness %Length; #IMPLIED -- override line thickness --
766 x %Lengths; #REQUIRED -- horizontal positions --
767 y %Lengths; #REQUIRED -- vertical positions --
768 &gt;
769
770 &lt;!ELEMENT POLY - O EMPTY -- polygon (filled) --&gt;
771 &lt;!ATTLIST POLY
772 color %Color; #IMPLIED -- override color --
773 x %Lengths; #REQUIRED -- horizontal positions --
774 y %Lengths; #REQUIRED -- vertical positions --
775 &gt;
776
777 &lt;!ELEMENT ARC - O EMPTY -- unfilled arc --&gt;
778 &lt;!ATTLIST ARC
779 color %Color; #IMPLIED -- override color --
780 end %Angle; #IMPLIED -- override end angle --
781 height %Length; #REQUIRED -- height of arc --
782 start %Angle; #IMPLIED -- override start angle --
783 thickness %Length; #IMPLIED -- override line thickness --
784 width %Length; #REQUIRED -- width of arc --
785 x %Length; #REQUIRED -- horizontal position --
786 y %Length; #REQUIRED -- vertical position --
787 &gt;
788
789 &lt;!ELEMENT PIE - O EMPTY -- filled arc --&gt;
790 &lt;!ATTLIST PIE
791 color %Color; #IMPLIED -- override color --
792 end %Angle; #IMPLIED -- override end angle --
793 height %Length; #REQUIRED -- height of arc --
794 start %Angle; #IMPLIED -- override start angle --
795 width %Length; #REQUIRED -- width of arc --
796 x %Length; #REQUIRED -- horizontal position --
797 y %Length; #REQUIRED -- vertical position --
798 &gt;
799
800 &lt;!ELEMENT TEXT - - (%flow;)* -- text box --&gt;
801 &lt;!ATTLIST RECT
802 align (left|center|right) #IMPLIED -- horizontal alignment --
803 height %Length; #REQUIRED -- height of box --
804 valign (top|middle|center|bottom) #IMPLIED -- vertical alignment --
805 width %Length; #REQUIRED -- width of box --
806 x %Length; #REQUIRED -- horizontal position --
807 y %Length; #REQUIRED -- vertical position --
808 &gt;
809
810
811 &lt;!ELEMENT IMG - O EMPTY -- Embedded image --&gt;
812 &lt;!ATTLIST IMG
813 %attrs; -- %coreattrs, %i18n, %events --
814 src %URI; #REQUIRED -- URI of image to embed --
815 height %Length; #IMPLIED -- override height --
816 width %Length; #IMPLIED -- override width --
817 &gt;
818
819 &lt;!ELEMENT HEAD O O (DEFVAR)* -- document head --&gt;
820 &lt;!ATTLIST HEAD
821 %i18n; -- lang, dir --
822 &gt;
823
824 &lt;!ELEMENT DEFVAR - O EMPTY -- variable definition --&gt;
825 &lt;!ATTLIST DEFVAR
826 name CDATA #REQUIRED -- name
827 value CDATA #REQUIRED -- value
828 &gt;
829
830
831 &lt;!ENTITY % html.content &quot;HEAD, PAGE&quot;&gt;
832
833 &lt;!ELEMENT CUPSFORM - - (HEAD) (PAGE)+ -- document root element --&gt;
834 &lt;!ATTLIST CUPSFORM
835 %i18n; -- lang, dir --
836 &gt;
837 </PRE>
838 </TD></TR>
839 </TABLE>
840 </CENTER>
841 </P>
842 <H2><A NAME="4_4">4.4 CUPS PostScript File</A></H2>
843 <P>CUPS PostScript files are device-dependent Adobe PostScript program
844 files. The PostScript language is described in the <A HREF="http://partners.adobe.com/asn/developer/PDFS/TN/PLRM.pdf">
845 Adobe PostScript Language Reference Manual, Third Edition</A>. </P>
846 <P>The MIME type for CUPS PostScript files is <CODE>
847 application/vnd.cups-postscript</CODE>. </P>
848 <H2><A NAME="4_5">4.5 CUPS Raster File</A></H2>
849 <P>CUPS raster files are device-dependent raster image files that
850 contain a PostScript page device dictionary and device-dependent raster
851 imagery for each page in the document. These files are used to transfer
852 raster data from the PostScript and image file RIPs to device-dependent
853 filters that convert the raster data to a printable format. </P>
854 <P>A raster file begins with a four byte synchronization word:
855 0x52615374 (&quot;RaSt&quot;) for big-endian architectures and 0x74536152
856 (&quot;tSaR&quot;) for little-endian architectures. The writer of the raster
857 file will use the native word order, and the reader is responsible for
858 detecting a reversed word order file and swapping bytes as needed. The
859 CUPS Image Library raster functions perform this function
860 automatically. </P>
861 <P>Following the synchronization word are a series of raster pages.
862 Each page starts with a page device dictionary header and is followed
863 immediately by the raster data for that page.
864 <CENTER>
865 <TABLE BORDER="1" WIDTH="80%">
866 <TR><TH WIDTH="10%">Bytes</TH><TH WIDTH="20%">Description</TH><TH>Values</TH>
867 </TR>
868 <TR><TD>0-63</TD><TD>MediaClass</TD><TD>Nul-terminated ASCII string</TD></TR>
869 <TR><TD>64-127</TD><TD>MediaColor</TD><TD>Nul-terminated ASCII string</TD>
870 </TR>
871 <TR><TD>128-191</TD><TD>MediaType</TD><TD>Nul-terminated ASCII string</TD>
872 </TR>
873 <TR><TD>192-255</TD><TD>OutputType</TD><TD>Nul-terminated ASCII string</TD>
874 </TR>
875 <TR><TD>256-259</TD><TD>AdvanceDistance</TD><TD>0 to 2<SUP>32</SUP> - 1
876 points</TD></TR>
877 <TR><TD>260-263</TD><TD>AdvanceMedia</TD><TD>0 = Never advance roll
878 <BR> 1 = Advance roll after file
879 <BR> 2 = Advance roll after job
880 <BR> 3 = Advance roll after set
881 <BR> 4 = Advance roll after page</TD></TR>
882 <TR><TD>264-267</TD><TD>Collate</TD><TD>0 = do not collate copies
883 <BR> 1 = collate copies</TD></TR>
884 <TR><TD>268-271</TD><TD>CutMedia</TD><TD>0 = Never cut media
885 <BR> 1 = Cut roll after file
886 <BR> 2 = Cut roll after job
887 <BR> 3 = Cut roll after set
888 <BR> 4 = Cut roll after page</TD></TR>
889 <TR><TD>272-275</TD><TD>Duplex</TD><TD>0 = Print single-sided
890 <BR> 1 = Print double-sided</TD></TR>
891 <TR><TD>276-283</TD><TD>HWResolution</TD><TD>Horizontal and vertical
892 resolution in dots-per-inch.</TD></TR>
893 <TR><TD>284-299</TD><TD>ImagingBoundingBox</TD><TD>Four integers giving
894 the left, bottom, right, and top positions of the page bounding box in
895 points</TD></TR>
896 <TR><TD>300-303</TD><TD>InsertSheet</TD><TD>0 = Do not insert separator
897 sheets
898 <BR> 1 = Insert separator sheets</TD></TR>
899 <TR><TD>304-307</TD><TD>Jog</TD><TD>0 = Do no jog pages
900 <BR> 1 = Jog pages after file
901 <BR> 2 = Jog pages after job
902 <BR> 3 = Jog pages after set</TD></TR>
903 <TR><TD>308-311</TD><TD>LeadingEdge</TD><TD>0 = Top edge is first
904 <BR> 1 = Right edge is first
905 <BR> 2 = Bottom edge is first
906 <BR> 3 = Left edge is first</TD></TR>
907 <TR><TD>312-319</TD><TD>Margins</TD><TD>Left and bottom origin of image
908 in points</TD></TR>
909 <TR><TD>320-323</TD><TD>ManualFeed</TD><TD>0 = Do not manually feed
910 media
911 <BR> 1 = Manually feed media</TD></TR>
912 <TR><TD>324-327</TD><TD>MediaPosition</TD><TD>Input slot position from
913 0 to N</TD></TR>
914 <TR><TD>328-331</TD><TD>MediaWeight</TD><TD>Media weight in grams per
915 meter squared</TD></TR>
916 <TR><TD>332-335</TD><TD>MirrorPrint</TD><TD>0 = Do not mirror prints
917 <BR> 1 = Mirror prints</TD></TR>
918 <TR><TD>336-339</TD><TD>NegativePrint</TD><TD>0 = Do not invert prints
919 <BR> 1 = Invert prints</TD></TR>
920 <TR><TD>340-343</TD><TD>NumCopies</TD><TD>1 to 2<SUP>32</SUP> - 1</TD></TR>
921 <TR><TD>344-347</TD><TD>Orientation</TD><TD>0 = Do not rotate page
922 <BR> 1 = Rotate page counter-clockwise
923 <BR> 2 = Turn page upside down
924 <BR> 3 = Rotate page clockwise</TD></TR>
925 <TR><TD>348-351</TD><TD>OutputFaceUp</TD><TD>0 = Output face down
926 <BR> 1 = Output face up</TD></TR>
927 <TR><TD>352-359</TD><TD>PageSize</TD><TD>Width and length in points</TD></TR>
928 <TR><TD>360-363</TD><TD>Separations</TD><TD>0 = Print composite image
929 <BR> 1 = Print color separations</TD></TR>
930 <TR><TD>364-367</TD><TD>TraySwitch</TD><TD>0 = Do not change trays if
931 selected tray is empty
932 <BR> 1 = Change trays if selected tray is empty</TD></TR>
933 <TR><TD>368-371</TD><TD>Tumble</TD><TD>0 = Do not rotate even pages
934 when duplexing
935 <BR> 1 = Rotate even pages when duplexing</TD></TR>
936 <TR><TD>372-375</TD><TD>cupsWidth</TD><TD>Width of page image in pixels</TD>
937 </TR>
938 <TR><TD>376-379</TD><TD>cupsHeight</TD><TD>Height of page image in
939 pixels</TD></TR>
940 <TR><TD>380-383</TD><TD>cupsMediaType</TD><TD>Driver-specific 0 to 2<SUP>
941 32</SUP> - 1</TD></TR>
942 <TR><TD>384-387</TD><TD>cupsBitsPerColor</TD><TD>1, 2, 4, 8 bits</TD></TR>
943 <TR><TD>388-391</TD><TD>cupsBitsPerPixel</TD><TD>1 to 32 bits</TD></TR>
944 <TR><TD>392-395</TD><TD>cupsBytesPerLine</TD><TD>1 to 2<SUP>32</SUP> -
945 1 bytes</TD></TR>
946 <TR><TD>396-399</TD><TD>cupsColorOrder</TD><TD>0 = chunky pixels (CMYK
947 CMYK CMYK)
948 <BR> 1 = banded pixels (CCC MMM YYY KKK)
949 <BR> 2 = planar pixels (CCC... MMM... YYY... KKK...)</TD></TR>
950 <TR><TD>400-403</TD><TD>cupsColorSpace</TD><TD>0 = white
951 <BR> 1 = RGB
952 <BR> 2 = RGBA
953 <BR> 3 = black
954 <BR> 4 = CMY
955 <BR> 5 = YMC
956 <BR> 6 = CMYK
957 <BR> 7 = YMCK
958 <BR> 8 = KCMY
959 <BR> 9 = KCMYcm</TD></TR>
960 <TR><TD>404-407</TD><TD>cupsCompression</TD><TD>Driver-specific 0 to 2<SUP>
961 32</SUP> - 1</TD></TR>
962 <TR><TD>408-411</TD><TD>cupsRowCount</TD><TD>Driver-specific 0 to 2<SUP>
963 32</SUP> - 1</TD></TR>
964 <TR><TD>412-415</TD><TD>cupsRowFeed</TD><TD>Driver-specific 0 to 2<SUP>
965 32</SUP> - 1</TD></TR>
966 <TR><TD>416-419</TD><TD>cupsRowStep</TD><TD>Driver-specific 0 to 2<SUP>
967 32</SUP> - 1</TD></TR>
968 </TABLE>
969 </CENTER>
970 </P>
971 <P>The MIME type for CUPS Raster files is <CODE>
972 application/vnd.cups-raster</CODE>. </P>
973 <H2><A NAME="4_6">4.6 CUPS Raw Files</A></H2>
974 <P>Raw files are printer-dependent print files that are in a format
975 suitable to the destination printer (e.g. HP-PCL, HP-RTL, etc.) The
976 MIME type for CUPS Raw files is <CODE>application/vnd.cups-raw</CODE>. </P>
977 <H2><A NAME="4_7">4.7 Internet Printing Protocol</A></H2>
978 <P>The Internet Printing Protocol and the CUPS extensions to it are
979 described in the CUPS Implementation of IPP document. </P>
980 <H2><A NAME="4_8">4.8 Line Printer Daemon Protocol</A></H2>
981 <P>The Line Printer Daemon (LPD) protocol is described by <A HREF="http://www.ietf.org/rfc/rfc1179.txt">
982 RFC 1179: Line Printer Daemon Protocol</A>. </P>
983 <P>The URI method name for LPD is &quot;lpd&quot;. </P>
984 <H2><A NAME="4_9">4.9 Server Message Block Protocol</A></H2>
985 <P>The Server Message Block (SMB) and related Common Internet File
986 System (CIFS) protocols are described at <A HREF="http://anu.samba.org/cifs">
987 http://anu.samba.org/cifs</A>. </P>
988 <P>The URI method name for SMB is &quot;smb&quot;. Support for this protocol is
989 provided via the SAMBA <CODE>smbspool(1)</CODE> program provided with
990 SAMBA 2.0.6 and higher. </P>
991 <H1><A NAME="5">5 Directories</A></H1>
992 <DL>
993 <DT>/etc/cups </DT>
994 <DD>The scheduler configuration and MIME files reside here. </DD>
995 <DT>/etc/cups/certs </DT>
996 <DD>The authentication certificates reside here. </DD>
997 <DT>/etc/cups/interfaces </DT>
998 <DD>System V interface scripts reside here. </DD>
999 <DT>/etc/cups/ppd </DT>
1000 <DD>This directory contains PPD files for each printer. </DD>
1001 <DT>/usr/bin </DT>
1002 <DD>The <CODE>cancel</CODE>, <CODE>lp</CODE>, <CODE>lpq</CODE>, <CODE>
1003 lpr</CODE>, <CODE>lprm</CODE>, and <CODE>lpstat</CODE> commands
1004 reside here. </DD>
1005 <DT>/usr/lib, /usr/lib32 </DT>
1006 <DD>The shared libraries (DSOs) reside here. </DD>
1007 <DT>/usr/lib/cups/backend </DT>
1008 <DD>The backend filters reside here. </DD>
1009 <DT>/usr/lib/cups/cgi-bin </DT>
1010 <DD>The CGI programs reside here. </DD>
1011 <DT>/usr/lib/cups/daemon </DT>
1012 <DD>The polling and LPD daemons reside here. </DD>
1013 <DT>/usr/lib/cups/filter </DT>
1014 <DD>The file filters reside here. </DD>
1015 <DT>/usr/sbin </DT>
1016 <DD>The <CODE>accept</CODE>, <CODE>cupsd</CODE>, <CODE> lpadmin</CODE>, <CODE>
1017 lpc</CODE>, and <CODE>reject</CODE> commands reside here. </DD>
1018 <DT>/usr/share/cups </DT>
1019 <DD>This is the root directory of the CUPS static data. </DD>
1020 <DT>/usr/share/cups/charsets </DT>
1021 <DD>The character set files reside here. </DD>
1022 <DT>/usr/share/cups/data </DT>
1023 <DD>The filter data files reside here. </DD>
1024 <DT>/usr/share/cups/fonts </DT>
1025 <DD>The <CODE>pstoraster</CODE> font files reside here. </DD>
1026 <DT>/usr/share/cups/model </DT>
1027 <DD>The sample PPD files reside here. </DD>
1028 <DT>/usr/share/cups/pstoraster </DT>
1029 <DD>The <CODE>pstoraster</CODE> data files reside here. </DD>
1030 <DT>/usr/share/doc/cups </DT>
1031 <DD>The scheduler documentation files reside here. </DD>
1032 <DT>/var/log/cups </DT>
1033 <DD>The <CODE>access_log</CODE>, <CODE>error_log</CODE>, and <CODE>
1034 page_log</CODE> files reside here. </DD>
1035 <DT>/var/spool/cups </DT>
1036 <DD>This directory contains print job files. </DD>
1037 </DL>
1038 <H1 TYPE="A" VALUE="1"><A NAME="6">A Glossary</A></H1>
1039 <H2><A NAME="6_1">A.1 Terms</A></H2>
1040 <DL>
1041 <DT>C </DT>
1042 <DD>A computer language. </DD>
1043 <DT>parallel </DT>
1044 <DD>Sending or receiving data more than 1 bit at a time. </DD>
1045 <DT>pipe </DT>
1046 <DD>A one-way communications channel between two programs. </DD>
1047 <DT>serial </DT>
1048 <DD>Sending or receiving data 1 bit at a time. </DD>
1049 <DT>socket </DT>
1050 <DD>A two-way network communications channel. </DD>
1051 </DL>
1052 <H2><A NAME="6_2">A.2 Acronyms</A></H2>
1053 <DL>
1054 <DT>ASCII </DT>
1055 <DD>American Standard Code for Information Interchange </DD>
1056 <DT>CUPS </DT>
1057 <DD>Common UNIX Printing System </DD>
1058 <DT>ESC/P </DT>
1059 <DD>EPSON Standard Code for Printers </DD>
1060 <DT>FTP </DT>
1061 <DD>File Transfer Protocol </DD>
1062 <DT>HP-GL </DT>
1063 <DD>Hewlett-Packard Graphics Language </DD>
1064 <DT>HP-PCL </DT>
1065 <DD>Hewlett-Packard Page Control Language </DD>
1066 <DT>HP-PJL </DT>
1067 <DD>Hewlett-Packard Printer Job Language </DD>
1068 <DT>IETF </DT>
1069 <DD>Internet Engineering Task Force </DD>
1070 <DT>IPP </DT>
1071 <DD>Internet Printing Protocol </DD>
1072 <DT>ISO </DT>
1073 <DD>International Standards Organization </DD>
1074 <DT>LPD </DT>
1075 <DD>Line Printer Daemon </DD>
1076 <DT>MIME </DT>
1077 <DD>Multimedia Internet Mail Exchange </DD>
1078 <DT>PPD </DT>
1079 <DD>PostScript Printer Description </DD>
1080 <DT>SMB </DT>
1081 <DD>Server Message Block </DD>
1082 <DT>TFTP </DT>
1083 <DD>Trivial File Transfer Protocol </DD>
1084 </DL>
1085 </BODY>
1086 </HTML>