2 <!-- SECTION: Getting Started -->
4 <TITLE>Translating and Customizing CUPS
</TITLE>
8 <P>Thanks to its extensive use of templates, images, and message
9 catalogs, CUPS can be easily translated (or customized!) to suit
10 your needs. This help file will guide you through the CUPS
11 localization files so you can get the most out of it.
</P>
13 <H2 CLASS=
"title"><A NAME=
"INTRO">Getting Started
</A></H2>
15 <P>Start by downloading the CUPS source code from
<A
16 HREF=
"http://www.cups.org/software.php"
17 TARGET=
"_blank">www.cups.org
</A>. After you extract the files
18 from the source archive, you will want to copy the following
19 files and directories:
</P>
23 <LI><VAR>desktop/cups.desktop
</VAR> - the GNOME/KDE
24 desktop file pointing to the CUPS web interface
</LI>
26 <LI><VAR>doc/images/button-*.gif
</VAR> - the web
27 interface button images
</LI>
29 <LI><VAR>tools/buttons.txt
</VAR> - the English text for the
30 web interface buttons
</LI>
32 <LI><VAR>tools/makebuttons
</VAR> - the shell script we use
33 to generate the web interface button images
</LI>
35 <LI><VAR>doc/index.html
</VAR> - the web interface home
38 <LI><VAR>locale/cups.pot
</VAR> - the message catalog
</LI>
40 <LI><VAR>templates/*.tmpl
</VAR> - the web interface
45 <P>With the exception of the message catalogs and desktop file,
46 localization files are placed in subdirectories under the
47 <VAR>doc
</VAR> and
<VAR>templates
</VAR> using the locale name.
48 Locale names are either
<VAR>ll
</VAR> or
<VAR>ll_CC
</VAR>, where
49 "ll" is the
2-letter language code and
"CC" is the
2-letter
50 country code.
<em>CUPS does not currently use or support the newer
<VAR>ll-region
</VAR> syntax for locale names.
</em></P>
52 <P>All non-image files must be encoded using the UTF-
8 character
56 <H2 CLASS=
"title"><A NAME=
"SUBMIT">Submitting a Translation for CUPS
</A></H2>
58 <P>To submit a translation for inclusion in CUPS, translate the
59 desktop file, all of the button images, template files, the
60 <VAR>index.html.in
</VAR> file, and the message catalog. Place
61 these files in the correct subdirectory in the CUPS source code
62 archive and run the following command to create an archive with
66 tar cvf
<I>ll_CC
</I>.tar.gz desktop/cups.desktop doc/
<I>ll_CC
</I> \
67 locale/cups_
<I>ll_CC
</I>.po templates/
<I>ll_CC
</I>
70 <P>Replace
"ll_CC" with the locale name for your translation.
71 Once you have created the archive, go to the
<A
72 HREF=
"http://www.cups.org/str.php" TARGET=
"_blank">CUPS Bugs
73 & Features
</A> page and submit a bug report, attaching the
74 translation to the report.
</P>
77 <H2 CLASS=
"title"><A NAME=
"DESKTOP">The Desktop File
</A></H2>
79 <P>The
<VAR>desktop/cups.desktop
</VAR> file provides a link to
80 the CUPS web interface from desktop environments such as
81 GNOME and KDE. To translate this file, add two lines to the
82 bottom with the
<tt>Name
</tt> and
<tt>Comment
</tt> keys:
</P>
85 Name[
<I>ll_CC
</I>]=
<I>Translation of
"Manage Printing"</I>
86 Comment[
<I>ll_CC
</I>]=
<I>Translation of
"CUPS Web Interface"</I>
90 <H2 CLASS=
"title"><A NAME=
"IMAGES">Button Images
</A></H2>
92 <P>The web interface button images are used to activate functions on
93 the CUPS web pages. Table
1 lists the button images and the English
94 text labels for those buttons. Copy the file
95 <VAR>tools/buttons.txt
</VAR> to
<VAR>buttons-ll_CC.txt
</VAR>,
96 translate the text in that file (use UTF-
8 as the text encoding!),
97 and then use the supplied
<VAR>tools/makebuttons
</VAR> script to
98 create button images that match the CUPS web interface:
</P>
100 <PRE CLASS=
"command">
101 cp tools/buttons.txt buttons-ll_CC.txt
103 tools/makebuttons ll_CC buttons-ll_CC.txt
106 <BLOCKQUOTE><B>Note:
</B> The
<VAR>tools/makebuttons
</VAR> script
107 requires at least version
6.2.4 of the ImageMagick software to
110 <P>When you have created all of the button images, edit the
111 <VAR>Makedefs
</VAR> file and add the locale name to the
112 <CODE>LANGUAGES
</CODE> variable. You can then run
"make
113 install" in the
<VAR>doc
</VAR> subdirectory to test the
114 translated buttons.
</P>
116 <DIV CLASS=
"table"><TABLE SUMMARY=
"Web Interface Buttons">
117 <CAPTION>Table
1: Web Interface Buttons
</CAPTION>
126 <TD>button-accept-jobs.gif
</TD>
130 <TD>button-add-class.gif
</TD>
134 <TD>button-add-printer.gif
</TD>
138 <TD>button-add-rss-subscription.gif
</TD>
139 <TD>Add RSS Subscription
</TD>
142 <TD>button-add-this-printer.gif
</TD>
143 <TD>Add This Printer
</TD>
146 <TD>button-cancel-all-jobs.gif
</TD>
147 <TD>Cancel All Jobs
</TD>
150 <TD>button-cancel-job.gif
</TD>
154 <TD>button-cancel-subscription.gif
</TD>
155 <TD>Cancel Subscription
</TD>
158 <TD>button-change-settings.gif
</TD>
159 <TD>Change Settings
</TD>
162 <TD>button-clean-print-heads.gif
</TD>
163 <TD>Clean Print Heads
</TD>
166 <TD>button-clear.gif
</TD>
170 <TD>button-continue.gif
</TD>
174 <TD>button-delete-class.gif
</TD>
175 <TD>Delete Class
</TD>
178 <TD>button-delete-printer.gif
</TD>
179 <TD>Delete Printer
</TD>
182 <TD>button-edit-configuration-file.gif
</TD>
183 <TD>Edit Configuration File
</TD>
186 <TD>button-export-samba.gif
</TD>
187 <TD>Export Printers to Samba
</TD>
190 <TD>button-help.gif
</TD>
194 <TD>button-hold-job.gif
</TD>
198 <TD>button-manage-classes.gif
</TD>
199 <TD>Manage Classes
</TD>
202 <TD>button-manage-jobs.gif
</TD>
206 <TD>button-manage-printers.gif
</TD>
207 <TD>Manage Printers
</TD>
210 <TD>button-manage-server.gif
</TD>
211 <TD>Manage Server
</TD>
214 <TD>button-modify-class.gif
</TD>
215 <TD>Modify Class
</TD>
218 <TD>button-modify-printer.gif
</TD>
219 <TD>Modify Printer
</TD>
222 <TD>button-move-job.gif
</TD>
226 <TD>button-move-jobs.gif
</TD>
227 <TD>Move All Jobs
</TD>
230 <TD>button-print-self-test-page.gif
</TD>
231 <TD>Print Self-Test Page
</TD>
234 <TD>button-print-test-page.gif
</TD>
235 <TD>Print Test Page
</TD>
238 <TD>button-publish-printer.gif
</TD>
239 <TD>Publish Printer
</TD>
242 <TD>button-reject-jobs.gif
</TD>
246 <TD>button-release-job.gif
</TD>
250 <TD>button-restart-job.gif
</TD>
254 <TD>button-save-changes.gif
</TD>
255 <TD>Save Changes
</TD>
258 <TD>button-search.gif
</TD>
262 <TD>button-set-allowed-users.gif
</TD>
263 <TD>Set Allowed Users
</TD>
266 <TD>button-set-as-default.gif
</TD>
267 <TD>Set As Default
</TD>
270 <TD>button-set-printer-options.gif
</TD>
271 <TD>Set Printer Options
</TD>
274 <TD>button-show-active.gif
</TD>
275 <TD>Show Active Jobs
</TD>
278 <TD>button-show-all.gif
</TD>
279 <TD>Show All Jobs
</TD>
282 <TD>button-show-completed.gif
</TD>
283 <TD>Show Completed Jobs
</TD>
286 <TD>button-show-next.gif
</TD>
290 <TD>button-show-previous.gif
</TD>
291 <TD>Show Previous
</TD>
294 <TD>button-sort-ascending.gif
</TD>
295 <TD>Show Ascending
</TD>
298 <TD>button-sort-descending.gif
</TD>
299 <TD>Show Descending
</TD>
302 <TD>button-start-class.gif
</TD>
306 <TD>button-start-printer.gif
</TD>
307 <TD>Start Printer
</TD>
310 <TD>button-stop-class.gif
</TD>
314 <TD>button-stop-printer.gif
</TD>
315 <TD>Stop Printer
</TD>
318 <TD>button-unpublish-printer.gif
</TD>
319 <TD>Unpublish Printer
</TD>
322 <TD>button-use-default-config.gif
</TD>
323 <TD>Use Default Configuration File
</TD>
326 <TD>button-view-access-log.gif
</TD>
327 <TD>View Access Log
</TD>
330 <TD>button-view-error-log.gif
</TD>
331 <TD>View Error Log
</TD>
334 <TD>button-view-page-log.gif
</TD>
335 <TD>View Page Log
</TD>
338 <TD>button-view-printable-version.gif
</TD>
339 <TD>View Printable Version
</TD>
345 <H2 CLASS=
"title"><A NAME=
"HOMEPAGE">The Home Page
</A></H2>
347 <P>The
<VAR>index.html
</VAR> file is a complete HTML file that is
348 displayed when the user visits
"http://localhost:631/". Edit the
349 existing
<VAR>doc/index.html
</VAR> and save it in the
350 <VAR>doc/ll_CC
</VAR> subdirectory so that the makefile can
351 install it. Run
"make install" in the
<VAR>doc
</VAR> subdirectory
352 to test the new home page.
</P>
355 <H2 CLASS=
"title"><A NAME=
"CATALOGS">Message Catalogs
</A></H2>
357 <P>CUPS message catalogs are GNU gettext
".po" text files that
358 provide a list of localized message strings for the CUPS
359 software. Message catalogs are named
<VAR>cups_ll.po
</VAR> or
360 <VAR>cups_ll_CC.po
</VAR>, where
"ll" is the standard
2-letter
361 abbreviation for the language and
"CC" is the standard
2-letter
362 abbreviation for the country.
</P>
364 <P>When translating a new message catalog, copy the
365 <VAR>cups.pot
</VAR> message catalog file in the
<VAR>locale
</VAR>
366 subdirectory of the CUPS source code. For example, to start
367 translating the message catalog to Canadian French, you would
368 type the following commands:
</P>
370 <PRE CLASS=
"command">
372 cp cups.pot cups_fr_CA.po
375 <P>Alternatively, you can copy the existing
<VAR>cups_fr.po
</VAR>
376 message catalog and then make any necessary changes.
</P>
378 <P>Once you have make your copy of the file, edit it using your
379 favorite text editor or translation program to translate the text
380 to the desired language.
</P>
382 <P>Finally, add your locale to the
<CODE>LANGUAGES
</CODE>
383 variable in the
<VAR>Makedefs
</VAR> file and run the
"make
384 install" command in the
<VAR>locale
</VAR> subdirectory to test
388 <H2 CLASS=
"title"><A NAME=
"TEMPLATES">Template Files
</A></H2>
390 <P>The CUPS scheduler provides a web interface that can be used
391 to do many common printing and administration tasks. The built-in
392 web server supports localization of web pages through the use of
393 subdirectories for each locale, e.g.
"fr" for French,
"de" for
394 German,
"fr_ca" for French in Canada, and so forth.
</P>
396 <P>Template files are HTML files with special formatting
397 characters in them that allow substition of variables and arrays.
398 The CUPS CGI programs (
<CODE>admin.cgi
</CODE>,
399 <CODE>classes.cgi
</CODE>,
<CODE>help.cgi
</CODE>,
400 <CODE>jobs.cgi
</CODE>, and
<CODE>printers.cgi
</CODE>) use these
401 template file to provide dynamic content for the web interface.
402 Template files are installed in the
403 <VAR>/usr/share/cups/templates
</VAR> directory by default. Table
404 2 lists the various template files and their purpose.
</P>
406 <P>Translated versions of the template files should be saved in
407 the
<VAR>templates/ll_CC
</VAR> subdirectory. For example,
408 Canadian French template files should be saved in the
409 <VAR>templates/fr_CA
</VAR> subdirectory. After you have
410 translated all of the templates, add the locale to the
411 <CODE>LANGUAGES
</CODE> variable in the
412 <VAR>Makedefs
</VAR> file and run
"make install" in the
413 <VAR>templates
</VAR> subdirectory to test the translation.
</P>
415 <DIV CLASS=
"table"><TABLE SUMMARY=
"Web Interface Template Files">
416 <CAPTION>Table
2: Web Interface Template Files
</CAPTION>
425 <TD>add-class.tmpl
</TD>
426 <TD>This is the initial form that is shown to add a new
430 <TD>add-printer.tmpl
</TD>
431 <TD>This is the initial form that is shown to add a new
435 <TD>add-rss-subscription.tmpl
</TD>
436 <TD>This is the form that is shown to add a new RSS subscription.
</TD>
440 <TD>This is the main administration page.
</TD>
443 <TD>choose-device.tmpl
</TD>
444 <TD>This is the form that shows the list of available
448 <TD>choose-make.tmpl
</TD>
449 <TD>This is the form that shows the list of available
453 <TD>choose-model.tmpl
</TD>
454 <TD>This is the form that shows the list of available
455 printer models/drivers.
</TD>
458 <TD>choose-serial.tmpl
</TD>
459 <TD>This is the form that allows the user to choose
460 a serial port and any options.
</TD>
463 <TD>choose-uri.tmpl
</TD>
464 <TD>This is the form that allows the user to enter
465 a device URI for network printers.
</TD>
468 <TD>class-added.tmpl
</TD>
469 <TD>This template shows the
"class added" message.
</TD>
472 <TD>class-confirm.tmpl
</TD>
473 <TD>This is the template used to confirm the
474 deletion of a class.
</TD>
477 <TD>class-deleted.tmpl
</TD>
478 <TD>This template shows the
"class deleted" message.
</TD>
481 <TD>class-jobs-header.tmpl
</TD>
482 <TD>This template shows the
"jobs" header for jobs in a
486 <TD>class-modified.tmpl
</TD>
487 <TD>This template shows the
"class modified" message.
</TD>
490 <TD>classes.tmpl
</TD>
491 <TD>This template shows one or more printer classes.
</TD>
494 <TD>classes-header.tmpl
</TD>
495 <TD>This template shows the
"showing N of M classes" header in
499 <TD>edit-config.tmpl
</TD>
500 <TD>This is the cupsd.conf editor page.
</TD>
504 <TD>This template displays a generic error message.
</TD>
507 <TD>error-op.tmpl
</TD>
508 <TD>This is the
"unknown operation" error page.
</TD>
512 <TD>This template is used as the standard header on all dynamic
516 <TD>help-header.tmpl
</TD>
517 <TD>This is the top part of the help page.
</TD>
520 <TD>help-printable.tmpl
</TD>
521 <TD>This is the standard page header for the printable
522 version of help files.
</TD>
525 <TD>job-cancel.tmpl
</TD>
526 <TD>This template shows
"job cancelled".
</TD>
529 <TD>job-hold.tmpl
</TD>
530 <TD>This template shows
"job held".
</TD>
533 <TD>job-move.tmpl
</TD>
534 <TD>This template shows the move-job form.
</TD>
537 <TD>job-moved.tmpl
</TD>
538 <TD>This template shows
"job moved".
</TD>
541 <TD>job-release.tmpl
</TD>
542 <TD>This template shows
"job released".
</TD>
545 <TD>job-restart.tmpl
</TD>
546 <TD>This template shows
"job reprinted".
</TD>
550 <TD>This template is used to list the print jobs on a server,
551 class, or printer.
</TD>
554 <TD>jobs-header.tmpl
</TD>
555 <TD>This template shows the
"showing N or M jobs" header in the
559 <TD>maintenance.tmpl
</TD>
560 <TD>This template shows
"maintenance commands sent".
</TD>
563 <TD>modify-class.tmpl
</TD>
564 <TD>This template is used as the first form when modifying a
568 <TD>modify-printer.tmpl
</TD>
569 <TD>This template is used as the first form when modifying a
573 <TD>norestart.tmpl
</TD>
574 <TD>This template shows
"server not restarted because no
575 changes were made to the configuration".
</TD>
578 <TD>option-boolean.tmpl
</TD>
579 <TD>This template is used to select a boolean PPD option.
</TD>
582 <TD>option-conflict.tmpl
</TD>
583 <TD>This template shows the conflicting options.
</TD>
586 <TD>option-header.tmpl
</TD>
587 <TD>This template is used to start a PPD option group.
</TD>
590 <TD>option-pickmany.tmpl
</TD>
591 <TD>This template is used to select a multi-valued PPD option.
</TD>
594 <TD>option-pickone.tmpl
</TD>
595 <TD>This template is used to select a single-valued PPD option.
</TD>
598 <TD>option-trailer.tmpl
</TD>
599 <TD>This template is used to end a PPD option group.
</TD>
603 <TD>This template shows the previous/next pager bar.
</TD>
606 <TD>printer-accept.tmpl
</TD>
607 <TD>This template shows
"printer now accepting jobs".
</TD>
610 <TD>printer-added.tmpl
</TD>
611 <TD>This template shows
"printer added".
</TD>
614 <TD>printer-configured.tmpl
</TD>
615 <TD>This template shows
"printer configured".
</TD>
618 <TD>printer-confirm.tmpl
</TD>
619 <TD>This template asks the user to confirm the deletion
623 <TD>printer-default.tmpl
</TD>
624 <TD>This template shows
"default printer set".
</TD>
627 <TD>printer-deleted.tmpl
</TD>
628 <TD>This template shows
"printer deleted".
</TD>
631 <TD>printer-jobs-header.tmpl
</TD>
632 <TD>This templates shows the
"jobs" header for jobs on a
636 <TD>printer-modified.tmpl
</TD>
637 <TD>This template shows
"printer modified".
</TD>
640 <TD>printer-purge.tmpl
</TD>
641 <TD>This template shows
"printer has been purged of all jobs".
</TD>
644 <TD>printer-reject.tmpl
</TD>
645 <TD>This template shows
"printer now rejecting jobs".
</TD>
648 <TD>printer-start.tmpl
</TD>
649 <TD>This template shows
"printer started".
</TD>
652 <TD>printer-stop.tmpl
</TD>
653 <TD>This template shows
"printer stopped".
</TD>
656 <TD>printers.tmpl
</TD>
657 <TD>This template is used to list information on one or more
661 <TD>printers-header.tmpl
</TD>
662 <TD>This template shows the
"showing printer N of M" header in
663 the printers list.
</TD>
666 <TD>restart.tmpl
</TD>
667 <TD>This template shows
"server restarting".
</TD>
670 <TD>samba-export.tmpl
</TD>
671 <TD>This template shows the export printers to Samba form.
</TD>
674 <TD>samba-exported.tmpl
</TD>
675 <TD>This template shows
"printers exported to Samba".
</TD>
679 <TD>This template shows the search form.
</TD>
682 <TD>set-printer-options-header.tmpl
</TD>
683 <TD>This template shows the first part of the set printer options
687 <TD>set-printer-options-trailer.tmpl
</TD>
688 <TD>This template shows the last part of the set printer options
692 <TD>subscription-added.tmpl
</TD>
693 <TD>This template shows
"subscription xyz added".
</TD>
696 <TD>subscription-canceled.tmpl
</TD>
697 <TD>This template shows
"subscription #NNN canceled".
</TD>
700 <TD>test-page.tmpl
</TD>
701 <TD>This template shows
"test page printed".
</TD>
704 <TD>trailer.tmpl
</TD>
705 <TD>This template is used as the standard trailer on all dynamic
710 <TD>This template shows the set allowed users form.
</TD>
715 <H3><A NAME=
"VARIABLE">Inserting Attributes and Values
</A></H3>
717 <P>Template files consist of HTML with variable substitutions for
718 named inside curley braces
"{name}". Variable names are generally
719 the IPP attribute names with the hyphen (
"-") replaced by the
720 underscore (
"_") character. For example, the
721 <TT>job-printer-uri
</TT> attribute is renamed to
722 <TT>job_printer_uri
</TT>.
</P>
724 <P>Curley braces (
"{" and
"}") to indicate substitutions, and the
725 backslash (
"\") character for quoting. To insert any of these
726 special characters as-is you need to use the HTML
727 <CODE>&name;
</CODE> mechanism or prefix each special
728 character with the backslash (
"\".)
</P>
730 <P>You substitute the value of a variable using
731 <CODE>{NAME}
</CODE> in your template file. If the variable is
732 undefined then the
<CODE>{NAME}
</CODE> string is output
735 <P>To substitute an empty string if the variable is undefined,
736 use
<CODE>{?NAME}
</CODE> instead.
</P>
738 <H3>Array Substitutions
</H3>
740 <P>The number of array elements can be inserted using
741 <CODE>{#NAME}
</CODE>. If the array is undefined then
0 is output.
742 The current array element (starting at
1) is inserted with
743 <CODE>{#}
</CODE>.
</P>
745 <P>Arrays are handled using
<CODE>{[NAME]
</CODE> at the beginning
746 of a section and
<CODE>}
</CODE> at the end. The information
747 between the closing bracket (
"]") and closing brace (
"}") is
748 repeated for as many elements as are in the named array. For
749 example, the following template will display a list of each job
750 in the
<CODE>job_id
</CODE> array:
</P>
752 <PRE CLASS=
"command">
755 <TH
>Job ID
</TH
>
756 <TH
>Destination
</TH
>
757 <TH
>Title
</TH
>
762 <TD
>{?job_id}
</TD
>
763 <TD
>{?job_printer_name}
</TD
>
764 <TD
>{?job_name}
</TD
>
770 <P>Arrays can be nested, however all elements within the curley
771 braces (
"{" and
"}") are indexed using the innermost array.
</P>
773 <H3>Conditional Tests
</H3>
775 <P>Templates can also test variables against specific values and
776 conditionally include text in the template. The format is:
</P>
778 <PRE CLASS=
"command">
779 {
<I>variable
</I>?
<I>true
</I>:
<I>false
</I>}
780 {
<I>variable
</I>=
<I>value
</I>?
<I>true
</I>:
<I>false
</I>}
781 {
<I>variable
</I>!
<I>value
</I>?
<I>true
</I>:
<I>false
</I>}
782 {
<I>variable
</I><<I>value
</I>?
<I>true
</I>:
<I>false
</I>}
783 {
<I>variable
</I>><I>value
</I>?
<I>true
</I>:
<I>false
</I>}
786 <P>where
<VAR>true
</VAR> is the text that is included if the
787 condition is true and
<VAR>false
</VAR> is the text that is
788 included if the condition is false. A value of
<CODE>#
</CODE> is
789 replaced with the current element number (starting at
1.) The
790 character after the variable name specifies the condition to
791 test. Table
3 shows the available test conditions.
</P>
793 <DIV CLASS=
"table"><TABLE SUMMARY=
"Template Substitution Conditions">
794 <CAPTION>Table
3: Template Substitution Conditions
</CAPTION>
801 <TD>True if
<VAR>variable
</VAR> exists.
</TD>
805 <TD>True if
<VAR>variable
</VAR> is equal to
<VAR>value
</VAR>.
</TD>
809 <TD>True if
<VAR>variable
</VAR> is not equal to
<VAR>value
</VAR>.
</TD>
813 <TD>True if
<VAR>variable
</VAR> is less than
<VAR>value
</VAR>.
</TD>
817 <TD>True if
<VAR>variable
</VAR> is greater than
<VAR>value
</VAR>.
</TD>
821 <H3><A NAME=
"CGI">CGI Programs
</A></H3>
823 <P>CUPS uses five CGI programs to manage the dynamic web
828 <LI><CODE>admin.cgi
</CODE></LI>
829 <LI><CODE>classes.cgi
</CODE></LI>
830 <LI><CODE>help.cgi
</CODE></LI>
831 <LI><CODE>jobs.cgi
</CODE></LI>
832 <LI><CODE>printers.cgi
</CODE></LI>
836 <P>Each CGI program accepts standard form variables such as
837 <CODE>OP
</CODE> for the operation to perform,
838 <CODE>PRINTER_NAME
</CODE> for the printer or class name to
839 operate on,
<CODE>QUERY
</CODE> for any search words,
840 <CODE>FIRST
</CODE> for the first class, job, or printer to
841 display, and
<CODE>ORDER
</CODE> to control the order that
842 classes, jobs, or printers are displayed.
</P>
844 <P>In addition, the
<CODE>classes.cgi
</CODE>,
845 <CODE>jobs.cgi
</CODE>, and
<CODE>printers.cgi
</CODE> programs
846 support a
<CODE>WHICH_JOBS
</CODE> variable to control which jobs
847 are displayed. Table
4 lists the supported values.
</P>
849 <DIV CLASS=
"table"><TABLE SUMMARY=
"WHICH_JOBS Values">
850 <CAPTION>Table
4: WHICH_JOBS Values
</CAPTION>
859 <TD>Show all jobs
</TD>
863 <TD>Show completed jobs
</TD>
866 <TD>not-completed
</TD>
867 <TD>Show active jobs
</TD>
871 <H4><A NAME=
"admin.cgi">admin.cgi
</A></H4>
873 <P>The
<CODE>admin.cgi
</CODE> program handles all of the printer
874 and class administration functions and is run for all direct
875 accesses to the
<VAR>/admin
</VAR> resource. For most operations
876 it uses the
<CODE>PRINTER_NAME
</CODE> and
<CODE>OP
</CODE> form
877 variables to specify the action requested. Table
5 shows the
878 supported
<CODE>OP
</CODE> values.
</P>
880 <DIV CLASS=
"table"><TABLE SUMMARY=
"admin.cgi OP Values">
881 <CAPTION>Table
5: admin.cgi OP Values
</CAPTION>
891 <TD>Accepts jobs on the named destination.
</TD>
895 <TD>Adds a new printer class.
</TD>
899 <TD>Adds a new printer.
</TD>
902 <TD>config-server
</TD>
903 <TD>Configures the server.
</TD>
906 <TD>delete-class
</TD>
907 <TD>Deletes a printer class. The form variable
<CODE>CONFIRM
</CODE>
908 may be set to any value to bypass the confirmation page.
</TD>
911 <TD>delete-printer
</TD>
912 <TD>Deletes a printer. The form variable
<CODE>CONFIRM
</CODE>
913 may be set to any value to bypass the confirmation page.
</TD>
916 <TD>export-samba
</TD>
917 <TD>Exports printers to Samba.
</TD>
920 <TD>modify-class
</TD>
921 <TD>Modifies a printer class.
</TD>
924 <TD>modify-printer
</TD>
925 <TD>Modifies a printer.
</TD>
929 <TD>Purges all jobs on the named destination.
</TD>
933 <TD>Redirects the web browser to the location referenced by
934 the URL form variable.
</TD>
938 <TD>Rejects new jobs on the named destination.
</TD>
941 <TD>set-allowed-users
</TD>
942 <TD>Sets the allowed users for a destination.
</TD>
945 <TD>set-as-default
</TD>
946 <TD>Sets the default destination.
</TD>
949 <TD>set-printer-options
</TD>
950 <TD>Sets the default options for a printer.
</TD>
954 <TD>Sets the printer-is-shared attribute for a destination.
</TD>
958 <TD>Starts the named class.
</TD>
961 <TD>start-printer
</TD>
962 <TD>Starts the named printer.
</TD>
966 <TD>Stops the named class.
</TD>
969 <TD>stop-printer
</TD>
970 <TD>Stops the named printer.
</TD>
975 <H4><A NAME=
"classes.cgi">classes.cgi
</A></H4>
977 <P>The
<CODE>classes.cgi
</CODE> program is responsible for
978 listing class information, including jobs destined for that
979 class. It is for all direct accesses to the
<VAR>/classes
</VAR>
980 resource and supports the optional form variables
<CODE>OP
</CODE>
981 and
<CODE>WHICH_JOBS
</CODE>. If no form variables are supplied
982 then the CGI lists all or a specific class and the active jobs on
983 each class. Table
6 shows the supported
<CODE>OP
</CODE>
986 <DIV CLASS=
"table"><TABLE SUMMARY=
"classes.cgi OP Values">
987 <CAPTION>Table
6: classes.cgi OP Values
</CAPTION>
997 <TD>Moves the jobs on this class to another destination.
</TD>
1000 <TD>print-test-page
</TD>
1001 <TD>Prints the standard PostScript test page.
</TD>
1007 <H4><A NAME=
"help.cgi">help.cgi
</A></H4>
1009 <P>The
<CODE>help.cgi
</CODE> program handles all of the on-line
1010 help functions and is run for all direct accesses to the
1011 <VAR>/help
</VAR> resource.
</P>
1014 <H4><A NAME=
"jobs.cgi">jobs.cgi
</A></H4>
1016 <P>The
<CODE>jobs.cgi
</CODE> program handles all of the job
1017 functions and is run for all direct accesses to the
1018 <VAR>/jobs
</VAR> resource. For most operations it uses the
1019 <CODE>JOB_ID
</CODE>,
<CODE>OP
</CODE>, and
<CODE>WHICH_JOBS
</CODE>
1020 form variables to specify the action requested. Table
7 shows the
1021 supported
<CODE>OP
</CODE> values.
</P>
1023 <DIV CLASS=
"table"><TABLE SUMMARY=
"jobs.cgi OP Values">
1024 <CAPTION>Table
7: jobs.cgi OP Values
</CAPTION>
1028 <TH>Description
</TH>
1034 <TD>Cancels a job.
</TD>
1038 <TD>Holds a job indefinitely.
</TD>
1042 <TD>Moves a job to another destination.
</TD>
1045 <TD>release-job
</TD>
1046 <TD>Releases a job for printing.
</TD>
1049 <TD>restart-job
</TD>
1050 <TD>Restarts/reprints a stopped, cancelled, completed, or aborted
1057 <H4><A NAME=
"printers.cgi">printers.cgi
</A></H4>
1059 <P>The
<CODE>printers.cgi
</CODE> program is responsible for
1060 listing printer information, including jobs destined for that
1061 printer. It is for all direct accesses to the
1062 <VAR>/printers
</VAR> resource and supports the optional form
1063 variables
<CODE>OP
</CODE> and
<CODE>WHICH_JOBS
</CODE>. If no form
1064 variables are supplied then the CGI lists all printers or a
1065 specific printer and the active jobs on that printer. Table
8
1066 shows the supported
<CODE>OP
</CODE> values.
</P>
1068 <DIV CLASS=
"table"><TABLE SUMMARY=
"printers.cgi OP Values">
1069 <CAPTION>Table
8: printers.cgi OP Values
</CAPTION>
1073 <TH>Description
</TH>
1078 <TD>clean-print-heads
</TD>
1079 <TD>Clean the print heads.
</TD>
1083 <TD>Move all jobs to a different destination.
</TD>
1086 <TD>print-self-test-page
</TD>
1087 <TD>Print a printer self-test page.
</TD>
1090 <TD>print-test-page
</TD>
1091 <TD>Print a PostScript test page.
</TD>