1*5e7646d2SAndroid Build Coastguard Worker<HTML> 2*5e7646d2SAndroid Build Coastguard Worker<!-- SECTION: Getting Started --> 3*5e7646d2SAndroid Build Coastguard Worker<HEAD> 4*5e7646d2SAndroid Build Coastguard Worker <TITLE>Translating and Customizing CUPS</TITLE> 5*5e7646d2SAndroid Build Coastguard Worker <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css"> 6*5e7646d2SAndroid Build Coastguard Worker</HEAD> 7*5e7646d2SAndroid Build Coastguard Worker<BODY> 8*5e7646d2SAndroid Build Coastguard Worker 9*5e7646d2SAndroid Build Coastguard Worker<H1 CLASS="title">Translating and Customizing CUPS</H1> 10*5e7646d2SAndroid Build Coastguard Worker 11*5e7646d2SAndroid Build Coastguard Worker<P>Thanks to its extensive use of templates, images, and message catalogs, CUPS can be easily translated (or customized!) to suit your needs. This help file will guide you through the CUPS localization files so you can get the most out of it.</P> 12*5e7646d2SAndroid Build Coastguard Worker 13*5e7646d2SAndroid Build Coastguard Worker 14*5e7646d2SAndroid Build Coastguard Worker<H2 CLASS="title" ID="INTRO">Getting Started</H2> 15*5e7646d2SAndroid Build Coastguard Worker 16*5e7646d2SAndroid Build Coastguard Worker<P>Start by downloading the CUPS source code from <A HREF="https://www.cups.org/" TARGET="_blank">www.cups.org</A>. After you extract the files from the source archive (or clone the Git repository), you will want to copy the following files and directories:</P> 17*5e7646d2SAndroid Build Coastguard Worker 18*5e7646d2SAndroid Build Coastguard Worker<UL> 19*5e7646d2SAndroid Build Coastguard Worker 20*5e7646d2SAndroid Build Coastguard Worker <LI><VAR>desktop/cups.desktop</VAR> - the GNOME/KDE desktop file pointing to the CUPS web interface</LI> 21*5e7646d2SAndroid Build Coastguard Worker 22*5e7646d2SAndroid Build Coastguard Worker <LI><VAR>doc/index.html.in</VAR> - the web interface home page</LI> 23*5e7646d2SAndroid Build Coastguard Worker 24*5e7646d2SAndroid Build Coastguard Worker <LI><VAR>locale/cups.pot</VAR> - the message catalog</LI> 25*5e7646d2SAndroid Build Coastguard Worker 26*5e7646d2SAndroid Build Coastguard Worker <LI><VAR>templates/*.tmpl</VAR> and <VAR>templates/header.tmpl.in</VAR> - the web interface template files</LI> 27*5e7646d2SAndroid Build Coastguard Worker 28*5e7646d2SAndroid Build Coastguard Worker</UL> 29*5e7646d2SAndroid Build Coastguard Worker 30*5e7646d2SAndroid Build Coastguard Worker<P>With the exception of the message catalogs and desktop file, localization files are placed in subdirectories under the <VAR>doc</VAR> and <VAR>templates</VAR> using the locale name. Locale names are either <VAR>ll</VAR> or <VAR>ll_CC</VAR>, where "ll" is the 2-letter language code and "CC" is the 2-letter country code. <em>CUPS does not currently use or support the newer <VAR>ll-region</VAR> syntax for locale names.</em></P> 31*5e7646d2SAndroid Build Coastguard Worker 32*5e7646d2SAndroid Build Coastguard Worker<P>All non-image files must be encoded using the UTF-8 character set.</P> 33*5e7646d2SAndroid Build Coastguard Worker 34*5e7646d2SAndroid Build Coastguard Worker 35*5e7646d2SAndroid Build Coastguard Worker<H2 CLASS="title" ID="SUBMIT">Submitting a Translation for CUPS</H2> 36*5e7646d2SAndroid Build Coastguard Worker 37*5e7646d2SAndroid Build Coastguard Worker<P>To submit a translation for inclusion in CUPS, translate the desktop file, all of the template files, the <VAR>index.html.in</VAR> file, and the message catalog. Place these files in the correct subdirectories in the CUPS source code archive and run the following command to create an archive with your files:</P> 38*5e7646d2SAndroid Build Coastguard Worker 39*5e7646d2SAndroid Build Coastguard Worker<PRE CLASS="command"> 40*5e7646d2SAndroid Build Coastguard Workertar cvf <I>ll_CC</I>.tar.gz desktop/cups.desktop doc/<I>ll_CC</I> locale/cups_<I>ll_CC</I>.po templates/<I>ll_CC</I> 41*5e7646d2SAndroid Build Coastguard Worker</PRE> 42*5e7646d2SAndroid Build Coastguard Worker 43*5e7646d2SAndroid Build Coastguard Worker<P>Replace "ll_CC" with the locale name for your translation. Once you have created the archive, go to the <A HREF="https://github.com/apple/cups" TARGET="_blank">CUPS project page</A> and submit a bug report, attaching the translation to the report.</P> 44*5e7646d2SAndroid Build Coastguard Worker 45*5e7646d2SAndroid Build Coastguard Worker<P>Alternately, you can clone the CUPS project on Github, make your changes, and submit a pull request from the same link.</P> 46*5e7646d2SAndroid Build Coastguard Worker 47*5e7646d2SAndroid Build Coastguard Worker 48*5e7646d2SAndroid Build Coastguard Worker<H2 CLASS="title" ID="DESKTOP">The Desktop File</H2> 49*5e7646d2SAndroid Build Coastguard Worker 50*5e7646d2SAndroid Build Coastguard Worker<P>The <VAR>desktop/cups.desktop</VAR> file provides a link to the CUPS web interface from desktop environments such as GNOME and KDE. To translate this file, add two lines to the bottom with the <tt>Name</tt> and <tt>Comment</tt> keys:</P> 51*5e7646d2SAndroid Build Coastguard Worker 52*5e7646d2SAndroid Build Coastguard Worker<PRE CLASS="command"> 53*5e7646d2SAndroid Build Coastguard WorkerName[<I>ll_CC</I>]=<I>Translation of "Manage Printing"</I> 54*5e7646d2SAndroid Build Coastguard WorkerComment[<I>ll_CC</I>]=<I>Translation of "CUPS Web Interface"</I> 55*5e7646d2SAndroid Build Coastguard Worker</PRE> 56*5e7646d2SAndroid Build Coastguard Worker 57*5e7646d2SAndroid Build Coastguard Worker 58*5e7646d2SAndroid Build Coastguard Worker<H2 CLASS="title" ID="HOMEPAGE">The Home Page</H2> 59*5e7646d2SAndroid Build Coastguard Worker 60*5e7646d2SAndroid Build Coastguard Worker<P>The <VAR>index.html.in</VAR> file is a complete HTML file that is displayed when the user visits "http://localhost:631/". Edit the existing <VAR>doc/index.html.in</VAR> and save it in the <VAR>doc/ll_CC</VAR> subdirectory so that the configure script can generate it. After configuring, run "make install" in the <VAR>doc</VAR> subdirectory to test the new home page.</P> 61*5e7646d2SAndroid Build Coastguard Worker 62*5e7646d2SAndroid Build Coastguard Worker 63*5e7646d2SAndroid Build Coastguard Worker<H2 CLASS="title" ID="CATALOGS">Message Catalogs</H2> 64*5e7646d2SAndroid Build Coastguard Worker 65*5e7646d2SAndroid Build Coastguard Worker<P>CUPS message catalogs are GNU gettext ".po" text files that provide a list of localized message strings for the CUPS software. Message catalogs are named <VAR>cups_ll.po</VAR> or <VAR>cups_ll_CC.po</VAR>, where "ll" is the standard 2-letter abbreviation for the language and "CC" is the standard 2-letter abbreviation for the country.</P> 66*5e7646d2SAndroid Build Coastguard Worker 67*5e7646d2SAndroid Build Coastguard Worker<P>When translating a new message catalog, copy the <VAR>cups.pot</VAR> message catalog file in the <VAR>locale</VAR> subdirectory of the CUPS source code. For example, to start translating the message catalog to Canadian French, you would type the following commands:</P> 68*5e7646d2SAndroid Build Coastguard Worker 69*5e7646d2SAndroid Build Coastguard Worker<PRE CLASS="command"> 70*5e7646d2SAndroid Build Coastguard Workercd locale 71*5e7646d2SAndroid Build Coastguard Workercp cups.pot cups_fr_CA.po 72*5e7646d2SAndroid Build Coastguard Worker</PRE> 73*5e7646d2SAndroid Build Coastguard Worker 74*5e7646d2SAndroid Build Coastguard Worker<P>Alternatively, you can copy the existing <VAR>cups_fr.po</VAR> message catalog and then make any necessary changes.</P> 75*5e7646d2SAndroid Build Coastguard Worker 76*5e7646d2SAndroid Build Coastguard Worker<P>Once you have make your copy of the file, edit it using your favorite text editor or translation program to translate the text to the desired language.</P> 77*5e7646d2SAndroid Build Coastguard Worker 78*5e7646d2SAndroid Build Coastguard Worker<P>Then validate your translation using the <VAR>locale/checkpo</VAR> utility:</P> 79*5e7646d2SAndroid Build Coastguard Worker 80*5e7646d2SAndroid Build Coastguard Worker<PRE CLASS="command"> 81*5e7646d2SAndroid Build Coastguard Workercd locale 82*5e7646d2SAndroid Build Coastguard Worker./checkpo cups_ll_CC.po 83*5e7646d2SAndroid Build Coastguard Worker</PRE> 84*5e7646d2SAndroid Build Coastguard Worker 85*5e7646d2SAndroid Build Coastguard Worker<P>After fixing any errors in your translation, add your locale to the <CODE>LANGUAGES</CODE> variable in the <VAR>Makedefs</VAR> file and run the "make install" command in the <VAR>locale</VAR> subdirectory to test the translation. <em>This variable is automatically updated when you run the configure script.</em></P> 86*5e7646d2SAndroid Build Coastguard Worker 87*5e7646d2SAndroid Build Coastguard Worker 88*5e7646d2SAndroid Build Coastguard Worker<H2 CLASS="title" ID="TEMPLATES">Template Files</H2> 89*5e7646d2SAndroid Build Coastguard Worker 90*5e7646d2SAndroid Build Coastguard Worker<P>The CUPS scheduler provides a web interface that can be used to do many common printing and administration tasks. The built-in web server supports localization of web pages through the use of subdirectories for each locale, e.g. "fr" for French, "de" for German, "fr_ca" for French in Canada, and so forth.</P> 91*5e7646d2SAndroid Build Coastguard Worker 92*5e7646d2SAndroid Build Coastguard Worker<P>Template files are HTML files with special formatting characters in them that allow substitution of variables and arrays. The CUPS CGI programs (<CODE>admin.cgi</CODE>, <CODE>classes.cgi</CODE>, <CODE>help.cgi</CODE>, <CODE>jobs.cgi</CODE>, and <CODE>printers.cgi</CODE>) use these template file to provide dynamic content for the web interface. Template files are installed in the <VAR>/usr/share/cups/templates</VAR> directory by default. <A HREF="table1">Table 1</a> lists the various template files and their purpose.</P> 93*5e7646d2SAndroid Build Coastguard Worker 94*5e7646d2SAndroid Build Coastguard Worker<P>Translated versions of the template files should be saved in 95*5e7646d2SAndroid Build Coastguard Workerthe <VAR>templates/ll_CC</VAR> subdirectory. For example, 96*5e7646d2SAndroid Build Coastguard WorkerCanadian French template files should be saved in the 97*5e7646d2SAndroid Build Coastguard Worker<VAR>templates/fr_CA</VAR> subdirectory. After you have 98*5e7646d2SAndroid Build Coastguard Workertranslated all of the templates, add the locale to the 99*5e7646d2SAndroid Build Coastguard Worker<CODE>LANGUAGES</CODE> variable in the 100*5e7646d2SAndroid Build Coastguard Worker<VAR>Makedefs</VAR> file and run "make install" in the 101*5e7646d2SAndroid Build Coastguard Worker<VAR>templates</VAR> subdirectory to test the translation.</P> 102*5e7646d2SAndroid Build Coastguard Worker 103*5e7646d2SAndroid Build Coastguard Worker<DIV CLASS="table"><TABLE ID="table1" SUMMARY="Web Interface Template Files"> 104*5e7646d2SAndroid Build Coastguard Worker<CAPTION>Table 1: Web Interface Template Files</CAPTION> 105*5e7646d2SAndroid Build Coastguard Worker<THEAD> 106*5e7646d2SAndroid Build Coastguard Worker<TR> 107*5e7646d2SAndroid Build Coastguard Worker <TH>Filename</TH> 108*5e7646d2SAndroid Build Coastguard Worker <TH>Purpose</TH> 109*5e7646d2SAndroid Build Coastguard Worker</TR> 110*5e7646d2SAndroid Build Coastguard Worker</THEAD> 111*5e7646d2SAndroid Build Coastguard Worker<TBODY> 112*5e7646d2SAndroid Build Coastguard Worker<TR> 113*5e7646d2SAndroid Build Coastguard Worker <TD>add-class.tmpl</TD> 114*5e7646d2SAndroid Build Coastguard Worker <TD>This is the initial form that is shown to add a new printer class.</TD> 115*5e7646d2SAndroid Build Coastguard Worker</TR> 116*5e7646d2SAndroid Build Coastguard Worker<TR> 117*5e7646d2SAndroid Build Coastguard Worker <TD>add-printer.tmpl</TD> 118*5e7646d2SAndroid Build Coastguard Worker <TD>This is the initial form that is shown to add a new printer.</TD> 119*5e7646d2SAndroid Build Coastguard Worker</TR> 120*5e7646d2SAndroid Build Coastguard Worker<TR> 121*5e7646d2SAndroid Build Coastguard Worker <TD>admin.tmpl</TD> 122*5e7646d2SAndroid Build Coastguard Worker <TD>This is the main administration page.</TD> 123*5e7646d2SAndroid Build Coastguard Worker</TR> 124*5e7646d2SAndroid Build Coastguard Worker<TR> 125*5e7646d2SAndroid Build Coastguard Worker <TD>choose-device.tmpl</TD> 126*5e7646d2SAndroid Build Coastguard Worker <TD>This is the form that shows the list of available devices.</TD> 127*5e7646d2SAndroid Build Coastguard Worker</TR> 128*5e7646d2SAndroid Build Coastguard Worker<TR> 129*5e7646d2SAndroid Build Coastguard Worker <TD>choose-make.tmpl</TD> 130*5e7646d2SAndroid Build Coastguard Worker <TD>This is the form that shows the list of available manufacturers.</TD> 131*5e7646d2SAndroid Build Coastguard Worker</TR> 132*5e7646d2SAndroid Build Coastguard Worker<TR> 133*5e7646d2SAndroid Build Coastguard Worker <TD>choose-model.tmpl</TD> 134*5e7646d2SAndroid Build Coastguard Worker <TD>This is the form that shows the list of available printer models/drivers.</TD> 135*5e7646d2SAndroid Build Coastguard Worker</TR> 136*5e7646d2SAndroid Build Coastguard Worker<TR> 137*5e7646d2SAndroid Build Coastguard Worker <TD>choose-serial.tmpl</TD> 138*5e7646d2SAndroid Build Coastguard Worker <TD>This is the form that allows the user to choose a serial port and any options.</TD> 139*5e7646d2SAndroid Build Coastguard Worker</TR> 140*5e7646d2SAndroid Build Coastguard Worker<TR> 141*5e7646d2SAndroid Build Coastguard Worker <TD>choose-uri.tmpl</TD> 142*5e7646d2SAndroid Build Coastguard Worker <TD>This is the form that allows the user to enter a device URI for network printers.</TD> 143*5e7646d2SAndroid Build Coastguard Worker</TR> 144*5e7646d2SAndroid Build Coastguard Worker<TR> 145*5e7646d2SAndroid Build Coastguard Worker <TD>class.tmpl</TD> 146*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows information about a single class.</TD> 147*5e7646d2SAndroid Build Coastguard Worker</TR> 148*5e7646d2SAndroid Build Coastguard Worker<TR> 149*5e7646d2SAndroid Build Coastguard Worker <TD>class-added.tmpl</TD> 150*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows the "class added" message.</TD> 151*5e7646d2SAndroid Build Coastguard Worker</TR> 152*5e7646d2SAndroid Build Coastguard Worker<TR> 153*5e7646d2SAndroid Build Coastguard Worker <TD>class-confirm.tmpl</TD> 154*5e7646d2SAndroid Build Coastguard Worker <TD>This is the template used to confirm the deletion of a class.</TD> 155*5e7646d2SAndroid Build Coastguard Worker</TR> 156*5e7646d2SAndroid Build Coastguard Worker<TR> 157*5e7646d2SAndroid Build Coastguard Worker <TD>class-deleted.tmpl</TD> 158*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows the "class deleted" message.</TD> 159*5e7646d2SAndroid Build Coastguard Worker</TR> 160*5e7646d2SAndroid Build Coastguard Worker<TR> 161*5e7646d2SAndroid Build Coastguard Worker <TD>class-jobs-header.tmpl</TD> 162*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows the "jobs" header for jobs in a class.</TD> 163*5e7646d2SAndroid Build Coastguard Worker</TR> 164*5e7646d2SAndroid Build Coastguard Worker<TR> 165*5e7646d2SAndroid Build Coastguard Worker <TD>class-modified.tmpl</TD> 166*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows the "class modified" message.</TD> 167*5e7646d2SAndroid Build Coastguard Worker</TR> 168*5e7646d2SAndroid Build Coastguard Worker<TR> 169*5e7646d2SAndroid Build Coastguard Worker <TD>classes.tmpl</TD> 170*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows one or more printer classes.</TD> 171*5e7646d2SAndroid Build Coastguard Worker</TR> 172*5e7646d2SAndroid Build Coastguard Worker<TR> 173*5e7646d2SAndroid Build Coastguard Worker <TD>classes-header.tmpl</TD> 174*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows the "showing N of M classes" header in the class list.</TD> 175*5e7646d2SAndroid Build Coastguard Worker</TR> 176*5e7646d2SAndroid Build Coastguard Worker<TR> 177*5e7646d2SAndroid Build Coastguard Worker <TD>command.tmpl</TD> 178*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows the status of a command job.</TD> 179*5e7646d2SAndroid Build Coastguard Worker</TR> 180*5e7646d2SAndroid Build Coastguard Worker<TR> 181*5e7646d2SAndroid Build Coastguard Worker <TD>edit-config.tmpl</TD> 182*5e7646d2SAndroid Build Coastguard Worker <TD>This is the cupsd.conf editor page.</TD> 183*5e7646d2SAndroid Build Coastguard Worker</TR> 184*5e7646d2SAndroid Build Coastguard Worker<TR> 185*5e7646d2SAndroid Build Coastguard Worker <TD>error.tmpl</TD> 186*5e7646d2SAndroid Build Coastguard Worker <TD>This template displays a generic error message.</TD> 187*5e7646d2SAndroid Build Coastguard Worker</TR> 188*5e7646d2SAndroid Build Coastguard Worker<TR> 189*5e7646d2SAndroid Build Coastguard Worker <TD>error-op.tmpl</TD> 190*5e7646d2SAndroid Build Coastguard Worker <TD>This is the "unknown operation" error page.</TD> 191*5e7646d2SAndroid Build Coastguard Worker</TR> 192*5e7646d2SAndroid Build Coastguard Worker<TR> 193*5e7646d2SAndroid Build Coastguard Worker <TD>header.tmpl(.in)</TD> 194*5e7646d2SAndroid Build Coastguard Worker <TD>This template is used as the standard header on all dynamic content. Edit the <VAR>header.tmpl.in</VAR> file and let the configure script generate the <VAR>header.tmpl</VAR> file.</TD> 195*5e7646d2SAndroid Build Coastguard Worker</TR> 196*5e7646d2SAndroid Build Coastguard Worker<TR> 197*5e7646d2SAndroid Build Coastguard Worker <TD>help-header.tmpl</TD> 198*5e7646d2SAndroid Build Coastguard Worker <TD>This is the top part of the help page.</TD> 199*5e7646d2SAndroid Build Coastguard Worker</TR> 200*5e7646d2SAndroid Build Coastguard Worker<TR> 201*5e7646d2SAndroid Build Coastguard Worker <TD>help-printable.tmpl</TD> 202*5e7646d2SAndroid Build Coastguard Worker <TD>This is the standard page header for the printable version of help files.</TD> 203*5e7646d2SAndroid Build Coastguard Worker</TR> 204*5e7646d2SAndroid Build Coastguard Worker<TR> 205*5e7646d2SAndroid Build Coastguard Worker <TD>help-trailer.tmpl</TD> 206*5e7646d2SAndroid Build Coastguard Worker <TD>This is the bottom part of the help page.</TD> 207*5e7646d2SAndroid Build Coastguard Worker</TR> 208*5e7646d2SAndroid Build Coastguard Worker<TR> 209*5e7646d2SAndroid Build Coastguard Worker <TD>job-cancel.tmpl</TD> 210*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows "job canceled".</TD> 211*5e7646d2SAndroid Build Coastguard Worker</TR> 212*5e7646d2SAndroid Build Coastguard Worker<TR> 213*5e7646d2SAndroid Build Coastguard Worker <TD>job-hold.tmpl</TD> 214*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows "job held".</TD> 215*5e7646d2SAndroid Build Coastguard Worker</TR> 216*5e7646d2SAndroid Build Coastguard Worker<TR> 217*5e7646d2SAndroid Build Coastguard Worker <TD>job-move.tmpl</TD> 218*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows the move-job form.</TD> 219*5e7646d2SAndroid Build Coastguard Worker</TR> 220*5e7646d2SAndroid Build Coastguard Worker<TR> 221*5e7646d2SAndroid Build Coastguard Worker <TD>job-moved.tmpl</TD> 222*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows "job moved".</TD> 223*5e7646d2SAndroid Build Coastguard Worker</TR> 224*5e7646d2SAndroid Build Coastguard Worker<TR> 225*5e7646d2SAndroid Build Coastguard Worker <TD>job-release.tmpl</TD> 226*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows "job released".</TD> 227*5e7646d2SAndroid Build Coastguard Worker</TR> 228*5e7646d2SAndroid Build Coastguard Worker<TR> 229*5e7646d2SAndroid Build Coastguard Worker <TD>job-restart.tmpl</TD> 230*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows "job reprinted".</TD> 231*5e7646d2SAndroid Build Coastguard Worker</TR> 232*5e7646d2SAndroid Build Coastguard Worker<TR> 233*5e7646d2SAndroid Build Coastguard Worker <TD>jobs.tmpl</TD> 234*5e7646d2SAndroid Build Coastguard Worker <TD>This template is used to list the print jobs on a server, class, or printer.</TD> 235*5e7646d2SAndroid Build Coastguard Worker</TR> 236*5e7646d2SAndroid Build Coastguard Worker<TR> 237*5e7646d2SAndroid Build Coastguard Worker <TD>jobs-header.tmpl</TD> 238*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows the "showing N or M jobs" header in the jobs list.</TD> 239*5e7646d2SAndroid Build Coastguard Worker</TR> 240*5e7646d2SAndroid Build Coastguard Worker<TR> 241*5e7646d2SAndroid Build Coastguard Worker <TD>list-available-printers.tmpl</TD> 242*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows a list of new printers that have been found.</TD> 243*5e7646d2SAndroid Build Coastguard Worker</TR> 244*5e7646d2SAndroid Build Coastguard Worker<TR> 245*5e7646d2SAndroid Build Coastguard Worker <TD>modify-class.tmpl</TD> 246*5e7646d2SAndroid Build Coastguard Worker <TD>This template is used as the first form when modifying a class.</TD> 247*5e7646d2SAndroid Build Coastguard Worker</TR> 248*5e7646d2SAndroid Build Coastguard Worker<TR> 249*5e7646d2SAndroid Build Coastguard Worker <TD>modify-printer.tmpl</TD> 250*5e7646d2SAndroid Build Coastguard Worker <TD>This template is used as the first form when modifying a printer.</TD> 251*5e7646d2SAndroid Build Coastguard Worker</TR> 252*5e7646d2SAndroid Build Coastguard Worker<TR> 253*5e7646d2SAndroid Build Coastguard Worker <TD>norestart.tmpl</TD> 254*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows "server not restarted because no changes were made to the configuration".</TD> 255*5e7646d2SAndroid Build Coastguard Worker</TR> 256*5e7646d2SAndroid Build Coastguard Worker<TR> 257*5e7646d2SAndroid Build Coastguard Worker <TD>option-boolean.tmpl</TD> 258*5e7646d2SAndroid Build Coastguard Worker <TD>This template is used to select a boolean PPD option.</TD> 259*5e7646d2SAndroid Build Coastguard Worker</TR> 260*5e7646d2SAndroid Build Coastguard Worker<TR> 261*5e7646d2SAndroid Build Coastguard Worker <TD>option-conflict.tmpl</TD> 262*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows the conflicting options.</TD> 263*5e7646d2SAndroid Build Coastguard Worker</TR> 264*5e7646d2SAndroid Build Coastguard Worker<TR> 265*5e7646d2SAndroid Build Coastguard Worker <TD>option-header.tmpl</TD> 266*5e7646d2SAndroid Build Coastguard Worker <TD>This template is used to start a PPD option group.</TD> 267*5e7646d2SAndroid Build Coastguard Worker</TR> 268*5e7646d2SAndroid Build Coastguard Worker<TR> 269*5e7646d2SAndroid Build Coastguard Worker <TD>option-pickmany.tmpl</TD> 270*5e7646d2SAndroid Build Coastguard Worker <TD>This template is used to select a multi-valued PPD option.</TD> 271*5e7646d2SAndroid Build Coastguard Worker</TR> 272*5e7646d2SAndroid Build Coastguard Worker<TR> 273*5e7646d2SAndroid Build Coastguard Worker <TD>option-pickone.tmpl</TD> 274*5e7646d2SAndroid Build Coastguard Worker <TD>This template is used to select a single-valued PPD option.</TD> 275*5e7646d2SAndroid Build Coastguard Worker</TR> 276*5e7646d2SAndroid Build Coastguard Worker<TR> 277*5e7646d2SAndroid Build Coastguard Worker <TD>option-trailer.tmpl</TD> 278*5e7646d2SAndroid Build Coastguard Worker <TD>This template is used to end a PPD option group.</TD> 279*5e7646d2SAndroid Build Coastguard Worker</TR> 280*5e7646d2SAndroid Build Coastguard Worker<TR> 281*5e7646d2SAndroid Build Coastguard Worker <TD>pager.tmpl</TD> 282*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows the previous/next pager bar.</TD> 283*5e7646d2SAndroid Build Coastguard Worker</TR> 284*5e7646d2SAndroid Build Coastguard Worker<TR> 285*5e7646d2SAndroid Build Coastguard Worker <TD>printer.tmpl</TD> 286*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows information about a single printer.</TD> 287*5e7646d2SAndroid Build Coastguard Worker</TR> 288*5e7646d2SAndroid Build Coastguard Worker<TR> 289*5e7646d2SAndroid Build Coastguard Worker <TD>printer-accept.tmpl</TD> 290*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows "printer now accepting jobs".</TD> 291*5e7646d2SAndroid Build Coastguard Worker</TR> 292*5e7646d2SAndroid Build Coastguard Worker<TR> 293*5e7646d2SAndroid Build Coastguard Worker <TD>printer-added.tmpl</TD> 294*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows "printer added".</TD> 295*5e7646d2SAndroid Build Coastguard Worker</TR> 296*5e7646d2SAndroid Build Coastguard Worker<TR> 297*5e7646d2SAndroid Build Coastguard Worker <TD>printer-cancel-jobs.tmpl</TD> 298*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows "All jobs on printer have been canceled."</TD> 299*5e7646d2SAndroid Build Coastguard Worker</TR> 300*5e7646d2SAndroid Build Coastguard Worker<TR> 301*5e7646d2SAndroid Build Coastguard Worker <TD>printer-configured.tmpl</TD> 302*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows "printer configured".</TD> 303*5e7646d2SAndroid Build Coastguard Worker</TR> 304*5e7646d2SAndroid Build Coastguard Worker<TR> 305*5e7646d2SAndroid Build Coastguard Worker <TD>printer-confirm.tmpl</TD> 306*5e7646d2SAndroid Build Coastguard Worker <TD>This template asks the user to confirm the deletion of a printer.</TD> 307*5e7646d2SAndroid Build Coastguard Worker</TR> 308*5e7646d2SAndroid Build Coastguard Worker<TR> 309*5e7646d2SAndroid Build Coastguard Worker <TD>printer-default.tmpl</TD> 310*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows "default printer set".</TD> 311*5e7646d2SAndroid Build Coastguard Worker</TR> 312*5e7646d2SAndroid Build Coastguard Worker<TR> 313*5e7646d2SAndroid Build Coastguard Worker <TD>printer-deleted.tmpl</TD> 314*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows "printer deleted".</TD> 315*5e7646d2SAndroid Build Coastguard Worker</TR> 316*5e7646d2SAndroid Build Coastguard Worker<TR> 317*5e7646d2SAndroid Build Coastguard Worker <TD>printer-jobs-header.tmpl</TD> 318*5e7646d2SAndroid Build Coastguard Worker <TD>This templates shows the "jobs" header for jobs on a printer.</TD> 319*5e7646d2SAndroid Build Coastguard Worker</TR> 320*5e7646d2SAndroid Build Coastguard Worker<TR> 321*5e7646d2SAndroid Build Coastguard Worker <TD>printer-modified.tmpl</TD> 322*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows "printer modified".</TD> 323*5e7646d2SAndroid Build Coastguard Worker</TR> 324*5e7646d2SAndroid Build Coastguard Worker<TR> 325*5e7646d2SAndroid Build Coastguard Worker <TD>printer-reject.tmpl</TD> 326*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows "printer now rejecting jobs".</TD> 327*5e7646d2SAndroid Build Coastguard Worker</TR> 328*5e7646d2SAndroid Build Coastguard Worker<TR> 329*5e7646d2SAndroid Build Coastguard Worker <TD>printer-start.tmpl</TD> 330*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows "printer started".</TD> 331*5e7646d2SAndroid Build Coastguard Worker</TR> 332*5e7646d2SAndroid Build Coastguard Worker<TR> 333*5e7646d2SAndroid Build Coastguard Worker <TD>printer-stop.tmpl</TD> 334*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows "printer stopped".</TD> 335*5e7646d2SAndroid Build Coastguard Worker</TR> 336*5e7646d2SAndroid Build Coastguard Worker<TR> 337*5e7646d2SAndroid Build Coastguard Worker <TD>printers.tmpl</TD> 338*5e7646d2SAndroid Build Coastguard Worker <TD>This template is used to list information on one or more printers.</TD> 339*5e7646d2SAndroid Build Coastguard Worker</TR> 340*5e7646d2SAndroid Build Coastguard Worker<TR> 341*5e7646d2SAndroid Build Coastguard Worker <TD>printers-header.tmpl</TD> 342*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows the "showing printer N of M" header in the printers list.</TD> 343*5e7646d2SAndroid Build Coastguard Worker</TR> 344*5e7646d2SAndroid Build Coastguard Worker<TR> 345*5e7646d2SAndroid Build Coastguard Worker <TD>restart.tmpl</TD> 346*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows "server restarting".</TD> 347*5e7646d2SAndroid Build Coastguard Worker</TR> 348*5e7646d2SAndroid Build Coastguard Worker<TR> 349*5e7646d2SAndroid Build Coastguard Worker <TD>search.tmpl</TD> 350*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows the search form.</TD> 351*5e7646d2SAndroid Build Coastguard Worker</TR> 352*5e7646d2SAndroid Build Coastguard Worker<TR> 353*5e7646d2SAndroid Build Coastguard Worker <TD>set-printer-options-header.tmpl</TD> 354*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows the first part of the set printer options form.</TD> 355*5e7646d2SAndroid Build Coastguard Worker</TR> 356*5e7646d2SAndroid Build Coastguard Worker<TR> 357*5e7646d2SAndroid Build Coastguard Worker <TD>set-printer-options-trailer.tmpl</TD> 358*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows the last part of the set printer options form.</TD> 359*5e7646d2SAndroid Build Coastguard Worker</TR> 360*5e7646d2SAndroid Build Coastguard Worker<TR> 361*5e7646d2SAndroid Build Coastguard Worker <TD>test-page.tmpl</TD> 362*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows "test page printed".</TD> 363*5e7646d2SAndroid Build Coastguard Worker</TR> 364*5e7646d2SAndroid Build Coastguard Worker<TR> 365*5e7646d2SAndroid Build Coastguard Worker <TD>trailer.tmpl</TD> 366*5e7646d2SAndroid Build Coastguard Worker <TD>This template is used as the standard trailer on all dynamic content.</TD> 367*5e7646d2SAndroid Build Coastguard Worker</TR> 368*5e7646d2SAndroid Build Coastguard Worker<TR> 369*5e7646d2SAndroid Build Coastguard Worker <TD>users.tmpl</TD> 370*5e7646d2SAndroid Build Coastguard Worker <TD>This template shows the set allowed users form.</TD> 371*5e7646d2SAndroid Build Coastguard Worker</TR> 372*5e7646d2SAndroid Build Coastguard Worker</TBODY> 373*5e7646d2SAndroid Build Coastguard Worker</TABLE></DIV> 374*5e7646d2SAndroid Build Coastguard Worker 375*5e7646d2SAndroid Build Coastguard Worker<H4 ID="VARIABLE">Inserting Attributes and Values</H4> 376*5e7646d2SAndroid Build Coastguard Worker 377*5e7646d2SAndroid Build Coastguard Worker<P>Template files consist of HTML with variable substitutions for named inside curly braces "{name}". Variable names are generally the IPP attribute names with the hyphen ("-") replaced by the underscore ("_") character. For example, the <TT>job-printer-uri</TT> attribute is renamed to <TT>job_printer_uri</TT>.</P> 378*5e7646d2SAndroid Build Coastguard Worker 379*5e7646d2SAndroid Build Coastguard Worker<P>Curley braces ("{" and "}") to indicate substitutions, and the backslash ("\") character for quoting. To insert any of these special characters as-is you need to use the HTML <CODE>&name;</CODE> mechanism or prefix each special character with the backslash ("\".)</P> 380*5e7646d2SAndroid Build Coastguard Worker 381*5e7646d2SAndroid Build Coastguard Worker<P>You substitute the value of a variable using <CODE>{NAME}</CODE> in your template file. If the variable is undefined then the <CODE>{NAME}</CODE> string is output as-is.</P> 382*5e7646d2SAndroid Build Coastguard Worker 383*5e7646d2SAndroid Build Coastguard Worker<P>To substitute an empty string if the variable is undefined, use <CODE>{?NAME}</CODE> instead.</P> 384*5e7646d2SAndroid Build Coastguard Worker 385*5e7646d2SAndroid Build Coastguard Worker<H4>Array Substitutions</H4> 386*5e7646d2SAndroid Build Coastguard Worker 387*5e7646d2SAndroid Build Coastguard Worker<P>The number of array elements can be inserted using <CODE>{#NAME}</CODE>. If the array is undefined then 0 is output. The current array element (starting at 1) is inserted with <CODE>{#}</CODE>.</P> 388*5e7646d2SAndroid Build Coastguard Worker 389*5e7646d2SAndroid Build Coastguard Worker<P>Arrays are handled using <CODE>{[NAME]</CODE> at the beginning of a section and <CODE>}</CODE> at the end. The information between the closing bracket ("]") and closing brace ("}") is repeated for as many elements as are in the named array. For example, the following template will display a list of each job in the <CODE>job_id</CODE> array:</P> 390*5e7646d2SAndroid Build Coastguard Worker 391*5e7646d2SAndroid Build Coastguard Worker<PRE CLASS="command"> 392*5e7646d2SAndroid Build Coastguard Worker<TABLE> 393*5e7646d2SAndroid Build Coastguard Worker<TR> 394*5e7646d2SAndroid Build Coastguard Worker <TH>Job ID</TH> 395*5e7646d2SAndroid Build Coastguard Worker <TH>Destination</TH> 396*5e7646d2SAndroid Build Coastguard Worker <TH>Title</TH> 397*5e7646d2SAndroid Build Coastguard Worker</TR> 398*5e7646d2SAndroid Build Coastguard Worker 399*5e7646d2SAndroid Build Coastguard Worker{[job_id] 400*5e7646d2SAndroid Build Coastguard Worker<TR> 401*5e7646d2SAndroid Build Coastguard Worker <TD>{?job_id}</TD> 402*5e7646d2SAndroid Build Coastguard Worker <TD>{?job_printer_name}</TD> 403*5e7646d2SAndroid Build Coastguard Worker <TD>{?job_name}</TD> 404*5e7646d2SAndroid Build Coastguard Worker</TR> 405*5e7646d2SAndroid Build Coastguard Worker} 406*5e7646d2SAndroid Build Coastguard Worker</TABLE> 407*5e7646d2SAndroid Build Coastguard Worker</PRE> 408*5e7646d2SAndroid Build Coastguard Worker 409*5e7646d2SAndroid Build Coastguard Worker<P>Arrays can be nested, however all elements within the curly braces ("{" and "}") are indexed using the innermost array.</P> 410*5e7646d2SAndroid Build Coastguard Worker 411*5e7646d2SAndroid Build Coastguard Worker<H4>Conditional Tests</H4> 412*5e7646d2SAndroid Build Coastguard Worker 413*5e7646d2SAndroid Build Coastguard Worker<P>Templates can also test variables against specific values and conditionally include text in the template. The format is:</P> 414*5e7646d2SAndroid Build Coastguard Worker 415*5e7646d2SAndroid Build Coastguard Worker<PRE CLASS="command"> 416*5e7646d2SAndroid Build Coastguard Worker{<I>variable</I>?<I>true</I>:<I>false</I>} 417*5e7646d2SAndroid Build Coastguard Worker{<I>variable</I>=<I>value</I>?<I>true</I>:<I>false</I>} 418*5e7646d2SAndroid Build Coastguard Worker{<I>variable</I>!<I>value</I>?<I>true</I>:<I>false</I>} 419*5e7646d2SAndroid Build Coastguard Worker{<I>variable</I><<I>value</I>?<I>true</I>:<I>false</I>} 420*5e7646d2SAndroid Build Coastguard Worker{<I>variable</I>><I>value</I>?<I>true</I>:<I>false</I>} 421*5e7646d2SAndroid Build Coastguard Worker</PRE> 422*5e7646d2SAndroid Build Coastguard Worker 423*5e7646d2SAndroid Build Coastguard Worker<P>where <VAR>true</VAR> is the text that is included if the condition is true and <VAR>false</VAR> is the text that is included if the condition is false. A value of <CODE>#</CODE> is replaced with the current element number (starting at 1.) The character after the variable name specifies the condition to test. <A HREF="#table2">Table 2</A> shows the available test conditions.</P> 424*5e7646d2SAndroid Build Coastguard Worker 425*5e7646d2SAndroid Build Coastguard Worker<DIV CLASS="table"><TABLE ID="table2" SUMMARY="Template Substitution Conditions"> 426*5e7646d2SAndroid Build Coastguard Worker<CAPTION>Table 2: Template Substitution Conditions</CAPTION> 427*5e7646d2SAndroid Build Coastguard Worker<TR> 428*5e7646d2SAndroid Build Coastguard Worker <TH>Char</TH> 429*5e7646d2SAndroid Build Coastguard Worker <TH>Condition</TH> 430*5e7646d2SAndroid Build Coastguard Worker</TR> 431*5e7646d2SAndroid Build Coastguard Worker<TR> 432*5e7646d2SAndroid Build Coastguard Worker <TD>?</TD> 433*5e7646d2SAndroid Build Coastguard Worker <TD>True if <VAR>variable</VAR> exists.</TD> 434*5e7646d2SAndroid Build Coastguard Worker</TR> 435*5e7646d2SAndroid Build Coastguard Worker<TR> 436*5e7646d2SAndroid Build Coastguard Worker <TD>=</TD> 437*5e7646d2SAndroid Build Coastguard Worker <TD>True if <VAR>variable</VAR> is equal to <VAR>value</VAR>.</TD> 438*5e7646d2SAndroid Build Coastguard Worker</TR> 439*5e7646d2SAndroid Build Coastguard Worker<TR> 440*5e7646d2SAndroid Build Coastguard Worker <TD>!</TD> 441*5e7646d2SAndroid Build Coastguard Worker <TD>True if <VAR>variable</VAR> is not equal to <VAR>value</VAR>.</TD> 442*5e7646d2SAndroid Build Coastguard Worker</TR> 443*5e7646d2SAndroid Build Coastguard Worker<TR> 444*5e7646d2SAndroid Build Coastguard Worker <TD><</TD> 445*5e7646d2SAndroid Build Coastguard Worker <TD>True if <VAR>variable</VAR> is less than <VAR>value</VAR>.</TD> 446*5e7646d2SAndroid Build Coastguard Worker</TR> 447*5e7646d2SAndroid Build Coastguard Worker<TR> 448*5e7646d2SAndroid Build Coastguard Worker <TD>></TD> 449*5e7646d2SAndroid Build Coastguard Worker <TD>True if <VAR>variable</VAR> is greater than <VAR>value</VAR>.</TD> 450*5e7646d2SAndroid Build Coastguard Worker</TR> 451*5e7646d2SAndroid Build Coastguard Worker</TABLE></DIV> 452*5e7646d2SAndroid Build Coastguard Worker 453*5e7646d2SAndroid Build Coastguard Worker<H4 ID="LOCTMPL">What to Localize in a Template File</H4> 454*5e7646d2SAndroid Build Coastguard Worker 455*5e7646d2SAndroid Build Coastguard Worker<P>Because HTML contains both markup (that generally is not localized) and text (which <em>is</em> localized), you should carefully avoid changing the markup unless it contains human-readable text. The following HTML examples show how to correctly localize template files:</P> 456*5e7646d2SAndroid Build Coastguard Worker 457*5e7646d2SAndroid Build Coastguard Worker<P CLASS="command"> 458*5e7646d2SAndroid Build Coastguard Worker<!-- English table heading --><br> 459*5e7646d2SAndroid Build Coastguard Worker<table class="list" summary="Printer List"><br> 460*5e7646d2SAndroid Build Coastguard Worker<br> 461*5e7646d2SAndroid Build Coastguard Worker<!-- Correctly localized to French; the class attribute is unchanged but summary is localized --><br> 462*5e7646d2SAndroid Build Coastguard Worker<table class="list" summary="Liste des imprimantes"><br> 463*5e7646d2SAndroid Build Coastguard Worker<br> 464*5e7646d2SAndroid Build Coastguard Worker<br> 465*5e7646d2SAndroid Build Coastguard Worker<!-- English hyperlink --><br> 466*5e7646d2SAndroid Build Coastguard Worker<li><a {SECTION=help?class="active" :}href="/help/">Help</a></li><br> 467*5e7646d2SAndroid Build Coastguard Worker<br> 468*5e7646d2SAndroid Build Coastguard Worker<!-- Correctly localized to Danish; the href attribute is unchanged while the link text is localized --><br> 469*5e7646d2SAndroid Build Coastguard Worker<li><a {SECTION=help?class="active" :}href="/help/">Hjælp</a></li><br> 470*5e7646d2SAndroid Build Coastguard Worker</P> 471*5e7646d2SAndroid Build Coastguard Worker 472*5e7646d2SAndroid Build Coastguard Worker 473*5e7646d2SAndroid Build Coastguard Worker<H3 ID="CGI">CGI Programs</H3> 474*5e7646d2SAndroid Build Coastguard Worker 475*5e7646d2SAndroid Build Coastguard Worker<P>CUPS uses five CGI programs to manage the dynamic web interfaces:</P> 476*5e7646d2SAndroid Build Coastguard Worker 477*5e7646d2SAndroid Build Coastguard Worker<UL> 478*5e7646d2SAndroid Build Coastguard Worker 479*5e7646d2SAndroid Build Coastguard Worker <LI><CODE>admin.cgi</CODE></LI> 480*5e7646d2SAndroid Build Coastguard Worker <LI><CODE>classes.cgi</CODE></LI> 481*5e7646d2SAndroid Build Coastguard Worker <LI><CODE>help.cgi</CODE></LI> 482*5e7646d2SAndroid Build Coastguard Worker <LI><CODE>jobs.cgi</CODE></LI> 483*5e7646d2SAndroid Build Coastguard Worker <LI><CODE>printers.cgi</CODE></LI> 484*5e7646d2SAndroid Build Coastguard Worker 485*5e7646d2SAndroid Build Coastguard Worker</UL> 486*5e7646d2SAndroid Build Coastguard Worker 487*5e7646d2SAndroid Build Coastguard Worker<P>Each CGI program accepts standard form variables such as <CODE>OP</CODE> for the operation to perform, <CODE>PRINTER_NAME</CODE> for the printer or class name to operate on, <CODE>QUERY</CODE> for any search words,<CODE>FIRST</CODE> for the first class, job, or printer to display, and <CODE>ORDER</CODE> to control the order that classes, jobs, or printers are displayed.</P> 488*5e7646d2SAndroid Build Coastguard Worker 489*5e7646d2SAndroid Build Coastguard Worker<P>In addition, the <CODE>classes.cgi</CODE>, <CODE>jobs.cgi</CODE>, and <CODE>printers.cgi</CODE> programs support a <CODE>WHICH_JOBS</CODE> variable to control which jobs are displayed. <A HREF="#table3">Table 3</A> lists the supported values.</P> 490*5e7646d2SAndroid Build Coastguard Worker 491*5e7646d2SAndroid Build Coastguard Worker<DIV CLASS="table"><TABLE ID="table3" SUMMARY="WHICH_JOBS Values"> 492*5e7646d2SAndroid Build Coastguard Worker<CAPTION>Table 3: WHICH_JOBS Values</CAPTION> 493*5e7646d2SAndroid Build Coastguard Worker<THEAD> 494*5e7646d2SAndroid Build Coastguard Worker<TR> 495*5e7646d2SAndroid Build Coastguard Worker <TH>WHICH_JOBS Value</TH> 496*5e7646d2SAndroid Build Coastguard Worker <TH>Description</TH> 497*5e7646d2SAndroid Build Coastguard Worker</TR> 498*5e7646d2SAndroid Build Coastguard Worker</THEAD> 499*5e7646d2SAndroid Build Coastguard Worker<TR> 500*5e7646d2SAndroid Build Coastguard Worker <TD>all</TD> 501*5e7646d2SAndroid Build Coastguard Worker <TD>Show all jobs</TD> 502*5e7646d2SAndroid Build Coastguard Worker</TR> 503*5e7646d2SAndroid Build Coastguard Worker<TR> 504*5e7646d2SAndroid Build Coastguard Worker <TD>completed</TD> 505*5e7646d2SAndroid Build Coastguard Worker <TD>Show completed jobs</TD> 506*5e7646d2SAndroid Build Coastguard Worker</TR> 507*5e7646d2SAndroid Build Coastguard Worker<TR> 508*5e7646d2SAndroid Build Coastguard Worker <TD>not-completed</TD> 509*5e7646d2SAndroid Build Coastguard Worker <TD>Show active jobs</TD> 510*5e7646d2SAndroid Build Coastguard Worker</TR> 511*5e7646d2SAndroid Build Coastguard Worker</TABLE></DIV> 512*5e7646d2SAndroid Build Coastguard Worker 513*5e7646d2SAndroid Build Coastguard Worker<H4 ID="admin.cgi">admin.cgi</H4> 514*5e7646d2SAndroid Build Coastguard Worker 515*5e7646d2SAndroid Build Coastguard Worker<P>The <CODE>admin.cgi</CODE> program handles all of the printer and class administration functions and is run for all direct accesses to the <VAR>/admin</VAR> resource. For most operations it uses the <CODE>PRINTER_NAME</CODE> and <CODE>OP</CODE> form variables to specify the action requested. <A HREF="#table4">Table 4</A> shows the supported <CODE>OP</CODE> values.</P> 516*5e7646d2SAndroid Build Coastguard Worker 517*5e7646d2SAndroid Build Coastguard Worker<DIV CLASS="table"><TABLE ID="table4" SUMMARY="admin.cgi OP Values"> 518*5e7646d2SAndroid Build Coastguard Worker<CAPTION>Table 4: admin.cgi OP Values</CAPTION> 519*5e7646d2SAndroid Build Coastguard Worker<THEAD> 520*5e7646d2SAndroid Build Coastguard Worker<TR> 521*5e7646d2SAndroid Build Coastguard Worker <TH>OP Value</TH> 522*5e7646d2SAndroid Build Coastguard Worker <TH>Description</TH> 523*5e7646d2SAndroid Build Coastguard Worker</TR> 524*5e7646d2SAndroid Build Coastguard Worker</THEAD> 525*5e7646d2SAndroid Build Coastguard Worker<TBODY> 526*5e7646d2SAndroid Build Coastguard Worker<TR> 527*5e7646d2SAndroid Build Coastguard Worker <TD>add-class</TD> 528*5e7646d2SAndroid Build Coastguard Worker <TD>Adds a new printer class.</TD> 529*5e7646d2SAndroid Build Coastguard Worker</TR> 530*5e7646d2SAndroid Build Coastguard Worker<TR> 531*5e7646d2SAndroid Build Coastguard Worker <TD>add-printer</TD> 532*5e7646d2SAndroid Build Coastguard Worker <TD>Adds a new printer.</TD> 533*5e7646d2SAndroid Build Coastguard Worker</TR> 534*5e7646d2SAndroid Build Coastguard Worker<TR> 535*5e7646d2SAndroid Build Coastguard Worker <TD>config-server</TD> 536*5e7646d2SAndroid Build Coastguard Worker <TD>Configures the server.</TD> 537*5e7646d2SAndroid Build Coastguard Worker</TR> 538*5e7646d2SAndroid Build Coastguard Worker<TR> 539*5e7646d2SAndroid Build Coastguard Worker <TD>delete-class</TD> 540*5e7646d2SAndroid Build Coastguard Worker <TD>Deletes a printer class. The form variable <CODE>CONFIRM</CODE> 541*5e7646d2SAndroid Build Coastguard Worker may be set to any value to bypass the confirmation page.</TD> 542*5e7646d2SAndroid Build Coastguard Worker</TR> 543*5e7646d2SAndroid Build Coastguard Worker<TR> 544*5e7646d2SAndroid Build Coastguard Worker <TD>delete-printer</TD> 545*5e7646d2SAndroid Build Coastguard Worker <TD>Deletes a printer. The form variable <CODE>CONFIRM</CODE> 546*5e7646d2SAndroid Build Coastguard Worker may be set to any value to bypass the confirmation page.</TD> 547*5e7646d2SAndroid Build Coastguard Worker</TR> 548*5e7646d2SAndroid Build Coastguard Worker<TR> 549*5e7646d2SAndroid Build Coastguard Worker <TD>find-new-printers</TD> 550*5e7646d2SAndroid Build Coastguard Worker <TD>Find new printers that have not yet been added.</TD> 551*5e7646d2SAndroid Build Coastguard Worker</TR> 552*5e7646d2SAndroid Build Coastguard Worker<TR> 553*5e7646d2SAndroid Build Coastguard Worker <TD>modify-class</TD> 554*5e7646d2SAndroid Build Coastguard Worker <TD>Modifies a printer class.</TD> 555*5e7646d2SAndroid Build Coastguard Worker</TR> 556*5e7646d2SAndroid Build Coastguard Worker<TR> 557*5e7646d2SAndroid Build Coastguard Worker <TD>modify-printer</TD> 558*5e7646d2SAndroid Build Coastguard Worker <TD>Modifies a printer.</TD> 559*5e7646d2SAndroid Build Coastguard Worker</TR> 560*5e7646d2SAndroid Build Coastguard Worker<TR> 561*5e7646d2SAndroid Build Coastguard Worker <TD>redirect</TD> 562*5e7646d2SAndroid Build Coastguard Worker <TD>Redirects the web browser to the location referenced by 563*5e7646d2SAndroid Build Coastguard Worker the URL form variable.</TD> 564*5e7646d2SAndroid Build Coastguard Worker</TR> 565*5e7646d2SAndroid Build Coastguard Worker<TR> 566*5e7646d2SAndroid Build Coastguard Worker <TD>set-allowed-users</TD> 567*5e7646d2SAndroid Build Coastguard Worker <TD>Sets the allowed users for a destination.</TD> 568*5e7646d2SAndroid Build Coastguard Worker</TR> 569*5e7646d2SAndroid Build Coastguard Worker<TR> 570*5e7646d2SAndroid Build Coastguard Worker <TD>set-as-default</TD> 571*5e7646d2SAndroid Build Coastguard Worker <TD>Sets the default destination.</TD> 572*5e7646d2SAndroid Build Coastguard Worker</TR> 573*5e7646d2SAndroid Build Coastguard Worker<TR> 574*5e7646d2SAndroid Build Coastguard Worker <TD>set-printer-options</TD> 575*5e7646d2SAndroid Build Coastguard Worker <TD>Sets the default options for a printer.</TD> 576*5e7646d2SAndroid Build Coastguard Worker</TR> 577*5e7646d2SAndroid Build Coastguard Worker<TR> 578*5e7646d2SAndroid Build Coastguard Worker <TD>set-sharing</TD> 579*5e7646d2SAndroid Build Coastguard Worker <TD>Sets the printer-is-shared attribute for a destination.</TD> 580*5e7646d2SAndroid Build Coastguard Worker</TR> 581*5e7646d2SAndroid Build Coastguard Worker</TBODY> 582*5e7646d2SAndroid Build Coastguard Worker</TABLE></DIV> 583*5e7646d2SAndroid Build Coastguard Worker 584*5e7646d2SAndroid Build Coastguard Worker<H4 ID="classes.cgi">classes.cgi</H4> 585*5e7646d2SAndroid Build Coastguard Worker 586*5e7646d2SAndroid Build Coastguard Worker<P>The <CODE>classes.cgi</CODE> program is responsible for listing class information, including jobs destined for that class. It is for all direct accesses to the <VAR>/classes</VAR> resource and supports the optional form variables <CODE>OP</CODE> and <CODE>WHICH_JOBS</CODE>. If no form variables are supplied then the CGI lists all or a specific class and the active jobs on each class. <A HREF="#table5">Table 5</A> shows the supported <CODE>OP</CODE> values.</P> 587*5e7646d2SAndroid Build Coastguard Worker 588*5e7646d2SAndroid Build Coastguard Worker<DIV CLASS="table"><TABLE ID="table5" SUMMARY="classes.cgi OP Values"> 589*5e7646d2SAndroid Build Coastguard Worker<CAPTION>Table 5: classes.cgi OP Values</CAPTION> 590*5e7646d2SAndroid Build Coastguard Worker<THEAD> 591*5e7646d2SAndroid Build Coastguard Worker<TR> 592*5e7646d2SAndroid Build Coastguard Worker <TH>OP Value</TH> 593*5e7646d2SAndroid Build Coastguard Worker <TH>Description</TH> 594*5e7646d2SAndroid Build Coastguard Worker</TR> 595*5e7646d2SAndroid Build Coastguard Worker</THEAD> 596*5e7646d2SAndroid Build Coastguard Worker<TBODY> 597*5e7646d2SAndroid Build Coastguard Worker<TR> 598*5e7646d2SAndroid Build Coastguard Worker <TD>accept-jobs</TD> 599*5e7646d2SAndroid Build Coastguard Worker <TD>Start accepting jobs for a class.</TD> 600*5e7646d2SAndroid Build Coastguard Worker</TR> 601*5e7646d2SAndroid Build Coastguard Worker<TR> 602*5e7646d2SAndroid Build Coastguard Worker <TD>cancel-jobs</TD> 603*5e7646d2SAndroid Build Coastguard Worker <TD>Cancel all jobs for a class.</TD> 604*5e7646d2SAndroid Build Coastguard Worker</TR> 605*5e7646d2SAndroid Build Coastguard Worker<TR> 606*5e7646d2SAndroid Build Coastguard Worker <TD>move-jobs</TD> 607*5e7646d2SAndroid Build Coastguard Worker <TD>Move all jobs to a different destination.</TD> 608*5e7646d2SAndroid Build Coastguard Worker</TR> 609*5e7646d2SAndroid Build Coastguard Worker<TR> 610*5e7646d2SAndroid Build Coastguard Worker <TD>print-test-page</TD> 611*5e7646d2SAndroid Build Coastguard Worker <TD>Print a PostScript test page.</TD> 612*5e7646d2SAndroid Build Coastguard Worker</TR> 613*5e7646d2SAndroid Build Coastguard Worker<TR> 614*5e7646d2SAndroid Build Coastguard Worker <TD>reject-jobs</TD> 615*5e7646d2SAndroid Build Coastguard Worker <TD>Stop accepting jobs for a class.</TD> 616*5e7646d2SAndroid Build Coastguard Worker</TR> 617*5e7646d2SAndroid Build Coastguard Worker<TR> 618*5e7646d2SAndroid Build Coastguard Worker <TD>start-class</TD> 619*5e7646d2SAndroid Build Coastguard Worker <TD>Start processing jobs for a class.</TD> 620*5e7646d2SAndroid Build Coastguard Worker</TR> 621*5e7646d2SAndroid Build Coastguard Worker<TR> 622*5e7646d2SAndroid Build Coastguard Worker <TD>stop-class</TD> 623*5e7646d2SAndroid Build Coastguard Worker <TD>Stop processing jobs for a class.</TD> 624*5e7646d2SAndroid Build Coastguard Worker</TR> 625*5e7646d2SAndroid Build Coastguard Worker</TBODY> 626*5e7646d2SAndroid Build Coastguard Worker</TABLE></DIV> 627*5e7646d2SAndroid Build Coastguard Worker 628*5e7646d2SAndroid Build Coastguard Worker 629*5e7646d2SAndroid Build Coastguard Worker<H4 ID="help.cgi">help.cgi</H4> 630*5e7646d2SAndroid Build Coastguard Worker 631*5e7646d2SAndroid Build Coastguard Worker<P>The <CODE>help.cgi</CODE> program handles all of the on-line help functions and is run for all direct accesses to the <VAR>/help</VAR> resource.</P> 632*5e7646d2SAndroid Build Coastguard Worker 633*5e7646d2SAndroid Build Coastguard Worker 634*5e7646d2SAndroid Build Coastguard Worker<H4 ID="jobs.cgi">jobs.cgi</H4> 635*5e7646d2SAndroid Build Coastguard Worker 636*5e7646d2SAndroid Build Coastguard Worker<P>The <CODE>jobs.cgi</CODE> program handles all of the job functions and is run for all direct accesses to the <VAR>/jobs</VAR> resource. For most operations it uses the <CODE>JOB_ID</CODE>, <CODE>OP</CODE>, and <CODE>WHICH_JOBS</CODE> form variables to specify the action requested. <A HREF="#table6">Table 6</A> shows the supported <CODE>OP</CODE> values.</P> 637*5e7646d2SAndroid Build Coastguard Worker 638*5e7646d2SAndroid Build Coastguard Worker<DIV CLASS="table"><TABLE ID="table6" SUMMARY="jobs.cgi OP Values"> 639*5e7646d2SAndroid Build Coastguard Worker<CAPTION>Table 6: jobs.cgi OP Values</CAPTION> 640*5e7646d2SAndroid Build Coastguard Worker<THEAD> 641*5e7646d2SAndroid Build Coastguard Worker<TR> 642*5e7646d2SAndroid Build Coastguard Worker <TH>OP Value</TH> 643*5e7646d2SAndroid Build Coastguard Worker <TH>Description</TH> 644*5e7646d2SAndroid Build Coastguard Worker</TR> 645*5e7646d2SAndroid Build Coastguard Worker</THEAD> 646*5e7646d2SAndroid Build Coastguard Worker<TBODY> 647*5e7646d2SAndroid Build Coastguard Worker<TR> 648*5e7646d2SAndroid Build Coastguard Worker <TD>cancel-job</TD> 649*5e7646d2SAndroid Build Coastguard Worker <TD>Cancels a job.</TD> 650*5e7646d2SAndroid Build Coastguard Worker</TR> 651*5e7646d2SAndroid Build Coastguard Worker<TR> 652*5e7646d2SAndroid Build Coastguard Worker <TD>hold-job</TD> 653*5e7646d2SAndroid Build Coastguard Worker <TD>Holds a job indefinitely.</TD> 654*5e7646d2SAndroid Build Coastguard Worker</TR> 655*5e7646d2SAndroid Build Coastguard Worker<TR> 656*5e7646d2SAndroid Build Coastguard Worker <TD>move-job</TD> 657*5e7646d2SAndroid Build Coastguard Worker <TD>Moves a job to another destination.</TD> 658*5e7646d2SAndroid Build Coastguard Worker</TR> 659*5e7646d2SAndroid Build Coastguard Worker<TR> 660*5e7646d2SAndroid Build Coastguard Worker <TD>release-job</TD> 661*5e7646d2SAndroid Build Coastguard Worker <TD>Releases a job for printing.</TD> 662*5e7646d2SAndroid Build Coastguard Worker</TR> 663*5e7646d2SAndroid Build Coastguard Worker<TR> 664*5e7646d2SAndroid Build Coastguard Worker <TD>restart-job</TD> 665*5e7646d2SAndroid Build Coastguard Worker <TD>Restarts/reprints a stopped, canceled, completed, or aborted 666*5e7646d2SAndroid Build Coastguard Worker print job.</TD> 667*5e7646d2SAndroid Build Coastguard Worker</TR> 668*5e7646d2SAndroid Build Coastguard Worker</TBODY> 669*5e7646d2SAndroid Build Coastguard Worker</TABLE></DIV> 670*5e7646d2SAndroid Build Coastguard Worker 671*5e7646d2SAndroid Build Coastguard Worker 672*5e7646d2SAndroid Build Coastguard Worker<H4 ID="printers.cgi">printers.cgi</H4> 673*5e7646d2SAndroid Build Coastguard Worker 674*5e7646d2SAndroid Build Coastguard Worker<P>The <CODE>printers.cgi</CODE> program is responsible for listing printer information, including jobs destined for that printer. It is for all direct accesses to the <VAR>/printers</VAR> resource and supports the optional form variables <CODE>OP</CODE> and <CODE>WHICH_JOBS</CODE>. If no form variables are supplied then the CGI lists all printers or a specific printer and the active jobs on that printer. <A HREF="#table7">Table 7</A> shows the supported <CODE>OP</CODE> values.</P> 675*5e7646d2SAndroid Build Coastguard Worker 676*5e7646d2SAndroid Build Coastguard Worker<DIV CLASS="table"><TABLE ID="table7" SUMMARY="printers.cgi OP Values"> 677*5e7646d2SAndroid Build Coastguard Worker<CAPTION>Table 7: printers.cgi OP Values</CAPTION> 678*5e7646d2SAndroid Build Coastguard Worker<THEAD> 679*5e7646d2SAndroid Build Coastguard Worker<TR> 680*5e7646d2SAndroid Build Coastguard Worker <TH>OP Value</TH> 681*5e7646d2SAndroid Build Coastguard Worker <TH>Description</TH> 682*5e7646d2SAndroid Build Coastguard Worker</TR> 683*5e7646d2SAndroid Build Coastguard Worker</THEAD> 684*5e7646d2SAndroid Build Coastguard Worker<TBODY> 685*5e7646d2SAndroid Build Coastguard Worker<TR> 686*5e7646d2SAndroid Build Coastguard Worker <TD>accept-jobs</TD> 687*5e7646d2SAndroid Build Coastguard Worker <TD>Start accepting jobs for a printer.</TD> 688*5e7646d2SAndroid Build Coastguard Worker</TR> 689*5e7646d2SAndroid Build Coastguard Worker<TR> 690*5e7646d2SAndroid Build Coastguard Worker <TD>cancel-jobs</TD> 691*5e7646d2SAndroid Build Coastguard Worker <TD>Cancel all jobs for a printer.</TD> 692*5e7646d2SAndroid Build Coastguard Worker</TR> 693*5e7646d2SAndroid Build Coastguard Worker<TR> 694*5e7646d2SAndroid Build Coastguard Worker <TD>clean-print-heads</TD> 695*5e7646d2SAndroid Build Coastguard Worker <TD>Clean the print heads.</TD> 696*5e7646d2SAndroid Build Coastguard Worker</TR> 697*5e7646d2SAndroid Build Coastguard Worker<TR> 698*5e7646d2SAndroid Build Coastguard Worker <TD>move-jobs</TD> 699*5e7646d2SAndroid Build Coastguard Worker <TD>Move all jobs to a different destination.</TD> 700*5e7646d2SAndroid Build Coastguard Worker</TR> 701*5e7646d2SAndroid Build Coastguard Worker<TR> 702*5e7646d2SAndroid Build Coastguard Worker <TD>print-self-test-page</TD> 703*5e7646d2SAndroid Build Coastguard Worker <TD>Print a printer self-test page.</TD> 704*5e7646d2SAndroid Build Coastguard Worker</TR> 705*5e7646d2SAndroid Build Coastguard Worker<TR> 706*5e7646d2SAndroid Build Coastguard Worker <TD>print-test-page</TD> 707*5e7646d2SAndroid Build Coastguard Worker <TD>Print a PostScript test page.</TD> 708*5e7646d2SAndroid Build Coastguard Worker</TR> 709*5e7646d2SAndroid Build Coastguard Worker<TR> 710*5e7646d2SAndroid Build Coastguard Worker <TD>reject-jobs</TD> 711*5e7646d2SAndroid Build Coastguard Worker <TD>Stop accepting jobs for a printer.</TD> 712*5e7646d2SAndroid Build Coastguard Worker</TR> 713*5e7646d2SAndroid Build Coastguard Worker<TR> 714*5e7646d2SAndroid Build Coastguard Worker <TD>start-printer</TD> 715*5e7646d2SAndroid Build Coastguard Worker <TD>Start processing jobs for a printer.</TD> 716*5e7646d2SAndroid Build Coastguard Worker</TR> 717*5e7646d2SAndroid Build Coastguard Worker<TR> 718*5e7646d2SAndroid Build Coastguard Worker <TD>stop-printer</TD> 719*5e7646d2SAndroid Build Coastguard Worker <TD>Stop processing jobs for a printer.</TD> 720*5e7646d2SAndroid Build Coastguard Worker</TR> 721*5e7646d2SAndroid Build Coastguard Worker</TBODY> 722*5e7646d2SAndroid Build Coastguard Worker</TABLE></DIV> 723*5e7646d2SAndroid Build Coastguard Worker 724*5e7646d2SAndroid Build Coastguard Worker</BODY> 725*5e7646d2SAndroid Build Coastguard Worker</HTML> 726