]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 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 Translation Guide</TITLE> | |
5 | <META NAME="author" CONTENT="Easy Software Products"> | |
6 | <META NAME="copyright" CONTENT="Copyright 2001-2002, All Rights Reserved"> | |
7 | <META NAME="docnumber" CONTENT="CUPS-TRANS-1.2"> | |
8 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-8859-1"> | |
9 | <STYLE TYPE="text/css"><!-- | |
10 | BODY { font-family: serif } | |
11 | H1 { font-family: sans-serif } | |
12 | H2 { font-family: sans-serif } | |
13 | H3 { font-family: sans-serif } | |
14 | H4 { font-family: sans-serif } | |
15 | H5 { font-family: sans-serif } | |
16 | H6 { font-family: sans-serif } | |
17 | SUB { font-size: smaller } | |
18 | SUP { font-size: smaller } | |
19 | PRE { font-family: monospace } | |
20 | --></STYLE> | |
21 | </HEAD> | |
22 | <BODY> | |
23 | <CENTER><A HREF="#CONTENTS"><IMG SRC="images/cups-large.gif" BORDER="0" WIDTH="431" HEIGHT="511"><BR> | |
24 | <H1>CUPS Translation Guide</H1></A><BR> | |
25 | CUPS-TRANS-1.2<BR> | |
26 | Easy Software Products<BR> | |
27 | Copyright 2001-2002, 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 Character Sets</A></B> | |
44 | <BR> | |
45 | <BR><B><A HREF="#4">4 Message Catalogs</A></B> | |
46 | <BR> | |
47 | <BR><B><A HREF="#5">5 Web Interfaces</A></B> | |
48 | <UL> | |
49 | <LI><A HREF="#5_1">5.1 Template Files</A></LI> | |
50 | <UL> | |
51 | <LI><A HREF="#5_1_1">5.1.1 Inserting Attributes and Values</A></LI> | |
52 | <LI><A HREF="#5_1_2">5.1.2 Array Substitutions</A></LI> | |
53 | <LI><A HREF="#5_1_3">5.1.3 Conditional Tests</A></LI> | |
54 | <LI><A HREF="#5_1_4">5.1.4 Template File List</A></LI> | |
55 | </UL> | |
56 | <LI><A HREF="#5_2">5.2 CGI Programs</A></LI> | |
57 | <UL> | |
58 | <LI><A HREF="#5_2_1">5.2.1 admin.cgi</A></LI> | |
59 | <LI><A HREF="#5_2_2">5.2.2 classes.cgi</A></LI> | |
60 | <LI><A HREF="#5_2_3">5.2.3 jobs.cgi</A></LI> | |
61 | <LI><A HREF="#5_2_4">5.2.4 printers.cgi</A></LI> | |
62 | </UL> | |
63 | </UL> | |
64 | <B><A HREF="#6">A Glossary</A></B> | |
65 | <UL> | |
66 | <LI><A HREF="#6_1">A.1 Terms</A></LI> | |
67 | <LI><A HREF="#6_2">A.2 Acronyms</A></LI> | |
68 | </UL> | |
69 | <HR> | |
70 | <H1><A NAME="1">1 Scope</A></H1> | |
71 | <H2><A NAME="1_1">1.1 Identification</A></H2> | |
72 | <P>This translation guide provides instructions for creating | |
73 | translations of the CUPS message catalogs and web pages for the Common | |
74 | UNIX Printing System ("CUPS") Version 1.2 software.</P> | |
75 | <H2><A NAME="1_2">1.2 System Overview</A></H2> | |
76 | <P>CUPS provides a portable printing layer for UNIX®-based operating | |
77 | systems. It has been developed by<A HREF="http://www.easysw.com"> Easy | |
78 | Software Products</A> to promote a standard printing solution for all | |
79 | UNIX vendors and users. CUPS provides the System V and Berkeley | |
80 | command-line interfaces.</P> | |
81 | <P>CUPS uses the Internet Printing Protocol ("IPP") as the basis for | |
82 | managing print jobs and queues. The Line Printer Daemon ("LPD") Server | |
83 | Message Block ("SMB"), and AppSocket (a.k.a. JetDirect) protocols are | |
84 | also supported with reduced functionality. CUPS adds network printer | |
85 | browsing and PostScript Printer Description ("PPD") based printing | |
86 | options to support real-world printing under UNIX.</P> | |
87 | <P>CUPS also includes a customized version of GNU Ghostscript (currently | |
88 | based off GNU Ghostscript 5.50) and an image file RIP that are used to | |
89 | support non-PostScript printers. Sample drivers for HP and EPSON | |
90 | printers are included that use these filters.</P> | |
91 | <H2><A NAME="1_3">1.3 Document Overview</A></H2> | |
92 | <P>This translation guide is organized into the following sections:</P> | |
93 | <UL> | |
94 | <LI>1 - Scope</LI> | |
95 | <LI>2 - References</LI> | |
96 | <LI>3 - Character Sets</LI> | |
97 | <LI>4 - Message Catalogs</LI> | |
98 | <LI>5 - Web Interfaces</LI> | |
99 | <LI>A - Glossary</LI> | |
100 | </UL> | |
101 | <H1><A NAME="2">2 References</A></H1> | |
102 | <H2><A NAME="2_1">2.1 CUPS Documentation</A></H2> | |
103 | <P>The following CUPS documentation is referenced by this document:</P> | |
104 | <UL> | |
105 | <LI>CUPS-CMP-1.2: CUPS Configuration Management Plan</LI> | |
106 | <LI>CUPS-IDD-1.2: CUPS System Interface Design Description</LI> | |
107 | <LI>CUPS-IPP-1.2: CUPS Implementation of IPP</LI> | |
108 | <LI>CUPS-SAM-1.2.x: CUPS Software Administrators Manual</LI> | |
109 | <LI>CUPS-SDD-1.2: CUPS Software Design Description</LI> | |
110 | <LI>CUPS-SPM-1.2.x: CUPS Software Programming Manual</LI> | |
111 | <LI>CUPS-SSR-1.2: CUPS Software Security Report</LI> | |
112 | <LI>CUPS-STP-1.2: CUPS Software Test Plan</LI> | |
113 | <LI>CUPS-SUM-1.2.x: CUPS Software Users Manual</LI> | |
114 | <LI>CUPS-SVD-1.2: CUPS Software Version Description</LI> | |
115 | </UL> | |
116 | <H2><A NAME="2_2">2.2 Other Documents</A></H2> | |
117 | <P>The following non-CUPS documents are referenced by this document:</P> | |
118 | <UL> | |
119 | <LI><A HREF="http://partners.adobe.com/asn/developer/PDFS/TN/5003.PPD_Spec_v4.3.pdf"> | |
120 | Adobe PostScript Printer Description File Format Specification, Version | |
121 | 4.3.</A></LI> | |
122 | <LI><A HREF="http://partners.adobe.com/asn/developer/PDFS/TN/PLRM.pdf"> | |
123 | Adobe PostScript Language Reference, Third Edition.</A></LI> | |
124 | <LI>IPP: Job and Printer Set Operations</LI> | |
125 | <LI>IPP/1.1: Encoding and Transport</LI> | |
126 | <LI>IPP/1.1: Implementers Guide</LI> | |
127 | <LI>IPP/1.1: Model and Semantics</LI> | |
128 | <LI><A HREF="http://www.ietf.org/rfc/rfc1179.txt">RFC 1179, Line Printer | |
129 | Daemon Protocol</A></LI> | |
130 | <LI><A HREF="http://www.ietf.org/rfc/rfc2567.txt">RFC 2567, Design Goals | |
131 | for an Internet Printing Protocol</A></LI> | |
132 | <LI><A HREF="http://www.ietf.org/rfc/rfc2568.txt">RFC 2568, Rationale | |
133 | for the Structure of the Model and Protocol for the Internet Printing | |
134 | Protocol</A></LI> | |
135 | <LI><A HREF="http://www.ietf.org/rfc/rfc2569.txt">RFC 2569, Mapping | |
136 | between LPD and IPP Protocols</A></LI> | |
137 | <LI><A HREF="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616, Hypertext | |
138 | Transfer Protocol -- HTTP/1.1</A></LI> | |
139 | <LI><A HREF="http://www.ietf.org/rfc/rfc2617.txt">RFC 2617, HTTP | |
140 | Authentication: Basic and Digest Access</A> Authentication</LI> | |
141 | </UL> | |
142 | <H1><A NAME="3">3 Character Sets</A></H1> | |
143 | <P>CUPS uses character set files to define the mapping of local | |
144 | character sets to Unicode code points, as well as the fonts that should | |
145 | be used for different ranges of characters.</P> | |
146 | <P>CUPS includes files for common 8-bit encodings as well as UTF-8 for | |
147 | Unicode text. The format of these files is described in the CUPS | |
148 | Interface Design Description (IDD) document. Current character sets are | |
149 | enumerated in the CUPS API, so in order to add a new character set you | |
150 | must patch the CUPS source as well as provide a new charset file.</P> | |
151 | <P>CUPS 1.2 supports the following character sets:</P> | |
152 | <UL> | |
153 | <LI>iso-8859-1</LI> | |
154 | <LI>iso-8859-2</LI> | |
155 | <LI>iso-8859-3</LI> | |
156 | <LI>iso-8859-4</LI> | |
157 | <LI>iso-8859-5</LI> | |
158 | <LI>iso-8859-6</LI> | |
159 | <LI>iso-8859-7</LI> | |
160 | <LI>iso-8859-8</LI> | |
161 | <LI>iso-8859-9</LI> | |
162 | <LI>iso-8859-10</LI> | |
163 | <LI>iso-8859-13</LI> | |
164 | <LI>iso-8859-14</LI> | |
165 | <LI>iso-8859-15</LI> | |
166 | <LI>koi8-r</LI> | |
167 | <LI>koi8-u</LI> | |
168 | <LI>us-ascii</LI> | |
169 | <LI>utf-8</LI> | |
170 | <LI>windows-874</LI> | |
171 | <LI>windows-1250</LI> | |
172 | <LI>windows-1251</LI> | |
173 | <LI>windows-1252</LI> | |
174 | <LI>windows-1253</LI> | |
175 | <LI>windows-1254</LI> | |
176 | <LI>windows-1255</LI> | |
177 | <LI>windows-1256</LI> | |
178 | <LI>windows-1257</LI> | |
179 | <LI>windows-1258</LI> | |
180 | </UL> | |
181 | <H1><A NAME="4">4 Message Catalogs</A></H1> | |
182 | <P>CUPS message catalogs are text files that identify the default | |
183 | character set for the locale and a list of localized message strings | |
184 | for the CUPS software. The format of the message catalog files is | |
185 | described in the CUPS IDD.</P> | |
186 | <P>Message catalogs are named<VAR> cups_ll</VAR>,<VAR> cups_ll_CC</VAR>, | |
187 | or<VAR> cups_ll_CC.charset</VAR>, where "ll" is the standard 2-letter | |
188 | abbreviation for the language, "CC" is the standard 2-letter | |
189 | abbreviation for the country, and "charset" is the charset name which | |
190 | may differ from the list above.</P> | |
191 | <P>Each message catalog file is stored in a subdirectory named<VAR> ll</VAR> | |
192 | ,<VAR> ll_CC</VAR>, or<VAR> ll_CC.charset</VAR> to match the trailing | |
193 | portion of the message catalog filename.</P> | |
194 | <P>When translating a new message catalog, copy the<VAR> cups_C</VAR> | |
195 | message catalog file to a new subdirectory; to translate the message | |
196 | catalog to Canadian French, you would type the following commands:</P> | |
197 | <UL> | |
198 | <PRE> | |
199 | <KBD>cd locale <I>ENTER</I></KBD> | |
200 | <KBD>mkdir fr_CA <I>ENTER</I></KBD> | |
201 | <KBD>cp C/cups_C fr_CA/cups_fr_CA <I>ENTER</I></KBD> | |
202 | </PRE> | |
203 | </UL> | |
204 | <P>Alternatively, you could copy the existing<VAR> cups_fr</VAR> message | |
205 | catalog and then make any changes necessary.</P> | |
206 | <P>Once you have make your copy of the file, edit it using your favorite | |
207 | text editor to translate the text to the desired language. Be sure to | |
208 | preserve any numbers starting in the first column, as they indicate a | |
209 | new message number - you'll see this for the HTTP status messages.</P> | |
210 | <P>Finally, add your locale to the list of locales in the makefile and | |
211 | run the following command to install it:</P> | |
212 | <UL> | |
213 | <PRE> | |
214 | <KBD>make install <I>ENTER</I></KBD> | |
215 | </PRE> | |
216 | </UL> | |
217 | <H1><A NAME="5">5 Web Interfaces</A></H1> | |
218 | <P>The CUPS scheduler provides a web interface that can be used to do | |
219 | many common printing and administration tasks. The built-in web server | |
220 | supports localization of web pages through the use of subdirectories | |
221 | for each locale, e.g. "fr" for French, "de" for German, "fr_ca" for | |
222 | French in Canada, and so forth.</P> | |
223 | <H2><A NAME="5_1">5.1 Template Files</A></H2> | |
224 | <P>Template files are HTML files with special formatting characters in | |
225 | them that allow substition of variables and arrays. The CUPS CGI | |
226 | programs (<CODE>admin.cgi</CODE>, <CODE>classes.cgi</CODE>, <CODE> | |
227 | jobs.cgi</CODE>, and <CODE>printers.cgi</CODE>) use these template file | |
228 | to provide dynamic content for the web interface. Template files are | |
229 | installed in the<VAR> /usr/share/cups/templates</VAR> directory by | |
230 | default.</P> | |
231 | <P>Translated versions of the template files should be installed in the | |
232 | appropriate subdirectories under<VAR> /usr/share/cups/templates</VAR>. | |
233 | For example, Canadian French template files should be stored in the<VAR> | |
234 | /usr/share/cups/templates/fr_CA</VAR> directory.</P> | |
235 | <H3><A NAME="5_1_1">5.1.1 Inserting Attributes and Values</A></H3> | |
236 | <P>Template files consist of HTML with variable substitutions for named | |
237 | inside curley braces "{name}". Variable names are generally the IPP | |
238 | attribute names with the hyphen ("-") replaced by the underscore ("_") | |
239 | character. For example, the <TT>job-printer-uri</TT> attribute is | |
240 | renamed to <TT>job_printer_uri</TT>.</P> | |
241 | <P>Curley braces ("{" and "}") to indicate substitutions, and the | |
242 | backslash ("\") character for quoting. To insert any of these special | |
243 | characters as-is you need to use the HTML <CODE>&name;</CODE> mechanism | |
244 | or prefix each special character with the backslash ("\".)</P> | |
245 | <P>You substitute the value of a variable using <CODE>{NAME}</CODE> in | |
246 | your template file. If the variable is undefined then the <CODE>{NAME}</CODE> | |
247 | string is output as-is.</P> | |
248 | <P>To substitute an empty string if the variable is undefined, use <CODE> | |
249 | {?NAME}</CODE> instead.</P> | |
250 | <H3><A NAME="5_1_2">5.1.2 Array Substitutions</A></H3> | |
251 | <P>The number of array elements can be inserted using <CODE>{#NAME}</CODE> | |
252 | . If the array is undefined then 0 is output. The current array element | |
253 | (starting at 1) is inserted with <CODE>{#}</CODE>.</P> | |
254 | <P>Arrays are handled using <CODE>{[NAME]</CODE> at the beginning of a | |
255 | section and <CODE>}</CODE> at the end. The information between the | |
256 | closing bracket ("]") and closing brace ("}") is repeated for as many | |
257 | elements as are in the named array. For example, the following template | |
258 | will display a list of each job in the <CODE>job_id</CODE> array:</P> | |
259 | <UL> | |
260 | <PRE> | |
261 | <TABLE> | |
262 | <TR> | |
263 | <TH>Job ID</TH> | |
264 | <TH>Destination</TH> | |
265 | <TH>Title</TH> | |
266 | </TR> | |
267 | ||
268 | {[job_id] | |
269 | <TR> | |
270 | <TD>{?job_id}</TD> | |
271 | <TD>{?job_printer_name}</TD> | |
272 | <TD>{?job_name}</TD> | |
273 | </TR> | |
274 | } | |
275 | </TABLE> | |
276 | </PRE> | |
277 | </UL> | |
278 | <P>Arrays can be nested, however all elements within the curley braces | |
279 | ("{" and "}") are indexed using the innermost array.</P> | |
280 | <H3><A NAME="5_1_3">5.1.3 Conditional Tests</A></H3> | |
281 | <P>Templates can also test variables against specific values and | |
282 | conditionally include text in the template. The format is:</P> | |
283 | <UL> | |
284 | <PRE> | |
285 | {<I>variable</I>?<I>true</I>:<I>false</I>} | |
286 | {<I>variable</I>=<I>value</I>?<I>true</I>:<I>false</I>} | |
287 | {<I>variable</I>!<I>value</I>?<I>true</I>:<I>false</I>} | |
288 | {<I>variable</I><<I>value</I>?<I>true</I>:<I>false</I>} | |
289 | {<I>variable</I>><I>value</I>?<I>true</I>:<I>false</I>} | |
290 | </PRE> | |
291 | </UL> | |
292 | <P>where<VAR> true</VAR> is the text that is included if the condition | |
293 | is true and<VAR> false</VAR> is the text that is included if the | |
294 | condition is false. A value of <CODE>#</CODE> is replaced with the | |
295 | current element number (starting at 1.)</P> | |
296 | <P>The character after the variable name specifies the condition to | |
297 | test: | |
298 | <CENTER> | |
299 | <TABLE BORDER="1"> | |
300 | <TR><TH WIDTH="5%">Char</TH><TH WIDTH="50%">Condition</TH></TR> | |
301 | <TR><TD>?</TD><TD>True if<VAR> variable</VAR> exists.</TD></TR> | |
302 | <TR><TD>=</TD><TD>True if<VAR> variable</VAR> is equal to<VAR> value</VAR> | |
303 | .</TD></TR> | |
304 | <TR><TD>!</TD><TD>True if<VAR> variable</VAR> is not equal to<VAR> value</VAR> | |
305 | .</TD></TR> | |
306 | <TR><TD><</TD><TD>True if<VAR> variable</VAR> is less than<VAR> value</VAR> | |
307 | .</TD></TR> | |
308 | <TR><TD>></TD><TD>True if<VAR> variable</VAR> is greater than<VAR> value</VAR> | |
309 | .</TD></TR> | |
310 | </TABLE> | |
311 | </CENTER> | |
312 | </P> | |
313 | <H3><A NAME="5_1_4">5.1.4 Template File List</A></H3> | |
314 | <P>The following template files are used by the web interface:</P> | |
315 | <DL> | |
316 | <DT>add-class.tmpl</DT> | |
317 | <DD>This is the initial form that is shown to add a new printer class.</DD> | |
318 | <DT>add-printer.tmpl</DT> | |
319 | <DD>This is the initial form that is shown to add a new printer.</DD> | |
320 | <DT>admin-op.tmpl</DT> | |
321 | <DD>This is the template that is used to display an error message when | |
322 | the admin interface sees an undefined operation name.</DD> | |
323 | <DT>admin.tmpl</DT> | |
324 | <DD>This is the template that shows the initial menu of operations (add | |
325 | a class, manage classes, etc.)</DD> | |
326 | <DT>choose-device.tmpl</DT> | |
327 | <DD>This is the form that shows the list of available devices.</DD> | |
328 | <DT>choose-make.tmpl</DT> | |
329 | <DD>This is the form that shows the list of available manufacturers.</DD> | |
330 | <DT>choose-members.tmpl</DT> | |
331 | <DD>This is the form that shows the list of available printers that can | |
332 | be added to a class.</DD> | |
333 | <DT>choose-model.tmpl</DT> | |
334 | <DD>This is the form that shows the list of available printer | |
335 | models/drivers.</DD> | |
336 | <DT>choose-serial.tmpl</DT> | |
337 | <DD>This is the form that allows the user to choose a serial port and | |
338 | any options.</DD> | |
339 | <DT>choose-uri.tmpl</DT> | |
340 | <DD>This is the form that allows the user to enter a device URI for | |
341 | network printers.</DD> | |
342 | <DT>class-added.tmpl</DT> | |
343 | <DD>This template shows the "class added" message.</DD> | |
344 | <DT>class-confirm.tmpl</DT> | |
345 | <DD>This is the template used to confirm the deletion of a class.</DD> | |
346 | <DT>class-deleted.tmpl</DT> | |
347 | <DD>This template shows the "class deleted" message.</DD> | |
348 | <DT>classes.tmpl</DT> | |
349 | <DD>This template shows one or more printer classes.</DD> | |
350 | <DT>class-modified.tmpl</DT> | |
351 | <DD>This template shows the "class modified" message.</DD> | |
352 | <DT>config-printer.tmpl</DT> | |
353 | <DD>This template starts the printer configuration form.</DD> | |
354 | <DT>config-printer2.tmpl</DT> | |
355 | <DD>This template ends the printer configuration form.</DD> | |
356 | <DT>error.tmpl</DT> | |
357 | <DD>This template displays a generic error message.</DD> | |
358 | <DT>header.tmpl</DT> | |
359 | <DD>This template is used as the standard header on all dynamic content.</DD> | |
360 | <DT>job-cancel.tmpl</DT> | |
361 | <DD>This template shows "job cancelled".</DD> | |
362 | <DT>job-hold.tmpl</DT> | |
363 | <DD>This template shows "job held".</DD> | |
364 | <DT>job-op.tmpl</DT> | |
365 | <DD>This is the template that is used to display an error message when | |
366 | the job interface sees an undefined operation name.</DD> | |
367 | <DT>job-release.tmpl</DT> | |
368 | <DD>This template shows "job released".</DD> | |
369 | <DT>job-restart.tmpl</DT> | |
370 | <DD>This template shows "job restarted".</DD> | |
371 | <DT>jobs.tmpl</DT> | |
372 | <DD>This template is used to list the print jobs on a server, class, or | |
373 | printer.</DD> | |
374 | <DT>modify-class.tmpl</DT> | |
375 | <DD>This template is used as the first form when modifying a class.</DD> | |
376 | <DT>modify-printer.tmpl</DT> | |
377 | <DD>This template is used as the first form when modifying a printer.</DD> | |
378 | <DT>option-boolean.tmpl</DT> | |
379 | <DD>This template is used to select a boolean PPD option.</DD> | |
380 | <DT>option-header.tmpl</DT> | |
381 | <DD>This template is used to start a PPD option group.</DD> | |
382 | <DT>option-pickmany.tmpl</DT> | |
383 | <DD>This template is used to select a multi-valued PPD option.</DD> | |
384 | <DT>option-pickone.tmpl</DT> | |
385 | <DD>This template is used to select a single-valued PPD option.</DD> | |
386 | <DT>option-trailer.tmpl</DT> | |
387 | <DD>This template is used to end a PPD option group.</DD> | |
388 | <DT>printer-accept.tmpl</DT> | |
389 | <DD>This template shows "printer now accepting jobs".</DD> | |
390 | <DT>printer-added.tmpl</DT> | |
391 | <DD>This template shows "printer added".</DD> | |
392 | <DT>printer-configured.tmpl</DT> | |
393 | <DD>This template shows "printer configured".</DD> | |
394 | <DT>printer-confirm.tmpl</DT> | |
395 | <DD>This template asks the user to confirm the deletion of a printer.</DD> | |
396 | <DT>printer-deleted.tmpl</DT> | |
397 | <DD>This template shows "printer deleted".</DD> | |
398 | <DT>printer-modified.tmpl</DT> | |
399 | <DD>This template shows "printer modified".</DD> | |
400 | <DT>printer-purge.tmpl</DT> | |
401 | <DD>This template shows "printer has been purged of all jobs".</DD> | |
402 | <DT>printer-reject.tmpl</DT> | |
403 | <DD>This template shows "printer now rejecting jobs".</DD> | |
404 | <DT>printer-start.tmpl</DT> | |
405 | <DD>This template shows "printer started".</DD> | |
406 | <DT>printers.tmpl</DT> | |
407 | <DD>This template is used to list information on one or more printers.</DD> | |
408 | <DT>printer-stop.tmpl</DT> | |
409 | <DD>This template shows "printer stopped".</DD> | |
410 | <DT>test-page.tmpl</DT> | |
411 | <DD>This template shows "test page printed".</DD> | |
412 | <DT>trailer.tmpl</DT> | |
413 | <DD>This template is used as the standard trailer on all dynamic | |
414 | content.</DD> | |
415 | </DL> | |
416 | <H2><A NAME="5_2">5.2 CGI Programs</A></H2> | |
417 | <P>CUPS uses four CGI programs to manage the dynamic web interfaces:</P> | |
418 | <UL> | |
419 | <LI><CODE>admin.cgi</CODE></LI> | |
420 | <LI><CODE>classes.cgi</CODE></LI> | |
421 | <LI><CODE>jobs.cgi</CODE></LI> | |
422 | <LI><CODE>printers.cgi</CODE></LI> | |
423 | </UL> | |
424 | <H3><A NAME="5_2_1">5.2.1 admin.cgi</A></H3> | |
425 | <P>The <CODE>admin.cgi</CODE> program handles all of the printer and | |
426 | class administration functions and is run for all direct accesses to | |
427 | the<VAR> /admin</VAR> resource. For most operations it uses the <CODE> | |
428 | PRINTER_NAME</CODE> and <CODE>OP</CODE> form variables to specify the | |
429 | action requested.</P> | |
430 | <P>The following <CODE>OP</CODE> values are supported:</P> | |
431 | <DL> | |
432 | <DT>accept-jobs</DT> | |
433 | <DD>Accepts jobs on the named destination.</DD> | |
434 | <DT>add-class</DT> | |
435 | <DD>Adds a new printer class. This operation also adds several other | |
436 | form variables: | |
437 | <DL> | |
438 | <DT>MEMBER_URIS</DT> | |
439 | <DD>Sets the members of the class. Multiple <CODE>MEMBER_URIS</CODE> | |
440 | values can be provided.</DD> | |
441 | <DT>PRINTER_INFO</DT> | |
442 | <DD>Sets the printer-info attribute for the printer class, which is | |
443 | usually the printer description.</DD> | |
444 | <DT>PRINTER_LOCATION</DT> | |
445 | <DD>Sets the printer-location attribute for the printer class.</DD> | |
446 | </DL> | |
447 | </DD> | |
448 | <DT>add-printer</DT> | |
449 | <DD>Adds a new printer. This operation also adds several other form | |
450 | variables: | |
451 | <DL> | |
452 | <DT>BAUDRATE</DT> | |
453 | <DD>Sets the baud rate for serial devices.</DD> | |
454 | <DT>BITS</DT> | |
455 | <DD>Sets the number of data bits for serial devices.</DD> | |
456 | <DT>DEVICE_URI</DT> | |
457 | <DD>Sets the device URI for the printer.</DD> | |
458 | <DT>FLOW</DT> | |
459 | <DD>Sets the flow control for serial devices.</DD> | |
460 | <DT>PARITY</DT> | |
461 | <DD>Sets the parity checking for serial devices.</DD> | |
462 | <DT>PPD_NAME</DT> | |
463 | <DD>Sets the driver name for the printer ("raw" for a raw queue.)</DD> | |
464 | <DT>PRINTER_INFO</DT> | |
465 | <DD>Sets the printer-info attribute for the printer, which is usually | |
466 | the printer description.</DD> | |
467 | <DT>PRINTER_LOCATION</DT> | |
468 | <DD>Sets the printer-location attribute for the printer.</DD> | |
469 | </DL> | |
470 | </DD> | |
471 | <DT>config-printer</DT> | |
472 | <DD>Configures an existing printer. This operation uses form variables | |
473 | of the same name as the options in the printer's PPD file.</DD> | |
474 | <DT>delete-class</DT> | |
475 | <DD>Deletes a printer class. The form variable <CODE>CONFIRM</CODE> may | |
476 | be set to any value to bypass the confirmation page.</DD> | |
477 | <DT>delete-printer</DT> | |
478 | <DD>Deletes a printer. The form variable <CODE>CONFIRM</CODE> may be set | |
479 | to any value to bypass the confirmation page.</DD> | |
480 | <DT>modify-class</DT> | |
481 | <DD>Modifies a printer class. See the add-class operation for a list of | |
482 | form variables.</DD> | |
483 | <DT>modify-printer</DT> | |
484 | <DD>Modifies a printer. See the add-printer operation for a list of form | |
485 | variables.</DD> | |
486 | <DT>purge-jobs</DT> | |
487 | <DD>Purges all jobs on the named destination.</DD> | |
488 | <DT>reject-jobs</DT> | |
489 | <DD>Rejects new jobs on the named destination.</DD> | |
490 | <DT>start-printer</DT> | |
491 | <DD>Starts the named destination.</DD> | |
492 | <DT>stop-printer</DT> | |
493 | <DD>Stops the named destination.</DD> | |
494 | </DL> | |
495 | <H3><A NAME="5_2_2">5.2.2 classes.cgi</A></H3> | |
496 | <P>The <CODE>classes.cgi</CODE> program is responsible for listing class | |
497 | information, including jobs destined for that class. It is for all | |
498 | direct accesses to the<VAR> /classes</VAR> resource and supports the | |
499 | optional form variables <CODE>OP</CODE> and <CODE>WHICH_JOBS</CODE>. If | |
500 | no form variables are supplied then the CGI lists all or a specific | |
501 | class and the active jobs on each class.</P> | |
502 | <P>The following <CODE>WHICH_JOBS</CODE> values are supported:</P> | |
503 | <DL> | |
504 | <DT>completed</DT> | |
505 | <DD>Show only the completed jobs.</DD> | |
506 | <DT>not-completed</DT> | |
507 | <DD>Show only the active jobs.</DD> | |
508 | </DL> | |
509 | <P>The following <CODE>OP</CODE> values are supported:</P> | |
510 | <DL> | |
511 | <DT>print-test-page</DT> | |
512 | <DD>Print a PostScript test page.</DD> | |
513 | </DL> | |
514 | <H3><A NAME="5_2_3">5.2.3 jobs.cgi</A></H3> | |
515 | <P>The <CODE>jobs.cgi</CODE> program handles all of the job functions | |
516 | and is run for all direct accesses to the<VAR> /jobs</VAR> resource. | |
517 | For most operations it uses the <CODE>JOB_ID</CODE>, <CODE>OP</CODE>, | |
518 | and <CODE>WHICH_JOBS</CODE> form variables to specify the action | |
519 | requested.</P> | |
520 | <P>The following <CODE>WHICH_JOBS</CODE> values are supported:</P> | |
521 | <DL> | |
522 | <DT>completed</DT> | |
523 | <DD>Show only the completed jobs.</DD> | |
524 | <DT>not-completed</DT> | |
525 | <DD>Show only the active jobs.</DD> | |
526 | </DL> | |
527 | <P>The following <CODE>OP</CODE> values are supported:</P> | |
528 | <DL> | |
529 | <DT>job-cancel</DT> | |
530 | <DD>Cancels a job.</DD> | |
531 | <DT>job-hold</DT> | |
532 | <DD>Holds a job indefinitely.</DD> | |
533 | <DT>job-release</DT> | |
534 | <DD>Releases a job for printing.</DD> | |
535 | <DT>job-restart</DT> | |
536 | <DD>Restarts a stopped, cancelled, completed, or aborted print job.</DD> | |
537 | </DL> | |
538 | <H3><A NAME="5_2_4">5.2.4 printers.cgi</A></H3> | |
539 | <P>The <CODE>printers.cgi</CODE> program is responsible for listing | |
540 | printer information, including jobs destined for that printer. It is | |
541 | for all direct accesses to the<VAR> /printers</VAR> resource and | |
542 | supports the optional form variables <CODE>OP</CODE> and <CODE> | |
543 | WHICH_JOBS</CODE>. If no form variables are supplied then the CGI lists | |
544 | all or a specific printer and the active jobs on each printer.</P> | |
545 | <P>The following <CODE>WHICH_JOBS</CODE> values are supported:</P> | |
546 | <DL> | |
547 | <DT>completed</DT> | |
548 | <DD>Show only the completed jobs.</DD> | |
549 | <DT>not-completed</DT> | |
550 | <DD>Show only the active jobs.</DD> | |
551 | </DL> | |
552 | <P>The following <CODE>OP</CODE> values are supported:</P> | |
553 | <DL> | |
554 | <DT>print-test-page</DT> | |
555 | <DD>Print a PostScript test page.</DD> | |
556 | </DL> | |
557 | <H1 TYPE="A" VALUE="1"><A NAME="6">A Glossary</A></H1> | |
558 | <H2><A NAME="6_1">A.1 Terms</A></H2> | |
559 | <DL> | |
560 | <DT>C</DT> | |
561 | <DD>A computer language.</DD> | |
562 | <DT>parallel</DT> | |
563 | <DD>Sending or receiving data more than 1 bit at a time.</DD> | |
564 | <DT>pipe</DT> | |
565 | <DD>A one-way communications channel between two programs.</DD> | |
566 | <DT>serial</DT> | |
567 | <DD>Sending or receiving data 1 bit at a time.</DD> | |
568 | <DT>socket</DT> | |
569 | <DD>A two-way network communications channel.</DD> | |
570 | </DL> | |
571 | <H2><A NAME="6_2">A.2 Acronyms</A></H2> | |
572 | <DL> | |
573 | <DT>ASCII</DT> | |
574 | <DD>American Standard Code for Information Interchange</DD> | |
575 | <DT>CUPS</DT> | |
576 | <DD>Common UNIX Printing System</DD> | |
577 | <DT>ESC/P</DT> | |
578 | <DD>EPSON Standard Code for Printers</DD> | |
579 | <DT>FTP</DT> | |
580 | <DD>File Transfer Protocol</DD> | |
581 | <DT>HP-GL</DT> | |
582 | <DD>Hewlett-Packard Graphics Language</DD> | |
583 | <DT>HP-PCL</DT> | |
584 | <DD>Hewlett-Packard Page Control Language</DD> | |
585 | <DT>HP-PJL</DT> | |
586 | <DD>Hewlett-Packard Printer Job Language</DD> | |
587 | <DT>IETF</DT> | |
588 | <DD>Internet Engineering Task Force</DD> | |
589 | <DT>IPP</DT> | |
590 | <DD>Internet Printing Protocol</DD> | |
591 | <DT>ISO</DT> | |
592 | <DD>International Standards Organization</DD> | |
593 | <DT>LPD</DT> | |
594 | <DD>Line Printer Daemon</DD> | |
595 | <DT>MIME</DT> | |
596 | <DD>Multimedia Internet Mail Exchange</DD> | |
597 | <DT>PPD</DT> | |
598 | <DD>PostScript Printer Description</DD> | |
599 | <DT>SMB</DT> | |
600 | <DD>Server Message Block</DD> | |
601 | <DT>TFTP</DT> | |
602 | <DD>Trivial File Transfer Protocol</DD> | |
603 | </DL> | |
604 | </BODY> | |
605 | </HTML> |