1
2Foomatic Database
3=================
4
5
6foomatic-db
7-----------
8
9The collected knowledge about printers, drivers, and driver options in
10XML files, used by foomatic-db-engine to generate PPD files.
11
12Till Kamppeter <till.kamppeter@gmail.com>
13
14http://www.openprinting.org/
15
16This README contains mainly info for developers. See the file USAGE if
17you want to know how to use Foomatic.
18
19
20Copying
21-------
22
23To most of this package the GPL applies (see http://www.gnu.org/),
24exception are the PPD files in db/source/PPD, they can have different
25licenses (mostly MIT), see the comments in the beginning of the PPD
26files and the license texts in the corresponding driver XML files.
27
28
29Bugs
30----
31
32If you spot a data error or any other bug, please report it on the
33OpenPrinting bug tracking system:
34
35http://bugs.linux-foundation.org/
36
37Choose "OpenPrinting" as the product and "foomatic-db-engine" as the
38component.
39
40
41Intro
42-----
43
44This is the stable version of Foomatic. This version is also the base
45of our database web interface on
46
47http://www.openprinting.org/
48
49
50Programs and important files from this package
51----------------------------------------------
52
53configure.ac
54
55 The source from which GNU autoconf generates the "configure" script
56
57acinclude.m4
58
59 Additional macros for the "configure" script
60
61make_configure
62
63 Calls aclocal and autoconf to generate "configure" from "configure.ac"
64 and "acinclude.m4"
65
66Makefile.in
67
68 The template from which "configure" generates the Makefile
69
70install-sh
71
72 Helper script for "configure"
73
74db/
75
76 The XML database. See below.
77
78xmlschema/*.xsd
79
80 XML Schema files to verify the XML database entries. There is one for
81 each XML file type (printer, driver, option) and an additional one (types.xsd)
82 which is used by the first three.
83
84 To verify XML files run
85
86 xmllint --noout --schema xmlschema/<type>.xsd db/source/<type>/<file>.xml
87
88 For example for a driver:
89
90 xmllint --noout --schema xmlschema/driver.xsd db/source/driver/ljet4.xml
91
92 For all printers use:
93
94 xmllint --noout --schema xmlschema/printer.xsd db/source/printer/*.xml\
95
96 Do this check whenever you create or edit XML files to assure that your
97 XML file is correct.
98
99
100Dependencies
101------------
102
103This package does not require anything else. It is needed by
104foomatic-db-engine, the database engine of Foomatic. It is required to
105use foomatic-db-engine 4.0.0 or newer, as it contains important bug
106fixes and also support for nested composite options. Do not use this
107database with older versions of Foomatic.
108
109See the USAGE file for installation details.
110
111
112About the database
113------------------
114
115The database is provided by this package, additional database entries
116are in "foomatic-db-hpijs", other Foomatic XML files and PPDs are
117supplied with the drivers. "foomatic-db-engine" is needed to make use
118of the Foomatic XML data.
119
120The database is located in one system directory, usually
121/usr/share/foomatic, but it can be also at other places (Install this
122package at first and after that foomatic-db-engine so that
123foomatic-db-engine gets configured correctly automatically). In this
124directory there is the following structure:
125
126 db/ - the database
127 db/oldprinterids - translation table for old numerical
128 printer IDs
129 db/kitload.log - list of third-party "kit" files, logged
130 by foomatic-kitload
131 db/source/ - "source" data, provided by humans, etc
132 db/source/printer/<poid>.xml - printer-specific data, one per printer id
133 db/source/driver/<driver>.xml - driver-specific data, one per driver name
134 db/source/opt/<idx>.xml - option data, one file per option
135 db/source/PPD/ - Ready-made PPD files, usually supplied by
136 printer manufacturers for their PostScript
137 printers.
138
139You can edit the files whenever you want and regenerate the affected
140printer queues with foomatic-configure, there is no on-disk cache, the
141data is always directly derived from the source files. So your changes
142will be taken into account without any special steps.
143
144
145Data
146----
147
148There are three main source datafiles (printers, drivers, and options;
149annotated examples:
150
151
152printer/HP-LaserJet_4000.xml
153============================
154
155# The printer file contains information specific to a particular
156# printer.
157
158<printer id="printer/HP-LaserJet_4000">
159
160# Make and model are not internationalized. There will eventually be
161# an "alias" mechanism, but the need is different.
162
163 <make>HP</make>
164 <model>LaserJet 4000</model>
165
166# According to the Adobe specifications for PPD files every PPD file
167# must contain a unique DOS-compatible file name (the "*PCFileName"),
168# a file name with an up to 8 characters log base name and an up to 3
169# characters long extension, and upper and lower case letters being
170# considered as equal. As every PPD file is for a printer/driver
171# combo, we let the first 6 characters being provided by the printer
172# entry:
173
174 <pcmodel>HPLJ4K</pcmodel>
175
176# The first two characters should be the manufacturer prefix as listed
177# in Appendix D of Adobe's "PostScript Printer Description (PPD) File
178# Format Specification Version 4.3", available on
179
180# http://partners.adobe.com/public/developer/en/ps/5003.PPD_Spec_v4.3.pdf
181
182# Various stuff about the machine
183
184 <mechanism>
185
186# Printer types can be <laser />, <led />, <inkjet />, <dotmatrix />,
187# <impact />, <sublimation />, <transfer />, <thermal />. Other types
188# we have to add to the CGI script on OpenPrinting to make the web
189# interface displaying them properly.
190
191 <laser/>
192
193# At some point we can make color be less of a boolean flag and more
194# of a section full of goodies.
195
196 <!--not "color"-->
197 <resolution>
198
199# In theory this is a list. In practice We've only got one per
200# printer which is the maximum resolution the manufacturer claims for
201# this printer. Do not put empty tags (like "<x></x>" or "<x />" here
202# if the resolution is not known. Leave out the tags (or the whole
203# <resolution> section).
204
205 <dpi>
206 <x>1200</x>
207 <y>1200</y>
208 </dpi>
209 </resolution>
210
211 <consumables>
212
213# Information about ink, drums, etc.
214# The comments are supposed to be qualitative ("Separate drum and
215# toner cartridges")
216
217 <comments>
218 <en>toner</en>
219 </comments>
220
221# There can be <partno>12A1975</partno> elements with manufacturer
222# part numbers for the various carts, etc it takes. Unfortunately,
223# this is not made use of, one could make a consumable database with
224# this for example.
225
226 <!--one or more "partno" elements.-->
227 </consumables>
228 </mechanism>
229
230 <url>http://www.pandi.hp.com/pandi-db/prod_info.show?model=C4118A&name=LaserJet4000</url>
231
232# The lang section. In practice this will be only minimally useful;
233#
234# - Backends can pstops the ps down a level if needed
235# - Backends know if pjl options apply
236# - Backends can know if direct text printing will work
237#
238# Commonly used language tags: <pcl level="x" />, <escp2 />, <proprietary />
239
240 <lang>
241 <postscript level="2" />
242 <pjl/>
243 <text>
244 <charset>us-ascii</charset>
245 </text>
246 </lang>
247
248# The autodetection stuff
249
250 <autodetect>
251
252# There are three ways to auto-detect a printer, via the parallel port
253# (<parallel>...</parallel>), the USB (<usb>...</usb>), or SNMP
254# (TCP/Socket-connected printer, <snmp>...</snmp>). Through these
255# interfaces the printers report back an IEEE-1284-complient ID string
256# from which the fields "MFG" (<manufacturer>...</manufacturer>),
257# "MDL" (<model>...</model>), "DES" (<description>...</description>),
258# and "CMD" (<commandset>...</commandset>) are used. The string itself
259# can be put between <ieee1284>...</ieee1284> tags, but all items
260# which are not constant for all printers of this model, as the serial
261# number ("SERN:...;") and the device status ("VSTATUS:...;") have to
262# be removed here. As the ID string is usually the same for all
263# detection methods, one can put the entries between
264# <general>...</general> tags, then the <parallel>...</parallel>,
265# <usb>...</usb>, and <snmp>...</snmp> are only used for
266# differences to the data between the <general>...</general> tags. A
267# complete entry could look like:
268#
269# <autodetect>
270# <general>
271# <ieee1284>MFG:HEWLETT-PACKARD;MDL:DESKJET 600;CMD:MLC,PCL,PML;CLASS:PRINTER;DESCRIPTION:Hewlett-Packard DeskJet 600;</ieee1284>
272# <commandset>MLC,PCL,PML</commandset>
273# <description>Hewlett-Packard DeskJet 600</description>
274# <manufacturer>HEWLETT-PACKARD</manufacturer>
275# <model>DESKJET 600</model>
276# </general>
277# </autodetect>
278#
279
280# If you use CUPS, you get the device IDs of all locally connected
281# (USB, parallel) printers and of printers in the local network by
282# running:
283
284lpinfo -l -m
285
286# On Linux you find this info for the parallel ports (/dev/lp<N>, <N>
287# = 0, 1, 2, ...) in the files
288#
289# /proc/sys/dev/parport/parport<N>/autoprobe*
290#
291# for the USB under Linux it is more complicated, easiest is to use a little
292# Perl script, called "getusbprinterid.pl":
293# You need to find the IOCTL call value to pass to the perl ioctl function.
294# Here is a little C program that does this. This is easier than trying to
295# use p2h and convert the *.h files to perl.
296
297# --------------------------------------------------------------------------
298# /*
299# print the IOCTL call value for printer information
300# */
301# #include <stdio.h>
302# #include <sys/ioctl.h>
303# /* From the /usr/src/linux<version>/drivers/usb/printer.c */
304# #define DRIVER_VERSION "v0.11"
305# #define DRIVER_AUTHOR "Michael Gee, Pavel Machek, Vojtech Pavlik, Randy Dunlap, Pete Zaitcev, David Paschal"
306# #define DRIVER_DESC "USB Printer Device Class driver"
307#
308# #define USBLP_BUF_SIZE 8192
309# #define DEVICE_ID_SIZE 1024
310#
311# /* ioctls: */
312# #define LPGETSTATUS 0x060b /* same as in drivers/char/lp.c */
313# #define IOCNR_GET_DEVICE_ID 1
314# #define IOCNR_GET_PROTOCOLS 2
315# #define IOCNR_SET_PROTOCOL 3
316# #define IOCNR_HP_SET_CHANNEL 4
317# #define IOCNR_GET_BUS_ADDRESS 5
318# #define IOCNR_GET_VID_PID 6
319# /* Get device_id string: */
320# #define LPIOC_GET_DEVICE_ID(len) _IOC(_IOC_READ, 'P', IOCNR_GET_DEVICE_ID, len)
321# /* The following ioctls were added for http://hpoj.sourceforge.net */
322# /* (HPOJ is replaced by HPLIP, http://hplipopensource.com/): */
323# /* Get two-int array:
324# * [0]=current protocol (1=7/1/1, 2=7/1/2, 3=7/1/3),
325# * [1]=supported protocol mask (mask&(1<<n)!=0 means 7/1/n supported): */
326# #define LPIOC_GET_PROTOCOLS(len) _IOC(_IOC_READ, 'P', IOCNR_GET_PROTOCOLS, len)
327# /* Set protocol (arg: 1=7/1/1, 2=7/1/2, 3=7/1/3): */
328# #define LPIOC_SET_PROTOCOL _IOC(_IOC_WRITE, 'P', IOCNR_SET_PROTOCOL, 0)
329# /* Set channel number (HP Vendor-specific command): */
330# #define LPIOC_HP_SET_CHANNEL _IOC(_IOC_WRITE, 'P', IOCNR_HP_SET_CHANNEL, 0)
331# /* Get two-int array: [0]=bus number, [1]=device address: */
332# #define LPIOC_GET_BUS_ADDRESS(len) _IOC(_IOC_READ, 'P', IOCNR_GET_BUS_ADDRESS, len)
333# /* Get two-int array: [0]=vendor ID, [1]=product ID: */
334# #define LPIOC_GET_VID_PID(len) _IOC(_IOC_READ, 'P', IOCNR_GET_VID_PID, len)
335#
336#
337# int main( int argc, char *argv, char *envp[] )
338# {
339# int len = 1024;
340# int v;
341# /* _IOC(), _IOC_READ as defined in /usr/include/asm/ioctl.h
342# LPIOC_GET_DEVICE_ID(len) = _IOC(_IOC_READ, 'P', IOCNR_GET_DEVICE_ID, len)
343# */
344# v = LPIOC_GET_DEVICE_ID(len); printf("$LPIOC_GET_DEVICE_ID = 0x%08x;\n", v );
345# v = LPIOC_GET_BUS_ADDRESS(len); printf("$LPIOC_GET_BUS_ADDRESS = 0x%08x;\n", v );
346# v = LPIOC_GET_VID_PID(len); printf("$LPIOC_GET_VID_PID = 0x%08x;\n", v );
347# return(0);
348# }
349#
350#
351# save this to a file, say getv.c, compile and run it, and you get an output
352$ like this:
353# $LPIOC_GET_DEVICE_ID = 0x84005001;
354# $LPIOC_GET_BUS_ADDRESS = 0x84005005;
355# $LPIOC_GET_VID_PID = 0x84005006;
356
357
358
359# Here is the getusbprinterid.pl PERL program to get the usb information
360#
361# !/usr/bin/perl
362# open FILE, "$ARGV[0]" or die "cannot open $ARGV[0]";
363# my $result;
364# # len = 1024
365# # LPIOC_GET_DEVICE_ID(len) = _IOC(_IOC_READ, 'P', IOCNR_GET_DEVICE_ID, len)
366# # _IOC(), _IOC_READ as defined in /usr/include/asm/ioctl.h
367# $LPIOC_GET_DEVICE_ID = 0x84005001;
368# $LPIOC_GET_BUS_ADDRESS = 0x84005005;
369# $LPIOC_GET_VID_PID = 0x84005006;
370#
371# ioctl(FILE, $LPIOC_GET_DEVICE_ID , $result) or die;
372# # Cut resulting string to its real length
373# my $length = ord(substr($result, 1, 1)) + (ord(substr($result, 0, 1)) << 8);
374# $result = substr($result, 2, $length-2);
375# # Remove non-printable characters
376# $result =~ tr/[\x0-\x1f]/\./;
377# print "DeviceID $result\n";
378#
379# $result = pack("LL",0);
380# ioctl(FILE, $LPIOC_GET_BUS_ADDRESS , $result) or die;
381# my( $v1, $v2 ) = unpack("LL", $result );
382# print "Bus '$v1', Device '$v2'\n";
383#
384# $result = pack("LL",0);
385# ioctl(FILE, $LPIOC_GET_VID_PID, $result) or die;
386# my( $v1, $v2 ) = unpack("LL", $result );
387# print "Vendor '$v1', Product '$v2'\n";
388#
389# close FILE;
390#
391#
392# --------------------------------------------------------------------------
393
394# Running the program with "perl getusbprinterid.pl /dev/usb/lp0" returns the
395# ID string of the device on /dev/usb/lp0.
396# For example: perl getusbprinter.pl /dev/usb/lp0
397# DeviceID MFG:Hewlett-Packard;CMD:PJL,MLC,PCL,PCLXL,POSTSCRIPT;MDL:\
398# HP LaserJet 2200;CLS:PRINTER;DES:Hewlett-Packard LaserJet 2200;\
399# MEM:8MB;OPTRAY:250Sheets
400# Bus '2', Device '2'
401# Vendor '1008', Product '535'
402#
403# (lines broken for clarity)
404
405
406 <!--no known parport probe information-->
407 </autodetect>
408
409# Our grading system. It's US-style letter grades A, B, D, and F,
410# which the website shows as "Perfectly", "Mostly", "Partially" and
411# "Paperweight" .
412# THERE IS NO `C'!!!
413
414 <functionality>A</functionality>
415
416# Arguably, the scores should live with the printer/driver association
417# and not on the printer, but then it's a big hassle to figure out if
418# a printer works... So the score is the one reached with the driver
419# working best, the "recommended" driver.
420
421# There's a spot for this "recommended" driver, usually the driver
422# which gives the maximum output quality. It is for user information
423# on the web site, but newbie-friendly printer setup GUIs should use
424# it, too. system-config-printer, printer setup tool of Fedora/Red
425# Hat, Ubuntu, and Mandriva Linux makes use of it, also the former
426# printerdrake of Mandriva Linux.
427
428 <driver>Postscript-HP</driver>
429
430# The following optional section describes with which drivers this
431# printer works. A valid printer/driver pair can be defined by either
432# adding the printer to the driver's printer list (the way how it
433# worked all the time) but also by adding the driver to the printer's
434# driver list. This way a printer can get associated with a driver for
435# which there is no driver XML file and a driver can list a supported
436# printer which is not in the printer XML database. For providing a
437# PPD file both printer and driver XML files must exist, but it is not
438# important in which of the two the printer/driver relationship is
439# defined.
440
441# The driver list in the printer XML files was introduced for once
442# defining links to ready-made PPD files (relative paths without "/",
443# "http:", "https:", or "ftp:" in the beginning are relative to
444# $libdir/db/source/, absolute links can point to external sites, as
445# for example the site of a printer manufacturer, but they must always
446# provide the non-interactive download of the PPD file, for example
447# via "wget") and second, listing the supported drivers for
448# visitor-contributed printer entries (from web input form). The
449# comments section is for adding comments specific to the
450# printer/driver combo. As it is human-readable it is
451# internationalized. Each driver entry here must have a driver ID. PPD
452# file link and comment are optional.
453
454 <drivers>
455 <driver>
456 <id>Postscript-HP</id>
457 <ppd>PPD/HP/HP_LaserJet_4000_Series.ppd</ppd>
458 <comments><en>...</en></comments>
459 </driver>
460 </drivers>
461
462
463# The <unverified /> tag marks entries which are entered by visitors
464# via the printer input form on the OpenPrinting web site. It does not
465# appear in approved entries (= all entries in the BZR repository of
466# the foomatic-db package).
467
468 <!--not "unverified"-->
469
470# If there is a web site with additional interesting info about this
471# printer, it can be mentioned in the entry by putting it between
472# <contrib_url>...</contrib_url> tags,
473
474 <!--no "contrib_url"-->
475
476# The regular notes section. The allowed tags are: <p>, <a
477# href="foobar"> </a> and many other simple tags (<b>, <i>, <tt>,
478# ...). Note that to distinguish what is XML and what is the embedded
479# HTML, the following replacements have to be made:
480#
481# < --> <
482# > --> >
483# " --> "
484# ' --> '
485# & --> &
486#
487
488 <comments>
489 <en>
490 I don't believe this:<p>
491
492 <i>1200x1200 dpi only possible with Windows drivers,
493 600x600 can be reached w/o particular software.
494 The difference is visible, but only slightly, so
495 the Functionality got "Mostly"<p></i><p>
496
497 Do the following:<p>
498
499 Set the resolution on the front panel to "Prores 1200", not
500 to "Fastres 1200". When you use CUPS with HPs PPD file, turn
501 off "Fastres 1200" in the printer configuration
502 options.<p>
503
504 Try the generic PostScript PPD file which comes with KUPS 1.0 or newer.
505 </en>
506 </comments>
507</printer>
508
509
510driver/md2k.xml
511===============
512
513The driver files contain information about drivers. There are a few
514things, but the two biggies are the prototype and the printers list
515
516<driver id="driver/md2k">
517 <name>md2k</name>
518
519# According to the Adobe specifications for PPD files every PPD file
520# must contain a unique DOS-compatible file name (the "*PCFileName"),
521# a file name with an up to 8 characters log base name and an up to 3
522# characters long extension, and upper and lower case letters being
523# considered as equal. As every PPD file is for a printer/driver combo,
524# we let the last 2 characters being provided by the driver entry:
525
526 <pcdriver>M2</pcdriver>
527
528# The drivers listed by the OpenPrinting database are usually not
529# developed by OpenPrinting. Most free software printer drivers come
530# from independent projects, initiated by peopke who want to get their
531# printers to work under Linux, some other drivers come from the
532# printer manufacturers. So even if OpenPrinting hosts a downloadable
533# package of the driver the development of the driver is not part of
534# OpenPrinting. Therefore every driver entry has to contain a
535# reference to the developers of the driver, where the driver can be
536# actually downloaded. The appropriate link goes into the <url> tag:
537
538 <url>http://plaza26.mbn.or.jp/~higamasa/gdevmd2k/</url>
539
540# The driver XML files can contain the following tags to describe the
541# driver's properties, so that a user can easily find the driver which
542# is most suitable for him. The properties are shown in the gray
543# driver info boxes on the OpenPrinting web site and they are also
544# supposed to be shown by printer setup tools when they offer to
545# download a driver from OpenPrinting. It is especially important to
546# supply them if a downloadable driver package or PPD files are
547# supplied.
548
549# Supplier's name, internationalization (with <en>...</en><de>...</de>...)
550# optional
551
552# <supplier>SpliX project</supplier>
553
554# Does the driver come from the printer's manufacturer or from a third
555# party. The third form tells also the manufacturer names of the
556# printers which are from the manufacturer which developed the
557# driver. If there are also printers from other manufacturers
558# supported (like for the PCL driver HPIJS) then the OpenPrinting web
559# site does not show this driver as manufacturer-supplied on the pages
560# of the printers of other manufacturers.
561
562# <thirdpartysupplied /> OR <manufacturersupplied /> OR
563# <manufacturersupplied>HP|Apollo</manufacturersupplied>
564
565# License name. Here should be put the common short name or
566# abbreviation if the license is one of the common free software
567# licenses. Otherwise it should contain something short and
568# descriptive, for non-free drivers simply "Commercial". The license
569# name can be internationalized with language tags
570# (<en>...</en><de>...</de>...).
571
572# <license>GPL</license>
573
574# The license text does not need to be supplied for common free
575# software licenses. It should be supplied if:
576#
577# - The license is not free (<nonfreesoftware /> tag set)
578# - The driver has patent issues (<patents /> tag set, describe the
579# patent issues here in that case)
580# - The license of the driver is free but none of the common licenses
581# (<nonfreesoftware /> tag not set)
582
583# <licensetext>
584# <en>
585# ...
586# </en>
587# </licensetext>
588
589# License texts can also be linked from external sites:
590
591# <licensetext>
592# <en url="http://www.laserstar.com/licenses/en/gl-series-eula.txt" />
593# <de url="http://www.laserstar.com/licenses/de/gl-series-eula.txt" />
594# ...
595# </licensetext>
596
597# License texts have to be given always as plain text, UTF-8-encoded.
598
599# Mark with this tag whether the driver is non-free software
600
601# <nonfreesoftware />
602
603# All driver entries without this tag are considered to be free
604# software.
605
606# This tag tells whether there are any patent issues with the driver
607
608# <patents />
609
610# The absence of the tag tells that the driver is free of patent
611# issues.
612
613# If a driver entry provides a <licensetext> and is <nonfreesoftware
614# /> or with <patents /> printer setup tools which download this
615# driver are supposed to present the license text and ask the user
616# whether he agrees with it.
617
618# Printer manufacturers could want to package their drivers for
619# different market regions (Europe, Asia/Pacific, Americas, ...) as
620# the markets demand different capabilities of printer drivers and
621# different user-settable options (CJK-language-related stufff for
622# example). So there could even be two different driver flavors for
623# the same printer but adapted to different regions. To express these
624# driver properties there are special tags.
625
626# For each flavor of the driver a separate driver entry (driver XML
627# file) has to be supplied. There is no requirement of certain
628# properties of the driver flavors to be equal or not. Especially the
629# printer lists can contain printers which are not in all flavors, for
630# example if printers are only sold in certain regions. To mark which
631# entries are belonging together one adds a group tag to each XML
632# file, with the same group name, but the name must be different to
633# the names of all already existing groups. A locales tag contains all
634# language/country codes for which the driver flavor is intended:
635
636# <group>epson-inkjet</group>
637# <locales>de en_UK en_IE fr_FR es_ES</locales>
638
639# The codes in the locales tags should be different for the group
640# members, to allow to automatically select the most suitable flavor
641# if the detected printer is supported by more than one flavor.
642
643# For downloadable drivers support contacts should be given, so that
644# users get informed before they do the download and do not complain
645# at their OS distribution vendor if the driver downloaded from
646# OpenPrinting does not work. The human-readable string for the
647# support contact can be internationalized with language tags
648# (<en>...</en><de>...</de>...).
649
650# <supportcontacts>
651# <supportcontact level="voluntary" url="http://sourceforge.net/forum/?group_id=175815">SpliX forum at SourceForge</supportcontact>
652# <supportcontact level="commercial" url="http://www.laserstar.com/support/">LaserStar Support</supportcontact>
653# </supportcontacts>
654
655# This is an internationalized short description of the driver,
656# typically one line, to be used in the gray driver info boxes, in the
657# driver overview list, and also by printer setup tools. If a driver
658# entry is for a development version of a driver, tell it here, as the
659# long description is not shown everywhere.
660
661# <shortdescription>
662# <en>
663# Driver for Samsung SPL2 (ML-1710, ...) and SPLc (CLP-500, ...) laser
664# printers
665# </en>
666# </shortdescription>
667
668# If there are downloadable packages for this driver entry on the
669# OpenPrinting web site, a <packages> section has to be supplied. This
670# tag tells which package files on the OpenPrinting web server belong
671# to this driver or on which external server to find packages for this
672# driver. It also allows assigning files or locations to different
673# components of this driver and to assign scopes to them. Scopes can
674# be: "general", "gui", "printer", "scanner", "fax", ... Uses the
675# "general" scope if packages are not split. Wild cards are the same
676# as used for file masks in the shell (NOT regular expressions). They
677# must match both Debian and RPM package file names. Note that between
678# file name and version number is a "-" for RPMs and a "_" for Debian
679# packages.
680
681# <packages>
682# <package scope="general">*splix[_-]1.[0-9].[0-9]*</package>
683# </packages>
684
685# It is possible to give absolute paths which can point to external
686# sites, as for example the site of a printer manufacturer, so that
687# the package can be hosted there but auto-downloaded via
688# OpenPrinting. Important is that these packages are auto-downloadable
689# LSB packages and that a non-interactive download is provided (should
690# also work with utilities like "wget"). Licenses which the users have
691# to agree on have to get supplied in the driver XML file. Printer
692# setup tools are supposed to ask the user for agreeing if the driver
693# is marked as non-free or with patent issues.
694
695# Example for packages provided by an external site:
696
697# <packages>
698# <package scope="general" fingerprint="http://download.example.com/printerdrivers/gpg/key-fingerprint.txt">http://download.example.com/printerdrivers/RPMS/i486/*laserstar*;http://download.example.com/printerdrivers/RPMS/x86_64/*laserstar*;http://download.example.com/printerdrivers/debian/dists/lsb3.2/main/binary-i386/*laserstar*;http://download.example.com/printerdrivers/debian/dists/lsb3.2/main/binary-amd64/*laserstar*</package>
699# </packages>
700
701# Note that more than one mask can be supplied separating them with
702# semicolons (";").
703
704# The masks with absolute paths must match all package files, of all
705# architectures (usually i386/i486 and amd64/x86_64) and all package
706# systems (RPM and Debian). Use more than one mask if needed. On your
707# server each directory with package files inside must be browsable,
708# so that a client can expand the wildcards. In addition the packages
709# itself need to be readable for everyone so that they can get
710# downloaded.
711
712# Note also that the packages on the external server must be in
713# regular package repositories, so that automatic updates with the
714# package manager tools provided by the user's Linux distribution
715# (currently apt, yum, and zypper) can be performed. The configuration
716# data for the local tools is derived from the actual file locations,
717# which get determined by the masks.
718
719# Important is also that with paths (absolute starting with "http://",
720# "https://", or "ftp://" and relative simply having at least a slash
721# somewhere) wildcards can only be used after the last slash ("/"). So
722# wildcards are only allowed for the file name and not for the
723# directory names.
724
725# If the packages are signed, all packages of the same <package> entry
726# should be signed with the same key and the key should be registered
727# on the key server network. The key fingerprint should be made
728# available as a text file on the web site of the driver issuer and
729# the site should be with an SSL certificate which has been signed by
730# an official registrar. The "fingerprint=..." parameter should then
731# provide the link to the file with the key fingerprint. The link must
732# be an "https://..." URL and point to a file on a server of the
733# driver issuer. Packages must be signed for fully automatic upload by
734# default on Linux distributions. See also
735
736# https://www.linuxfoundation.org/collaborate/workgroups/openprinting/writingandpackagingprinterdrivers
737
738# The <functionality> section should make it easier for a user to
739# compare different drivers by giving some technical properties and
740# ratings (0...100) for common document types, system load, and
741# execution speed. The higher the number, the better the driver
742# performs here. It is not required to supply all items. Items can be
743# left out or can stay empty. <functionality> sections of the same
744# format can also be used in the <printer> entries in the <printers>
745# list, to describe exceptions for particular printers. If an item is
746# left out or empty there, the appropriate item in the general
747# <functionality> section is used, so only the items which are
748# different for the given printer need to be listed.
749
750# <functionality>
751# <maxresx>1200</maxresx>
752# <maxresy>1200</maxresy>
753# <color /> OR <monochrome />
754# <text>100</text>
755# <lineart>100</lineart>
756# <graphics>100</graphics>
757# <photo>80</photo>
758# <load>50</load>
759# <speed>90</speed>
760# </functionality>
761
762# Not all tags are required here, if the valur for a tag is not known,
763# the tag has to be left out. Do not put empty tags (like
764# "<text></text>" or "<text />" here.
765
766# The <execution> section describes everything needed to execute the
767# driver.
768
769 <execution>
770
771# Sometimes it is possible that a driver depends on another driver,
772# for example a manufacturer publishes a core driver which is
773# completely free software and supports most of their printer. In
774# addition, he publishes closed-source plugins for the core driver to
775# support additional printers where they cannot open the driver code
776# for IP reasons. He wants to link in all his driver packages for
777# automatic download with the <packages> tags. To make everything work
778# correctly he creates one driver entry for the core driver and one
779# for each plugin. The printers which do not need the plugin get
780# listed as supported by the core driver, the printers needing a
781# plugin are listed as supported by the plugin. To avoid that then
782# only a plugin gets automatically downloaded one adds a <requires>
783# tag to each entry of a plugin, to the beginning of the <execution>
784# section:
785
786# <requires version=">= 5.0.1">gutenprint</requires>
787# <requires version=">= 2.7.10">hpijs</requires>
788
789# The version attribute is optional, without, every version is
790# accepted. Optional relationships (>=, <=, =, <, >) allow to not only
791# accept the given version. The '>´ and '<' have to be replaced by the
792# appropriate XML entities, as described earlier here for other text
793# in the XML files. More than one <requires> tag is allowed.
794
795# Driver types are
796#
797# <ghostscript /> : The driver code is compiled into Ghostscript
798#
799# <ijs /> : IJS plug-in. These are raster drivers which connect
800# to the IJS interface of the renderer, usually of
801# Ghostscript but also of pdftoijs or others. The
802# interface is based on pipes and is bi-directional.
803# It makes the driver independent of the renderer.
804#
805# <cups /> : CUPS Raster driver. The raster driver standard
806# introduced by CUPS. The renderer generates the CUPS
807# Raster format, a bitmap format optimized for printing,
808# and it gets piped into the driver.
809#
810# <opvp /> : OpenPrinting Vector driver. DLL and IPC interface for
811# plugging printer drivers into the renderer. This is
812# the only solution of mudular printer drivers for high-
813# level graphics (vector) PDLs.
814#
815# <uniprint /> : A uniprint driver, consisting of one or more .upp
816# files for Ghostscript.
817#
818# <filter /> : The driver code is a separate executable and the
819# driver does not fit into the groups listed above,
820# usually either a filter which converts generic
821# bitmap output of Ghostscript to the printer's
822# language, or a wrapper around Ghostscript.
823#
824# <postscript /> : A driver which has PostScript as output (for
825# PostScript printers). It usually does not call
826# Ghostscript but only applies the user's option
827# settings to the data stream. But Ghostscript can
828# be called here, too, as for downgrading to a lower
829# PostScript level or for handling PDF input.
830#
831# The driver type only provides information for the web pages (or
832# driver auto-download facilities of printer setup tools), it is not
833# used when generating PPD files.
834
835 <ghostscript />
836
837# The driver's <execution> section can also contain a
838#
839# <nopjl />
840#
841# which suppresses the usage of PJL options (options which send PJL
842# commands to the printer). This is done with drivers where the driver
843# itself already produces a PJL header and where the PJL options
844# defined for the supported printers would badly interfere. In most
845# cases this is not needed, as foomatic-rip merges the PJL headers of
846# the driver and of the PJL options.
847
848# And the driver's <execution> section can also contain a
849#
850# <nopageaccounting />
851#
852# This suppresses the inserting of page accounting code (for CUPS)
853# into the PostScript data stream. Some drivers lead to unexpected
854# behavior with that. Especially for the generic PostScript drivers
855# (which do not use Ghostscript in most cases) the accounting code
856# should not be inserted.
857
858# The prototype defines what command the backends run to drive this
859# printer. It must take at least PostScript, preferably both PDF and
860# PostScript on stdin and generate the printer's native language on
861# stdout. Various %A, %B, etc substitution "spots" are specified; this
862# is where substition options will be placed.
863
864 <prototype>gs -q -dBATCH -dSAFER -dQUIET -dNOPAUSE -sDEVICE=md2k%A%Z -sOutputFile=- -</prototype>
865 </execution>
866 <comments>
867 <en>
868 Part of the gdevmd2k-0.2a package by Shinya Umino. The web page and
869 documentation are in Japanese.
870 <a href="/clippings/MD5000-translation.txt">Here</a>
871 is an English translation of the driver's web page, and <a
872 href="/clippings/alpsmd.txt">here</a> is the README from the
873 driver package.
874 </en>
875 </comments>
876
877# if there is only a <prototype> and not a <prototype_pdf> entry,
878# foomatic-rip will feed both PostScript and PDF into the command line
879# defined with <prototype>, otherwise for PostScript input the
880# <prototype> command line is used and for PDF input the
881# <prototype_pdf> command line. Both are defined the same way and the
882# same command line snippets are inserted from the option settings.
883
884# If there is only a <prototype> defined, PDF will only be fed in if
885# the command line begins with "gs " (this means Ghostscript is called
886# and Ghostscript understands both PostScript and PDF) and there are
887# no options based on inserting active PostScript code into the input
888# data stream. Otherwise foomatic-rip converts PDF input to PostScript
889# at first and feeds the PostScript through the command line.
890
891# The printer list is a simple list of printers that this driver works
892# with. Alternatively, one can tell that a given printer works with a
893# given driver also by a <drivers> list in the printer's XML file (see
894# above).
895
896 <printers>
897 <printer>
898 <id>printer/Alps-MD-1000</id><!-- Alps MD-1000 -->
899 </printer>
900 <printer>
901 <id>printer/Alps-MD-1300</id><!-- Alps MD-1300 -->
902 </printer>
903 <printer>
904 <id>printer/Alps-MD-2000</id><!-- Alps MD-2000 -->
905 </printer>
906 <printer>
907 <id>printer/Alps-MD-4000</id><!-- Alps MD-4000 -->
908 </printer>
909 </printers>
910</driver>
911
912# In the printer list it is also possible to place comments or
913# exceptions in the driver's functionality (see above) specific to a
914# certain printer/driver pair:
915
916# <printer>
917# <id>printer/HP-LaserJet_4050</id><!-- HP LaserJet 4050 -->
918# <comments>
919# <en>to 1200dpi</en>
920# </comments>
921# <functionality>
922# <monochrome />
923# </functionality>
924# </printer>
925
926# Note that printer/driver relationships can also be expressed by
927# adding the driver to the <drivers> lists of the appropriate printer
928# XML files.
929
930
931source/opt/2.xml
932================
933
934# Every option exists independently from printers or drivers, because
935# they might apply to arbitrary combinations of printers and/or
936# drivers. In practice, some drivers have wholly unique options
937# (gutenprint for example), while others (lots of generic basic
938# Ghostscript drivers, for example) share some options.
939
940<option type="enum" id="opt/2">
941
942# Options are of a type "enum", "bool", "int", "float", "string", or
943# "password", options have an ID. The id is also the filename.
944
945# The shortname is a spaceless short name for the thing. It must not
946# contain / or : (otherwise it will not be handled correctly in PPD
947# files). It should be one of the standard Adobe PPD option names if
948# apropriate
949
950 <arg_shortname>
951
952# Various things here, and all <comments>, are internationalized.
953# They take the usual posix locale codes in the form xx[_YY], where xx
954# is a two-letter iso language code, and YY is two-letter country code
955# to distinguish differing national dialects.
956#
957# Generally the national dialects won't be very common or necessary
958# here. The backends currently require that <en> content be provided.
959
960 <en>PageSize</en><!-- backends only know <en> shortnames! -->
961 </arg_shortname>
962
963# The longname is a short phrase describing the thing in more detail
964# GUI tools usually show longnames
965
966 <arg_longname>
967 <en>Page Size</en>
968 </arg_longname>
969
970# The <comments> are used to form documentation. In theory these can
971# become man pages or the like. Example:
972
973# <comments>
974# <en>
975# This option allows the user to get a lighter or darker printout, but
976# keeping totally black areas black and not making white areas gray.
977# </en>
978# </comments>
979
980 <!-- A multilingual <comments> block can appear here, too;
981 it should be treated as documentation for the user. -->
982
983# The execution section describe how the backend should execute this
984# option. The order and spot apply to the *driver*'s prototype for
985# <arg_substitution /> (once called commandline) style options, or
986# just the order applies for <arg_postscript /> and <arg_pjl />
987# options. The order and the <arg_section> go into the "*OrderDependency"
988# line of the appropriate option entry in the PPD file, for this example
989# one would get
990
991# *OrderDependency: 100 DocumentSetup *PageSize
992
993# When no <arg_section> is given, "AnySetup" is used as a default.
994
995# For <arg_substitution /> options the <arg_proto> is inserted into
996# the driver's command line, at the spot (e. g. "%A") whose letter is
997# given between the <arg_spot>...</arg_spot> tags, the <arg_proto> of
998# an <arg_postscript /> option is a snippet of PostScript code which
999# is inserted into the PostScript data stream of the job, for
1000# DSC-conforming PostScript into the section specified with
1001# <arg_section>, otherwise in the beginning. The <arg_proto> lines of
1002# <arg_pjl /> options are PJL commands which are sent to the printer
1003# before the output of the driver's command line is sent. Because this
1004# only works reliably when the driver output does not have its own PJL
1005# command header, these options are ignored when the driver's XML file
1006# is marked with a <nopjl /> tag in its <execution> section. Drivers
1007# which produce their own PJL and therefore are marked with <nopjl />
1008# are for example "hpijs" and "hl1250". There is also the
1009# <arg_composite /> execution style for composite options, see the
1010# "Composite Options" section below. The user's value gets put into
1011# the <arg_proto>'s %s location.
1012
1013# The <arg_group>...</arg_group> tags put the option into the PPD
1014# option group named here. In many PPD-based GUIs ("kprinter", "xpp",
1015# OpenOffice.org, ...) every group is shown as a tab or a tree branch
1016# containing the member options of this group. You can also specify
1017# subgroups. Then you have to use a "group path" similar to directory
1018# paths, with the group and subgroup names separated by slashes
1019# (<arg_group>General/Paper</arg_group> is the "Paper" subgroup in the
1020# "General" group). Subgroups are not recommended as there is no GUI
1021# supporting them. If an option is member of a composite option (See
1022# "Composite Options" section below), the <arg_group>...</arg_group>
1023# tags will be ignored.
1024
1025 <arg_execution>
1026 <arg_group>General</arg_group>
1027 <arg_order>100</arg_order>
1028 <arg_section>DocumentSetup</arg_section>
1029 <arg_spot>Z</arg_spot>
1030 <arg_postscript />
1031 <arg_proto><</PageSize[%s]/ImagingBBox null>>setpagedevice</arg_proto>
1032 </arg_execution>
1033
1034# The constraints define what printer/driver combinations this option
1035# applies to. The *most specific* constraint rules the day; it's
1036# "sense" says whether or not the option is "in". The winning
1037# constraint also provides the default value used when this option
1038# applies to that printer and driver.
1039
1040# Constraint elements are: driver, make, model. The driver is the
1041# driver name, or not present to apply to any driver. The make is the
1042# printer make, or not present to apply to any printer make. The
1043# model is the driver model, or not present to apply to any printer.
1044# Instead of make/model, you can also specify <printer>id</printer>.
1045
1046# IMPORTANT: The make and model must match the one in the printer xml
1047# definition, and everywhere else in the other options. One needs to
1048# write a utility to change printer names sensibly.
1049
1050# It is illegal to have a model with no make.
1051
1052# It is illegal to have none of make/model/driver.
1053
1054# It is illegal to have *no* constraints, or at least such options are
1055# never used.
1056
1057# For enum options, the defval is the id of the enum_val that is the
1058# default. For other option types, it is the actual default value
1059# (ie, a number, or 1 or 0 for boolean, etc).
1060
1061 <constraints>
1062 <constraint sense="true">
1063 <driver>sj48</driver>
1064 <arg_defval>ev/1</arg_defval>
1065 </constraint>
1066 <constraint sense="true">
1067 <driver>r4081</driver>
1068 <arg_defval>ev/1</arg_defval>
1069 </constraint>
1070# A gajillion constraints deleted
1071 </constraints>
1072 <enum_vals>
1073 <enum_val id="ev/1">
1074 <ev_longname>
1075 <en>US Letter</en>
1076 </ev_longname>
1077 <!-- A multilingual <comments> block can appear here, too;
1078 it should be treated as documentation for the user. -->
1079 <ev_shortname>
1080 <en>Letter</en>
1081 <!-- Until someone tells me how to learn the user locale in
1082 backends, the shortname must be monolingual in <en>! -->
1083 </ev_shortname>
1084
1085# If present, the driverval is what gets substituted in for the %s in
1086# the option's prototype. This way the user-visible stuff can be
1087# anything.
1088
1089 <ev_driverval>612 792</ev_driverval>
1090
1091# This enum_val has no constraints. It *is* OK for enum_vals to
1092# have no constraints; they are assumed to apply unless
1093# constrained otherwise.
1094
1095 </enum_val>
1096 <enum_val id="ev/115">
1097 <ev_longname>
1098 <en>A3</en>
1099 </ev_longname>
1100 <!-- A multilingual <comments> block can appear here, too;
1101 it should be treated as documentation for the user. -->
1102 <ev_shortname>
1103 <en>A3</en>
1104 <!-- Until someone tells me how to learn the user locale in
1105 backends, the shortname must be monolingual in <en>! -->
1106 </ev_shortname>
1107 <ev_driverval>842 1191</ev_driverval>
1108
1109# Here are some example constraints for an enum_val. The A3 size
1110# paper doesn't fit on lots of printers, so there are various
1111# constraints to make the right thing happen.
1112
1113 <constraints>
1114 <constraint sense="true">
1115 <driver>ml85p</driver>
1116 <arg_defval>na</arg_defval>
1117 </constraint>
1118 <constraint sense="true">
1119 <make>HP</make>
1120 <model>DeskJet 1000C</model>
1121 <driver>pnm2ppa</driver>
1122 <arg_defval>na</arg_defval>
1123 </constraint>
1124 <constraint sense="false">
1125 <make>HP</make>
1126 <model>DeskJet 820C</model>
1127 <driver>pnm2ppa</driver>
1128 <arg_defval>na</arg_defval>
1129 </constraint>
1130
1131 # lots more...
1132
1133 </constraints>
1134 </enum_val>
1135 </enum_vals>
1136</option>
1137
1138# To allow custom page sizes to be used one has add a choice with the
1139# "<ev_shortname>" being "Custom" to the "PageSize" option (example
1140# below). This choice will be treated as the custom page size. When
1141# the user selects this choice, he has to provide the width and the
1142# height of the page in addition. These values are converted into
1143# PostScript points (1/72 inches) and inserted into placeholders in
1144# the "<ev_driverval>" of this choice. The "<ev_driverval>" should
1145# contain a placeholder "%0" for the page width and "%1" for the page
1146# height. Alternatively the "<ev_driverval>" can contain two zeros
1147# ("0") from which the first will be replaced by the page width and
1148# the second by the page height. Then one gets Adobe-compliant entries
1149# for the custom page size in the PPD files and one can set a custom
1150# page size with the following commands:
1151
1152# CUPS: lpr -P huge -o PageSize=Custom.500x750cm bigposter.ps
1153# LPRng: lpr -P huge -Z PageSize=Custom.500x750cm bigposter.ps
1154# GNUlpr: lpr -P huge -o PageSize=Custom.500x750cm bigposter.ps
1155# LPD: lpr -P huge -JPageSize=Custom.500x750cm bigposter.ps
1156# PPR (RIP): ppr -P huge -F "*PageSize Custom" --ripopts 500x750cm
1157# bigposter.ps
1158# PPR (Int.): ppr -P huge -F "*PageSize Custom" -i 500x750cm bigposter.ps
1159# PDQ: pdq -P huge -oPageSize_Custom -aPageWidth=500
1160# -aPageHeight=750 -oPageSizeUnit_cm bigposter.ps
1161# No spooler: foomatic-rip -P huge -o PageSize=Custom.500x750cm
1162# bigposter.ps
1163
1164# Here is an example for a custom page size setting:
1165
1166# <enum_val id="ev/PageSize-Custom">
1167# <ev_longname>
1168# <en>Custom size</en>
1169# </ev_longname>
1170# <!-- A multilingual <comments> block can appear here, too;
1171# it should be treated as documentation for the user. -->
1172# <ev_shortname>
1173# <en>Custom</en>
1174# <!-- Until someone tells me how to learn the user locale in
1175# backends, the shortname must be monolingual in <en>! -->
1176# </ev_shortname>
1177# <ev_driverval>%0 %1</ev_driverval>
1178# </enum_val>
1179
1180# The entry
1181
1182# <ev_driverval>0 0</ev_driverval>
1183
1184# would have the same effect as the <ev_driverval> of the example.
1185
1186# For numerical (int, float) and bool options there is no <enum_vals>
1187# section. Instead of this section numerical options have tags to
1188# specify minimum and maximum value:
1189
1190# <arg_max>10.0</arg_max>
1191# <arg_min>0.0</arg_min>
1192
1193# For the %s in the <arg_proto> a number, either the user's choice
1194# when he has specified this option or the default value is
1195# inserted. Only numbers between the minimum and the maximum and in
1196# case of int options only integer numbers are allowed.
1197
1198# Bool options can be set or not be set. There <arg_proto> will be
1199# inserted if they are set, nothing if they are not set. A %s in the
1200# <arg_proto> is not allowed, there is nothing to insert for it. As
1201# <arg_defval> in the option's constraints one can use 0 for not
1202# setting the option by default or 1 for setting it by default.
1203
1204# Bool options need the specification of a name for the case when they
1205# are not set. This will be used by GUIs and in PPD files:
1206
1207# <arg_shortname_false>
1208# <en>CorrectBlack</en><!-- Backends only know <en> shortnames! -->
1209# </arg_shortname_false>
1210
1211# This name should not contain spaces, ":", or "/".
1212
1213# See below for string, password, and composite options.
1214
1215
1216Composite Options
1217-----------------
1218
1219This is an option type to make it easier for users to choose the best
1220settings for a certain printing task, even if the driver has very many
1221options. The idea is to have an enumerated choice option which does
1222not directly modify something in the driver's command line but sets
1223several of the other options.
1224
1225One example is the "PrintoutMode" option which will be made available
1226for all printer/driver combos which have at least one option regarding
1227the printout quality or document type.
1228
1229The possible choices should be the same for every printer and driver,
1230so that users (especially newbies) can bring their printers in the
1231right mode by choosing one easy to understand item from a menu instead
1232of having to switch several cryptic driver options. For now the
1233choices are the following:
1234
1235 Command line GUI Intention
1236 -----------------------------------------------------------------------
1237 Draft Draft Very fast, ink/toner-saving printout
1238 Normal Normal Quick standard quality printout
1239 High High Quality High quality for plain paper
1240 VeryHigh Very High Quality Highest quality for plain/inkjet paper
1241 Photo Photo Highest quality for photo paper
1242
1243These choices can also have one of the following modifiers:
1244
1245 Modifier Intention
1246 -----------------------------------------------------------------------
1247 .Gray Grayscale printing on a color printer
1248 .Mono Monochrome printing (no grayscales, black or white)
1249
1250Examples:
1251
1252 Command line GUI Comment
1253 ---------------------------------------------------------------------
1254 High.Gray High Quality Grayscale
1255 Photo Photo Color photos on color printer
1256 VeryHigh.Mono Very High Quality Monochrome Really black text in
1257 highest quality on inkjet
1258 printer, not suitable for
1259 halftone images.
1260 Normal Normal Standard color in 300/360 dpi
1261 on normal paper, grayscale
1262 on black-and-white printers
1263
1264Not all choices/combinations of basic choices and modifiers must be
1265present. Often modes are simply not available on certain
1266printer/driver combos, as "Photo" on most lasers. It is highly
1267recommended to have "Normal" available, though (and having this the
1268default).
1269
1270The GUI names can have additional remarks in parantheses, for example
1271when manual intervention (other cartridge, photo paper) is needed.
1272
1273To add such an option to the database, one only needs to add an option
1274XML file like the one below into the db/source/opt directory of the
1275database. The file db/source/opt/pcl3-PrintoutMode.xml could look
1276like this:
1277
1278--------------------------------------------------------------------------
1279<option type="enum" id="opt/pcl3-PrintoutMode">
1280 <!-- A multilingual <comments> block can appear here, too;
1281 it should be treated as documentation for the user. -->
1282 <arg_longname>
1283 <en>Printout Mode</en>
1284 </arg_longname>
1285 <arg_shortname>
1286 <en>PrintoutMode</en><!-- backends only know <en> shortnames! -->
1287 </arg_shortname>
1288 <arg_execution>
1289 <arg_order>10</arg_order>
1290 <arg_section>AnySetup</arg_section>
1291 <arg_spot>A</arg_spot>
1292 <arg_composite />
1293 <!-- <arg_proto></arg_proto> -->
1294 </arg_execution>
1295 <constraints>
1296 <constraint sense="true">
1297 <driver>pcl3</driver>
1298 <arg_defval>ev/pcl3-PrintoutMode-Normal</arg_defval>
1299 </constraint>
1300 </constraints>
1301 <enum_vals>
1302 <enum_val id="ev/pcl3-PrintoutMode-Draft">
1303 <ev_longname>
1304 <en>Draft</en>
1305 </ev_longname>
1306 <!-- A multilingual <comments> block can appear here, too;
1307 it should be treated as documentation for the user. -->
1308 <ev_shortname>
1309 <en>Draft</en>
1310 <!-- Until someone tells me how to learn the user locale in
1311 backends, the shortname must be monolingual in <en>! -->
1312 </ev_shortname>
1313 <ev_driverval>MediaType=Plain Resolution=150 Quality=Draft IntensityRendering=Halftones Passes=1</ev_driverval>
1314 </enum_val>
1315 <enum_val id="ev/pcl3-PrintoutMode-Normal">
1316 <ev_longname>
1317 <en>Normal</en>
1318 </ev_longname>
1319 <!-- A multilingual <comments> block can appear here, too;
1320 it should be treated as documentation for the user. -->
1321 <ev_shortname>
1322 <en>Normal</en>
1323 <!-- Until someone tells me how to learn the user locale in
1324 backends, the shortname must be monolingual in <en>! -->
1325 </ev_shortname>
1326 <ev_driverval>MediaType=Plain Resolution=300 Quality=Normal IntensityRendering=Halftones Passes=1</ev_driverval>
1327 </enum_val>
1328 <enum_val id="ev/pcl3-PrintoutMode-High">
1329 <ev_longname>
1330 <en>High</en>
1331 </ev_longname>
1332 <!-- A multilingual <comments> block can appear here, too;
1333 it should be treated as documentation for the user. -->
1334 <ev_shortname>
1335 <en>High</en>
1336 <!-- Until someone tells me how to learn the user locale in
1337 backends, the shortname must be monolingual in <en>! -->
1338 </ev_shortname>
1339 <ev_driverval>MediaType=Plain Resolution=600 Quality=Presentation IntensityRendering=FloydSteinberg Passes=4</ev_driverval>
1340 </enum_val>
1341 <enum_val id="ev/pcl3-PrintoutMode-Photo">
1342 <ev_longname>
1343 <en>Photo (on photo paper)</en>
1344 </ev_longname>
1345 <!-- A multilingual <comments> block can appear here, too;
1346 it should be treated as documentation for the user. -->
1347 <ev_shortname>
1348 <en>Photo</en>
1349 <!-- Until someone tells me how to learn the user locale in
1350 backends, the shortname must be monolingual in <en>! -->
1351 </ev_shortname>
1352 <ev_driverval>MediaType=Premium Resolution=600 Quality=Presentation IntensityRendering=FloydSteinberg Passes=4</ev_driverval>
1353 </enum_val>
1354 </enum_vals>
1355</option>
1356--------------------------------------------------------------------------
1357
1358The shown option is only an example, it is neither in the BZR
1359repository nore will it work with all printers which use the "pcl3"
1360driver. You can paste it into a file (make the <ev_driverval>s being
1361one line, the items separated by spaces) and copy it to db/source/opt/
1362to try it out.
1363
1364The "<arg_composite />" tag for the execution style specifies it as a
1365composite option. The <arg_spot> and <arg_proto> are meaningless in a
1366composite option and the "<ev_driverval>"s contain a space-separated
1367list of all settings of which the pre-made configuration represented
1368by this choice consists. Every choice of the composite option must set
1369EXACTLY THE SAME individual options. In no choice it is allowed to
1370leave out one of them. These individual options are the member options
1371of the composite option. Not all options of a driver/printer combo
1372need to be member options of the composite option. It is not allowed
1373to have one option being member of more than one composite option. The
1374composite option must be an enumerated choice option, the member
1375options must be enumerated choice or boolean options. Member options
1376can even be composite options, so composite options can be nested.
1377
1378It is enough to add a composite option as shown. The PPD generator
1379(getppd() in lib/Foomatic/DB.pm, package "foomatic-db-engine") will
1380take care of the rest. It will
1381
1382 - Order all member options into a group (PPD group, see "Option
1383 Grouping" below) named after the composite option.
1384
1385 - Add to every member option the choice "Controlled by '<name of
1386 the composite option>'" and make this choice the default. If this
1387 is chosen, the composite option will set the value for this
1388 member, depending on what value is chosen for the composite
1389 option. If the user chooses something else than "Controlled by
1390 '<name of the composite option>'" the member option does not obey
1391 the setting given by the composite option. So the advanced user
1392 can also set the member options individually.
1393
1394 - If necessary the <arg_order> and <arg_section> of the composite
1395 option is replaced by other values in the PPD file, so that the
1396 composite option will be stuffed into the PostScript data stream
1397 always before all its member options. Do not give "0" as the
1398 order number to any of the member options.
1399
1400A composite option can also span only one (but not zero) member
1401option. This is for example done with the "PrintoutMode" option of the
1402HPIJS driver ("foomatic-db-hpijs" package). This driver has only one
1403option for setting resolution and quality, but this option has
1404sometimes many choices with rather cryptic names. The "PrintoutMode"
1405maps to the most important choices with the above-mentioned names, and
1406in addition, these names are the same as of the "PrintoutMode" options
1407of other drivers, so the user finds the important printing modes more
1408easily.
1409
1410The facility of composite options can also be used for other things
1411than for a "PrintoutMode" option, for example a finisher could be
1412controlled by a composite option (to have the most common finishing
1413tasks as "Bound booklet", "Stapled booklet", "Letter in envelope",
1414...).
1415
1416
1417Forced Composite Options
1418------------------------
1419
1420Forced composite options are very similar to composite options, but the
1421user cannot set the individual member options, but only the composite
1422option (the user is forced to use the composite option). This allows
1423options acting at two or more places.
1424
1425Example: A printer driver is a filter which converts a generic bitmap
1426produced by Ghostscript to the printer's native format. The command
1427line for converting PostScript to the printer's language could look like this
1428
1429gs -q -dBATCH -dSAFER -dNOPAUSE -sDEVICE=bitcmyk -r600 -sOutputFile=-
1430- | filter -size=<width>x<height>
1431
1432where <width> and <height> is the page size in points (1/72
1433inches). In addition, Ghostscript needs to know the page size. For
1434this one usually puts the following PostScript code into the
1435PostScript input file:
1436
1437<</PageSize[<width> <height>]/ImagingBBox null>>setpagedevice
1438
1439where <width> and <height> is again the page size in points. So we
1440need two options for setting the page size, one PostScript option to
1441set the page size for Ghostscript and one command line option to set
1442the page size for the filter. The user would have to change both when
1443he wants to print on another paper size, and it does not make sense to
1444have different settings for the two. So one could make the "PageSize"
1445option a composite option of the two, but then the GUI exposes an ugly
1446"PageSize" group with the two individual options. To avoid this, one
1447uses a forced composite option ("Forced" because the user is forced to
1448use the composite option, the individual member options are not
1449accessible).
1450
1451Assuming that the name of the PostScript option for the page size is
1452"GSPageSize", the name of the page size option for the filter is
1453"filterPageSize" and both have the choices "A4", "Letter", and
1454"Legal", the forced composite option named "PageSize" would look as
1455follows:
1456
1457--------------------------------------------------------------------------
1458<option type="enum" id="opt/filter-PageSize">
1459 <!-- A multilingual <comments> block can appear here, too;
1460 it should be treated as documentation for the user. -->
1461 <arg_longname>
1462 <en>Page Size</en>
1463 </arg_longname>
1464 <arg_shortname>
1465 <en>PageSize</en><!-- backends only know <en> shortnames! -->
1466 </arg_shortname>
1467 <arg_execution>
1468 <arg_order>10</arg_order>
1469 <arg_section>AnySetup</arg_section>
1470 <arg_spot>A</arg_spot>
1471 <arg_forced_composite />
1472 </arg_execution>
1473 <constraints>
1474 <constraint sense="true">
1475 <driver>filter</driver>
1476 <arg_defval>ev/filter-PageSize-Letter</arg_defval>
1477 </constraint>
1478 </constraints>
1479 <enum_vals>
1480 <enum_val id="ev/filter-PageSize-Letter">
1481 <ev_longname>
1482 <en>Letter</en>
1483 </ev_longname>
1484 <!-- A multilingual <comments> block can appear here, too;
1485 it should be treated as documentation for the user. -->
1486 <ev_shortname>
1487 <en>Letter</en>
1488 <!-- Until someone tells me how to learn the user locale in
1489 backends, the shortname must be monolingual in <en>! -->
1490 </ev_shortname>
1491 <ev_driverval>GSPageSize=Letter filterPageSize=Letter</ev_driverval>
1492 </enum_val>
1493 <enum_val id="ev/filter-PageSize-Legal">
1494 <ev_longname>
1495 <en>Legal</en>
1496 </ev_longname>
1497 <!-- A multilingual <comments> block can appear here, too;
1498 it should be treated as documentation for the user. -->
1499 <ev_shortname>
1500 <en>Legal</en>
1501 <!-- Until someone tells me how to learn the user locale in
1502 backends, the shortname must be monolingual in <en>! -->
1503 </ev_shortname>
1504 <ev_driverval>GSPageSize=Legal filterPageSize=Legal</ev_driverval>
1505 </enum_val>
1506 <enum_val id="ev/filter-PageSize-A4">
1507 <ev_longname>
1508 <en>A4</en>
1509 </ev_longname>
1510 <!-- A multilingual <comments> block can appear here, too;
1511 it should be treated as documentation for the user. -->
1512 <ev_shortname>
1513 <en>A4</en>
1514 <!-- Until someone tells me how to learn the user locale in
1515 backends, the shortname must be monolingual in <en>! -->
1516 </ev_shortname>
1517 <ev_driverval>GSPageSize=A4 filterPageSize=A4</ev_driverval>
1518 </enum_val>
1519 </enum_vals>
1520</option>
1521--------------------------------------------------------------------------
1522
1523This looks exactly like a usual composite option and works also the
1524same way. The only difference is that instead of an "<arg_composite
1525/>" tag "<arg_forced_composite />" is used. If the PPD generator finds
1526such an option, it hides the member options by only using
1527"*Foomatic..." keywords to describe them, not any standard PPD
1528keywords as "*OpenUI...", "*OrderDependency...", ... This way
1529PPD-aware graphical frontends do not see the member options but
1530foomatic-rip has all information from them to run the driver
1531correctly.
1532
1533
1534String and Password Options
1535---------------------------
1536
1537These options allow the user to supply nearly arbitrary strings
1538(within limits of length, characters and structure) to the printer
1539driver, for example names of color calibration files, fax numbers,
1540passwords for confidential jobs, ... Frequently needed strings can be
1541added as enumerated choices, so a frontend can show the option as a
1542combo-box. The enumerated choices are also used for frontends which
1543only support options as defined by the PPD spec. So having enumerated
1544choices is highly recommended for most of these options.
1545
1546In the XML database string and password options look similar to
1547enumerated choice options. The differences are the option types
1548"string" or "password" and the additional tags to restrict the
1549possible strings.
1550
1551The "<arg_maxlength>" tags give a length limit, it should once not
1552allow strings longer than around 100 characters, as otherwise
1553foomatic-configure could generate a line longer than the allowed 255
1554characters in the PPD file when setting the default value, and second,
1555which is very important, it should not allow strings which are too
1556long for the printer filter or driver so that buffer overflows cannot
1557occur. Not using the "<arg_maxlength>" tags makes arbitrary long
1558strings to be accepted, this is not recommended.
1559
1560With "<arg_allowedchars>" the accepted strings can be restricted to
1561contain only the characters given in the list. This restrictions does
1562not only avoid that the filter chokes on a wrong option, it serves
1563mainly for security reasons, for example to avoid a string like "|| rm
1564-rf * ||" for a command line option. So if the option prototype does
1565not quote the string, command delimiter characters, I/O re-directors,
1566and shell special characters (";", "|", "&", "<", ">", "*", "?", "[",
1567"]", "{", "}", "(", ")", "$", "\", "'", """) should not be allowed. If
1568the string is quoted by the option prototype, the closing quote
1569character and the backslash should not be allowed, so that one cannot
1570escape from the quoting. The allowed characters are checked by a
1571"/^[...]*$/" expression in the Perl scripts, so ranges with "-", a
1572list of forbidden characters with a leading "^", or special characters
1573as "\w", "\d", "\x07", ... are allowed. To allow a backslash, one has
1574to escape it by using two backslashes ("\\"). To allow a "-" it must
1575be in the end of the list to not make it defining a range and for a
1576"^" must be placed at any other place than the beginning of the string
1577if it should be explicitly allowed.
1578
1579"<arg_allowedregexp>" allows also to restrict the structure of the
1580string, as it defines an arbitrary Perl regular expression (see "man
1581perlre") which has to be matched by the string. This serves also for
1582having only strings which are usable by the filter and which do not
1583destroy the command line structure. With this one can for example
1584forbid a backslash as the last character to avoid escaping the closing
1585quote of the option prototype. Regular expressions are applied via a
1586'/.../' expression in the Perl scripts. To apply the pattern matching
1587modifiers "i", "m", "s", or "x" (as "/.../i" for case-insensitive
1588matching) begin the regular expression with "(?<modifiers>)" (as
1589"(?i)..." for case-insensitive matching).
1590
1591It is highly recommended to use at least one of "<arg_allowedchars>"
1592and "<arg_allowedregexp>", as otherwise all characters are allowed in
1593the user-supplied string and so a malicious user can execute arbitrary
1594shell or PostScript commands. If both tags are used, both conditions
1595have to be fulfilled.
1596
1597Note that for the character lists and regular expressions in the XML
1598files the following character substitutions have to be done:
1599
1600 < --> <
1601 > --> >
1602 " --> "
1603 ' --> '
1604 & --> &
1605
1606Here is an example for an option to supply the file name for an ICC
1607profile for the "foo2zjs" driver (this option is neither in the CVS
1608for the Foomatic database nor tested with this driver):
1609
1610--------------------------------------------------------------------------
1611<option type="string" id="opt/foo2zjs-ICM">
1612 <comments>
1613 <en>
1614 This option controls which .ICM file to use for color correction.
1615 ICM files are stored in the directory /usr/share/foo2zjs/icm/.
1616 </en>
1617 </comments>
1618 <arg_longname> <en>ICM Color Profile</en> </arg_longname>
1619 <arg_shortname> <en>ICM</en> </arg_shortname>
1620 <arg_execution>
1621 <arg_group>Adjustment</arg_group>
1622 <arg_order>300</arg_order>
1623 <arg_spot>A</arg_spot>
1624 <arg_required />
1625 <arg_substitution />
1626 <arg_proto>-G%s </arg_proto>
1627 </arg_execution>
1628 <arg_maxlength>127</arg_maxlength>
1629 <arg_allowedchars>A-Za-z0-9\._/-</arg_allowedchars>
1630 <arg_allowedregexp>(?<!\/)$</arg_allowedregexp>
1631 <constraints>
1632 <constraint sense="true">
1633 <driver>foo2zjs</driver>
1634 <arg_defval>ev/foo2zjs-ICM-none</arg_defval>
1635 </constraint>
1636 <constraint sense="true">
1637 <make>Minolta</make>
1638 <model>magicolor 2300 DL</model>
1639 <driver>foo2zjs</driver>
1640 <arg_defval>ev/foo2zjs-ICM-DL2312</arg_defval>
1641 </constraint>
1642 <constraint sense="true">
1643 <make>Minolta</make>
1644 <model>magicolor 2200 DL</model>
1645 <driver>foo2zjs</driver>
1646 <arg_defval>ev/foo2zjs-ICM-DL2200RGB</arg_defval>
1647 </constraint>
1648 </constraints>
1649 <enum_vals>
1650 <enum_val id="ev/foo2zjs-ICM-none">
1651 <ev_longname> <en>No ICM color correction</en> </ev_longname>
1652 <ev_shortname> <en>None</en> </ev_shortname>
1653 <ev_driverval></ev_driverval>
1654 </enum_val>
1655 <enum_val id="ev/foo2zjs-ICM-DL2312">
1656 <ev_longname> <en>File DL2312.icm</en> </ev_longname>
1657 <ev_shortname> <en>DL2312</en> </ev_shortname>
1658 <ev_driverval>DL2312.icm</ev_driverval>
1659 <constraints>
1660 <constraint sense="false">
1661 <make>HP</make> <model>LaserJet 1000</model>
1662 </constraint>
1663 </constraints>
1664 </enum_val>
1665 <enum_val id="ev/foo2zjs-ICM-DL2324">
1666 <ev_longname> <en>File DL2324.icm</en> </ev_longname>
1667 <ev_shortname> <en>DL2324</en> </ev_shortname>
1668 <ev_driverval>DL2324.icm</ev_driverval>
1669 <constraints>
1670 <constraint sense="false">
1671 <make>HP</make> <model>LaserJet 1000</model>
1672 </constraint>
1673 </constraints>
1674 </enum_val>
1675
1676 ...
1677
1678 </enum_vals>
1679</option>
1680--------------------------------------------------------------------------
1681
1682This option allows to choose either one of the given file names,
1683either by using the "<ev_shortname>"s or the "<ev_driverval>"s, or one
1684can give every arbitrary other file name with a maximum length of 127
1685characters, only containing letters, digits, periods, underscores,
1686dashes, and slashes, and not having a slash in the end (no
1687directories). Note that in Perl the period must be escaped by a
1688backslash to be taken literally, otherwise it stands for an arbitrary
1689character. The regular expression for blocking out strings ending with
1690a slash is "(?<!\/)$" (see "man perlre", search for "(?"). Here the
1691slash is quoted by a backslash. In the XML file the "<" is replaced by
1692"<" so that the XML structure does not get broken. foomatic-rip
1693translates this back before applying the regular expression.
1694
1695To be able to offer strings as an enumerated choice which are not
1696allowed as an option name in a PPD file, the "<ev_shortname>" may
1697differ from the "<ev_driverval>", the string inserted at the "%s"
1698place holder in the "<arg_proto>" is always the "<ev_driverval>",
1699independent whether the user supplies the "<ev_driverval>" directly or
1700the "<ev_shortname>". In this example both
1701
1702 lpr -o ICM= file.ps
1703
1704and
1705
1706 lpr -o ICM=None file.ps
1707
1708supply an empty string as the value of the ICM option.
1709
1710For the default value there must be an enumerated choice, if there is
1711none, the PPD generator will create one. So this entry is allowed
1712(this option is only an example, it is not in the CVS of the Foomatic
1713database):
1714
1715--------------------------------------------------------------------------
1716<option type="password" id="opt/Password">
1717 <!-- A multilingual <comments> block can appear here, too;
1718 it should be treated as documentation for the user. -->
1719 <arg_longname>
1720 <en>Password (for confidential jobs)</en>
1721 </arg_longname>
1722 <arg_shortname>
1723 <en>Password</en><!-- backends only know <en> shortnames! -->
1724 </arg_shortname>
1725 <arg_execution>
1726 <arg_group>General</arg_group>
1727 <arg_order>100</arg_order>
1728 <arg_spot>B</arg_spot>
1729 <arg_substitution />
1730 <arg_proto> --pass=%s</arg_proto>
1731 </arg_execution>
1732 <arg_maxlength>30</arg_maxlength>
1733 <arg_allowedchars>A-Za-z0-9\.,_\+\=\:-/</arg_allowedchars>
1734 <constraints>
1735 <constraint sense='true'>
1736 <driver>mydriver</driver>
1737 <arg_defval></arg_defval>
1738 </constraint>
1739 </constraints>
1740</option>
1741--------------------------------------------------------------------------
1742
1743The default value is an empty string here. So the PPD generator will
1744add a choice for the empty string.
1745
1746Normally, automatically added choices get the same "<ev_shortname>" as
1747the string itself, but if the string is not allowed as an option name
1748in a PPD file, the "<ev_shortname>" will be modified. For an empty
1749string (as in the example above) "None" will be used and all
1750characters except numbers, letters, and underscores ("_") will be
1751replaced by underscores.
1752
1753The option types "string" and "password" are treated exactly the same
1754way by the PPD generator and by foomatic-rip, the different names
1755are only for frontends to know whether the input field should display
1756the typed characters or asterisks on the screen.
1757
1758
1759CUPS Custom Options
1760-------------------
1761
1762CUPS defines several extensions to the PPD specifications to support
1763the functionality of modern printers:
1764
1765http://www.cups.org/documentation.php/doc-1.4/spec-ppd.html
1766
1767There are extensions for so-called "Custom Options" where instead of
1768given enumerated choices freely choosable custom values can be
1769supplied. As Foomatic's numerical, string, and password options can be
1770implemented as CUPS custom options in the PPDs as well, the PPD
1771generator does both implementations in the PPDs. There are the
1772"*Foomatic..." keywords generated, as before, but also the CUPS PPD
1773extension, consisting of the keywords "*Custom<option>" and
1774"*ParamCustom<option>" keywords. This way GUIs which are aware of
1775CUPS' custom options give full access to Foomatic's numerical, string,
1776and password options.
1777
1778foomatic-rip understands also PPD files now which describe custom
1779options only by the CUPS extension and not with "*Foomatic..."
1780keywords.
1781
1782Allowed characters and regular expressions for string and password
1783options cannot be described by CUPS PPD extensions. So CUPS-aware GUIs
1784will allow input of strings which do not match these restrictions, but
1785foomatic-rip will let the option fall back to the default value in
1786such a case. This way the security is assured.
1787
1788
1789Option Grouping
1790---------------
1791
1792All options should be put in groups (with the tags
1793"<arg_group>...</arg_group>" in the "<arg_execution>" section of the
1794option XML files, see above). This way many GUIs sort the options into
1795tabs or tree branches according to the groups. This way one gets only
1796the most important options on the first tab and not so often needed
1797ones on additional tabs. This also overrides the automatic option
1798grouping of CUPS (Groups "General" and "Extra").
1799
1800It is recommended to have the options in groups as follows (plus
1801perhaps special groups, but not one group for every option):
1802
1803General
1804
1805 Here go options which are most used on a job-by-job basis, as the
1806 options for paper type, size, and tray, ink type, duplex, ... and
1807 all options affecting the printout quality, as resolution,
1808 dithering, ... and especially "PrintoutMode". If a "PrintoutMode"
1809 option is present, all quality-related options covered by the
1810 "PrintoutMode" option go into the automatically created
1811 "PrintoutMode" group (see above). And this is intended, these
1812 options are now usually controlled by "PrintoutMode" and so they are
1813 not the most important options for the first tab any more.
1814
1815 Do not put color/brightness/gamma, ... options here, they go to
1816 "Adjustment".
1817
1818 Options typically to go here are:
1819
1820 o PageSize
1821 o InputSlot
1822 o MediaType
1823 o InkType
1824 o Duplex
1825 o PrintoutMode
1826 o Resolution
1827 o REt
1828 o Dither
1829 o FastRes
1830 o Economode
1831 o ...
1832
1833 All options mentioned after "PrintoutMode" will usually be used as
1834 member options for "PrintoutMode", they are only in this group when
1835 there is no "PrintoutMode" option.
1836
1837PrintoutMode
1838
1839 This group only exists if there is a "PrintoutMode" option, because
1840 it is generated by this option. It contains the member options of
1841 "PrintoutMode". Typical candidates are
1842
1843 o Resolution
1844 o REt
1845 o Dither
1846 o FastRes
1847 o Economode
1848 o ...
1849
1850 They do not need an "<arg_group>PrintoutMode</arg_group>" line, they
1851 are put into this group automatically. You should better put an
1852 "<arg_group>General</arg_group>" line into these options, so that
1853 they go into the "General" group when there is a printer/driver
1854 combo for which no "PrintoutMode" option applies.
1855
1856Adjustment
1857
1858 Options for correcting the appearance of colors, contrast, ..., for
1859 head alignment, ... etc. Here most numerical options will go, but
1860 also things like "Density", also if it is an enumerated choice
1861 option. Typical candidates are:
1862
1863 o Gamma
1864 o Brightness
1865 o Contrast
1866 o Density
1867 o Saturation
1868 o Cyan
1869 o Magenta
1870 o Yellow
1871 o ...
1872
1873Finishing
1874
1875 If a printer has a stapler, folder, cutter, envelope packer, or
1876 similar devices to do additional processing on the ready printout,
1877 the options to control this stuff go into this group. Examples:
1878
1879 o Stapling
1880 o Binding
1881 o Cutting
1882 o Booklet
1883 o ...
1884
1885Miscellaneous
1886
1887 Options which do not fit into the mentioned groups and for which it
1888 is not worth to make a special group.
1889
1890
1891Unprintable margins
1892-------------------
1893
1894On most printers you cannot print arbitrarily close to the borders of
1895the paper. You usually will have margins of certain width on which you
1896cannot print. For filters and application programs to know about these
1897margins PPD files have "*ImageableArea" lines which define the
1898positions of the lower, the upper, the left, and the right borders of
1899the area on which the printer can print. There is one line for each
1900paper size listed in the "*PageSize" option.
1901
1902To conveniently generate these lines one can use the following XML
1903structure in the Foomatic database entries:
1904
1905--------------------------------------------------------------------------
1906<margins>
1907 <general>
1908 <!-- The margins here are valid for every paper size for -->
1909 <!-- which there is no "exception" section -->
1910 <!-- ---------- -->
1911 <!-- possible units: -->
1912 <!-- pt, in, mm, cm,
1913 <!-- dotsNNNdpi (NNN: resolution in which dots are counted) -->
1914 <!-- if "unit" not present, default unit is pt -->
1915 <!-- ---------- -->
1916 <!-- if a margin is not present, default width is used -->
1917 <!-- ---------- -->
1918 <!-- a missing "general" section assumes the default borders as the -->
1919 <!-- general borders and "pt" as the default unit for -->
1920 <!-- "exceptions". -->
1921 <!-- ---------- -->
1922 <!-- Default margin widths: 1/4 inch left/right, 1/2 inch top/bottom -->
1923 <unit>pt</unit>
1924 <top>9</top>
1925 <bottom>36</bottom>
1926 <left>18</left>
1927 <right>18</right>
1928 </general>
1929 <exception PageSize="Photo4x6TearoffTab">
1930 <!-- if one or more of "unit", "top", "bottom", "left", -->
1931 <!-- "right" is missing, the appropriate item of the "general" -->
1932 <!-- section is used -->
1933 <top>0</top>
1934 <left>0</left>
1935 <right>0</right>
1936 </exception>
1937 <exception PageSize="A4">
1938 <!-- It is also possible to give absolute values in PostScript -->
1939 <!-- coordinates where the origin is the lower left corner. To -->
1940 <!-- do so, the <absolute /> tag has to be added, otherwise -->
1941 <!-- the values are the widths of the unprintable margins -->
1942 <absolute />
1943 <left>10</left>
1944 <right>585</right>
1945 </exception>
1946 <exception PageSize="...">
1947 ...
1948 </exception>
1949 ...
1950<margins>
1951--------------------------------------------------------------------------
1952
1953This structure is allowed in printer entries in the "<mechanism>"
1954section and in driver entries in the "<execution>" section or inside a
1955"<printer>" entry of the driver's printer list. In the "<execution>"
1956section of a driver entry the margins are valid for all printers used
1957with this driver, in a "<printer>" entry they apply only to the given
1958printer/driver combo.
1959
1960The shown example could be for the HP PhotoSmart 7150/7350, which does
1961full-bleed only on HP's special photo paper with an 0.5 inch wide
1962tear-off tab on the lower border (and some other paper sizes used in the
1963photo tray). On all other paper sizes the printer leaves white borders
1964of half an inch at the top and at the bottom and a quarter of an inch on
1965the left and right hand side (1 inch are 72 pt). In addition, the page
1966size "A4" allows to print up to 10 points to the left and the right borders.
1967
1968At first we give the general borders ("<general>" section) where we
1969choose the unit "pt" (PostScript points) for the numbers. These borders
1970are valid for all paper sizes which are not explicitly mentioned with an
1971"<exception ...>" section. For our printers one of the exceptions is the
19724x6 photo paper with the tear-off tab (including the tab the paper is
19734x6.5 inches large). here the printer prints up to the left, right, and
1974top borders. Therefore we have margins of zero here. At the lower border
1975the printer still leaves half an inch white (therefore probably HP
1976introduced the tear-off tab), so we keep the 36 pt of the "<general>"
1977section by not mentioning a new lower border. For A4 we redefine the
1978left and the right border. This is also possible in absolute PostScript
1979coordinates measured from the lower left corner, as we do here. We
1980indicate this with the "<absolute />" tag. The left border is at 10 pt
1981from the left, and as A4 paper is 595 pt wide, the right border is at
1982585 points from the left.
1983
1984One hint for the choice of the units: Float numbers as border widths are
1985allowed, but it is recommended for having exact info to choose a unit
1986which gives integer numbers for the widths (which is always possible
1987with the "dotsNNNdpi" unit with NNN being the maximum resolution of the
1988printer).
1989
1990A "<margins>" section in a printer entry should represent the printer's
1991hardware capabilities. Such a section in a driver entry should represent
1992how the driver's limitations are. If there are margins defined in both
1993the printer and the driver entry of the desired printer/driver combo,
1994the more restrictive (wider) borders count. If there are no border
1995definitions in both the printer and the driver entry, the borders are
1996assumed to be of the default widths.
1997
1998
1999Adding arbitrary extra entries to the PPD file
2000----------------------------------------------
2001
2002The "<ppdentry>" tags allow to add extra lines to the PPD file. The
2003tags can be put into the top level ("<printer>") of a printer XML entry,
2004into the "<execution>" section of a driver XML entry, or into the
2005"<printer>" entries of the printer list in a driver XML file. They serve
2006mainly to put a default resolution into PPD files for drivers without
2007"Resolution" option. Examples:
2008
2009"hpijs" driver, default resolution for HP DeskJet 350. For this driver
2010the default resolution depends on the printer class. Therefore the
2011appropriate "<ppdentry>"s have to be in the printer entries of the
2012printer list:
2013
2014--------------------------------------------------------------------------
2015<driver id="driver/hpijs">
2016 <name>hpijs</name>
2017 ...
2018 <printers>
2019 <printer>
2020 <id>printer/HP-DeskJet_350C</id><!-- HP DeskJet 350C -->
2021 <ppdentry>
2022 *DefaultResolution: 600dpi
2023 </ppdentry>
2024 <margins>
2025 <general>
2026 <unit>in</unit>
2027 <relative />
2028 <left>0.25</left>
2029 <right>0.25</right>
2030 <top>0.125</top>
2031 <bottom>0.67</bottom>
2032 </general>
2033 <exception PageSize="A4">
2034 <left>0.135</left>
2035 <right>0.135</right>
2036 </exception>
2037 </margins>
2038 </printer>
2039 ...
2040 </printers>
2041</driver>
2042--------------------------------------------------------------------------
2043
2044"pnm2ppa" driver: This driver has no "Resolution" option, and all
2045printers print in 600 dpi with it. So we put the "<ppdentry>" into the
2046"<execution>" section:
2047
2048--------------------------------------------------------------------------
2049<driver id="driver/pnm2ppa">
2050 <name>pnm2ppa</name>
2051 <url>http://sourceforge.net/projects/pnm2ppa/</url>
2052 <execution>
2053 <filter />
2054 <prototype>gs -q -dNOPAUSE -dPARANOIDSAFER -dBATCH -r600%A%Z
2055-sOutputFile=- - | pnm2ppa%C%B -i - -o -</prototype>
2056 <ppdentry>
2057 *DefaultResolution: 600dpi
2058 </ppdentry>
2059 </execution>
2060 ...
2061</driver>
2062--------------------------------------------------------------------------
2063
2064Note that leading spaces are removed from the lines between the
2065"<ppdentry>" tags before they get inserted into the PPD file.
2066
2067The lines are added at the end of the PPD file header, right after the
2068lines for the basic hardware capabilities of the printer.
2069
2070
2071Example for a Foomatic-generated PPD file
2072-----------------------------------------
2073
2074Below is an example PPD file, the PPD file for the HP Color LaserJet 4550
2075used with the "pxlcolor" driver. It was generated with the command line
2076
2077 ./foomatic-ppdfile -p HP-Color_LaserJet_4550 -d pxlcolor
2078
2079The structure is completely Adobe-compliant and no relevant
2080information is in comments. Besides the usual keywords which one finds
2081in PPDs there are some special ones beginning with
2082"*Foomatic...". These keywords are read by foomatic-rip and contain
2083all information to build the renderer's command line. See explanations
2084for these keywords below the example file.
2085
2086If a printer has auto-detection information in the Foomatic database,
2087the manufacturer and model names from there are inserted in the
2088"*Manufacturer:" and "*Product:" fields and the IEEE-1284 ID string is
2089put into the "*1284DeviceID:" field.
2090
2091Independent whether there is auto-detection information, there is an
2092additional "DRV:" field in the "*1284DeviceID:" which contains driver
2093properties. These properties are put here, so that they appear in
2094CUPS' PPD/driver overview listings ("lpinfo -l -m"). This way a
2095printer setup tool can show the driver properties in a driver overview
2096without needing to generate and read the PPD files. The following
2097properties are available (comma-separated):
2098
2099 D: Driver name
2100 R: Driver Recommended for this printer (0, 1)?
2101 M: Driver supplied by the Manufacturer (0, 1)?
2102 O: Driver marked Obsolete in the OpenPrinting database (0, 1)?
2103 F: Driver is Free software (0, 1)?
2104 P: Driver has Patent issues (0, 1)?
2105 S: Support contacts (c: commercial, v: voluntary, u: unknown, more than
2106 one possible)
2107 T: Driver Type: G: Ghostscript built-in, C: CUPS-Raster, I: IJS,
2108 O: OpenPrinting Vector, F: Filter, U: Ghostscript Uniprint,
2109 P: PostScript
2110 X: Maximum X resolution of the driver in dpi
2111 Y: Maximum Y resolution of the driver in dpi
2112 C: Does the driver support Color printing (0, 1)?
2113 t: Rating for Text document printing with this driver (0 ... 100)
2114 l: Rating for Line art document printing with this driver (0 ... 100)
2115 g: Rating for Graphics document printing with this driver (0 ... 100)
2116 p: Rating for Photo document printing with this driver (0 ... 100)
2117 d: Rating for system loaD caused when printing with this driver (0 ... 100)
2118 s: Rating for processing Speed of this driver (0 ... 100)
2119
2120The "DRV:" field in a device ID looks like this:
2121
2122*1284DeviceID: "MFG:Hewlett-Packard;MDL:HP LaserJet 4050 Series;CMD:PJL,MLC,PCL,
2123PCLXL,POSTSCRIPT;DES:Hewlett-Packard LaserJet 4050 Series;DRV:Dljet4,R0,M0,F1,Sv,TG,X600,Y600,C0,t90,l90,g60,p30,s90;"
2124
2125If there is no device ID for a printer, the "*1284DeviceID" will
2126contain only the "DRV:" field.
2127
2128The PPDs contain the driver properties also in clear text, like this:
2129
2130*driverName ljet4/ljet4 - Built-in Ghostscript driver for PCL 5e laser printers: ""
2131*driverType G/Ghostscript built-in: ""
2132*driverUrl: "http://www.ghostscript.com/"
2133*driverObsolete: False
2134*driverRecommendedReplacement: hpijs (only if driver is obsolete)
2135*driverSupplier: "GPL Ghostscript"
2136*driverManufacturerSupplied: False
2137*driverLicense: "GPL"
2138*driverFreeSoftware: True
2139*driverSupportContactVoluntary: "http://forums.openprinting.org/ OpenPrinting forums"
2140*driverSupportContactCommercial: "http://... ..."
2141*driverSupportContactUnknown: "http://... ..."
2142*driverMaxResolution: 600 600
2143*driverColor: False
2144*driverTextSupport: 90
2145*driverLineartSupport: 90
2146*driverGraphicsSupport: 60
2147*driverPhotoSupport: 30
2148*driverSystemmLoad: 90
2149*driverRenderingSpeed: 90
2150
2151----------------------------------------------------------------------------
2152*PPD-Adobe: "4.3"
2153*%
2154*% For information on using this, and to obtain the required backend
2155*% script, consult http://www.openprinting.org/
2156*%
2157*% This file is published under the GNU General Public License
2158*%
2159*% PPD-O-MATIC (4.0.0 or newer) generated this PPD file. It is for use with
2160*% all programs and environments which use PPD files for dealing with
2161*% printer capability information. The printer must be configured with the
2162*% "foomatic-rip" backend filter script of Foomatic 4.0.0 or newer. This
2163*% file and "foomatic-rip" work together to support PPD-controlled printer
2164*% driver option access with all supported printer drivers and printing
2165*% spoolers.
2166*%
2167*% To save this file on your disk, wait until the download has completed
2168*% (the animation of the browser logo must stop) and then use the
2169*% "Save as..." command in the "File" menu of your browser or in the
2170*% pop-up manu when you click on this document with the right mouse button.
2171*% DO NOT cut and paste this file into an editor with your mouse. This can
2172*% introduce additional line breaks which lead to unexpected results.
2173*%
2174*% You may save this file as 'HP-Color_LaserJet_4550-pxlcolor.ppd'
2175*%
2176*%
2177*FormatVersion: "4.3"
2178*FileVersion: "1.1"
2179*LanguageVersion: English
2180*LanguageEncoding: ISOLatin1
2181*PCFileName: "PXLCOLOR.PPD"
2182*Manufacturer: "HP"
2183*Product: "(HP Color LaserJet 4550)"
2184*cupsVersion: 1.0
2185*cupsManualCopies: True
2186*cupsModelNumber: 2
2187*cupsFilter: "application/vnd.cups-postscript 100 foomatic-rip"
2188*cupsFilter: "application/vnd.cups-pdf 0 foomatic-rip"
2189*%pprRIP: foomatic-rip other
2190*ModelName: "HP Color LaserJet 4550"
2191*ShortNickName: "HP Color LaserJet 4550 pxlcolor"
2192*NickName: "HP Color LaserJet 4550 Foomatic/pxlcolor"
2193*PSVersion: "(3010.000) 550"
2194*PSVersion: "(3010.000) 651"
2195*PSVersion: "(3010.000) 652"
2196*PSVersion: "(3010.000) 653"
2197*PSVersion: "(3010.000) 704"
2198*PSVersion: "(3010.000) 705"
2199*PSVersion: "(3010.000) 800"
2200*PSVersion: "(3010.000) 815"
2201*PSVersion: "(3010.000) 850"
2202*PSVersion: "(3010.000) 860"
2203*PSVersion: "(3010.000) 861"
2204*PSVersion: "(3010.000) 862"
2205*PSVersion: "(3010.000) 863"
2206*LanguageLevel: "3"
2207*ColorDevice: True
2208*DefaultColorSpace: RGB
2209*FileSystem: False
2210*Throughput: "1"
2211*LandscapeOrientation: Plus90
2212*TTRasterizer: Type42
2213*1284DeviceID: "MFG:Hewlett-Packard;MDL:HP Color LaserJet 4550;CMD:PJL,MLC,PCL,POSTSCRIPT,PCLXL,PJL;DES:Hewlett-Packard Color LaserJet 4550;DRV:Dpxlcolor,R0,M0,TG;"
2214
2215*driverName pxlcolor/pxlcolor: ""
2216*driverType G/Ghostscript built-in: ""
2217*driverUrl: "http://www.ghostscript.com/"
2218*driverObsolete: False
2219
2220*DefaultResolution: 1200dpi
2221
2222
2223
2224*VariablePaperSize: False
2225
2226*FoomaticIDs: HP-Color_LaserJet_4550 pxlcolor
2227*FoomaticRIPCommandLine: "gs -q -dBATCH -dPARANOIDSAFER -dNOPAUSE%B%A%&&
2228Z -sOutputFile=- - | perl -p -e 'if (! $did) { s/\xc0.\xf8\x26/\x&&
2229c0%E\xf8\x26/ && $did++; }'"
2230*End
2231
2232*OpenGroup: General/General
2233
2234*OpenUI *PrintoutMode/Printout Mode: PickOne
2235*FoomaticRIPOption PrintoutMode: enum Composite A
2236*OrderDependency: 10 AnySetup *PrintoutMode
2237*DefaultPrintoutMode: Normal
2238*PrintoutMode Draft/Draft: "%% FoomaticRIPOptionSetting: PrintoutMode=Draft"
2239*FoomaticRIPOptionSetting PrintoutMode=Draft: "PrinterResolution=300x3&&
224000dpi ColorModel=Color Economode=On FastRes=Off"
2241*End
2242*PrintoutMode Draft.Gray/Draft Grayscale: "%% FoomaticRIPOptionSetting: PrintoutMode=Draft.Gray"
2243*FoomaticRIPOptionSetting PrintoutMode=Draft.Gray: "PrinterResolution=&&
2244300x300dpi ColorModel=Grayscale Economode=On FastRes=Off"
2245*End
2246*PrintoutMode Normal/Normal: "%% FoomaticRIPOptionSetting: PrintoutMode=Normal"
2247*FoomaticRIPOptionSetting PrintoutMode=Normal: "PrinterResolution=600x&&
2248600dpi ColorModel=Color Economode=Off FastRes=On"
2249*End
2250*PrintoutMode Normal.Gray/Normal Grayscale: "%% FoomaticRIPOptionSetting: PrintoutMode=Normal.Gray"
2251*FoomaticRIPOptionSetting PrintoutMode=Normal.Gray: "PrinterResolution&&
2252=600x600dpi ColorModel=Grayscale Economode=Off FastRes=On"
2253*End
2254*PrintoutMode High/High Quality: "%% FoomaticRIPOptionSetting: PrintoutMode=High"
2255*FoomaticRIPOptionSetting PrintoutMode=High: "PrinterResolution=1200x1&&
2256200dpi ColorModel=Color Economode=Off FastRes=Off"
2257*End
2258*PrintoutMode High.Gray/High Quality Grayscale: "%% FoomaticRIPOptionSetting: PrintoutMode=High.Gray"
2259*FoomaticRIPOptionSetting PrintoutMode=High.Gray: "PrinterResolution=1&&
2260200x1200dpi ColorModel=Grayscale Economode=Off FastRes=Off"
2261*End
2262*CloseUI: *PrintoutMode
2263
2264*OpenUI *PageSize/Page Size: PickOne
2265*FoomaticRIPOption PageSize: enum CmdLine A
2266*OrderDependency: 100 AnySetup *PageSize
2267*DefaultPageSize: Letter
2268*PageSize Letter/US Letter: "%% FoomaticRIPOptionSetting: PageSize=Letter"
2269*FoomaticRIPOptionSetting PageSize=Letter: " -dDEVICEWIDTHPOINTS=612 -&&
2270dDEVICEHEIGHTPOINTS=792"
2271*End
2272*PageSize A4/A4: "%% FoomaticRIPOptionSetting: PageSize=A4"
2273*FoomaticRIPOptionSetting PageSize=A4: " -dDEVICEWIDTHPOINTS=595 -dDEV&&
2274ICEHEIGHTPOINTS=842"
2275*End
2276*PageSize 11x17/11x17: "%% FoomaticRIPOptionSetting: PageSize=11x17"
2277*FoomaticRIPOptionSetting PageSize=11x17: " -dDEVICEWIDTHPOINTS=792 -d&&
2278DEVICEHEIGHTPOINTS=1224"
2279*End
2280*PageSize A3/A3: "%% FoomaticRIPOptionSetting: PageSize=A3"
2281*FoomaticRIPOptionSetting PageSize=A3: " -dDEVICEWIDTHPOINTS=842 -dDEV&&
2282ICEHEIGHTPOINTS=1191"
2283*End
2284*PageSize A5/A5: "%% FoomaticRIPOptionSetting: PageSize=A5"
2285*FoomaticRIPOptionSetting PageSize=A5: " -dDEVICEWIDTHPOINTS=421 -dDEV&&
2286ICEHEIGHTPOINTS=595"
2287*End
2288*PageSize B5/B5 (JIS): "%% FoomaticRIPOptionSetting: PageSize=B5"
2289*FoomaticRIPOptionSetting PageSize=B5: " -dDEVICEWIDTHPOINTS=516 -dDEV&&
2290ICEHEIGHTPOINTS=729"
2291*End
2292*PageSize Env10/Envelope #10: "%% FoomaticRIPOptionSetting: PageSize=Env10"
2293*FoomaticRIPOptionSetting PageSize=Env10: " -dDEVICEWIDTHPOINTS=297 -d&&
2294DEVICEHEIGHTPOINTS=684"
2295*End
2296*PageSize EnvC5/Envelope C5: "%% FoomaticRIPOptionSetting: PageSize=EnvC5"
2297*FoomaticRIPOptionSetting PageSize=EnvC5: " -dDEVICEWIDTHPOINTS=459 -d&&
2298DEVICEHEIGHTPOINTS=649"
2299*End
2300*PageSize EnvDL/Envelope DL: "%% FoomaticRIPOptionSetting: PageSize=EnvDL"
2301*FoomaticRIPOptionSetting PageSize=EnvDL: " -dDEVICEWIDTHPOINTS=312 -d&&
2302DEVICEHEIGHTPOINTS=624"
2303*End
2304*PageSize EnvISOB5/Envelope B5: "%% FoomaticRIPOptionSetting: PageSize=EnvISOB5"
2305*FoomaticRIPOptionSetting PageSize=EnvISOB5: " -dDEVICEWIDTHPOINTS=499&&
2306 -dDEVICEHEIGHTPOINTS=709"
2307*End
2308*PageSize EnvMonarch/Envelope Monarch: "%% FoomaticRIPOptionSetting: PageSize=EnvMonarch"
2309*FoomaticRIPOptionSetting PageSize=EnvMonarch: " -dDEVICEWIDTHPOINTS=2&&
231079 -dDEVICEHEIGHTPOINTS=540"
2311*End
2312*PageSize Executive/Executive: "%% FoomaticRIPOptionSetting: PageSize=Executive"
2313*FoomaticRIPOptionSetting PageSize=Executive: " -dDEVICEWIDTHPOINTS=52&&
23142 -dDEVICEHEIGHTPOINTS=756"
2315*End
2316*PageSize Legal/US Legal: "%% FoomaticRIPOptionSetting: PageSize=Legal"
2317*FoomaticRIPOptionSetting PageSize=Legal: " -dDEVICEWIDTHPOINTS=612 -d&&
2318DEVICEHEIGHTPOINTS=1008"
2319*End
2320*CloseUI: *PageSize
2321
2322*OpenUI *PageRegion: PickOne
2323*OrderDependency: 100 AnySetup *PageRegion
2324*DefaultPageRegion: Letter
2325*PageRegion Letter/US Letter: "%% FoomaticRIPOptionSetting: PageSize=Letter"
2326*PageRegion A4/A4: "%% FoomaticRIPOptionSetting: PageSize=A4"
2327*PageRegion 11x17/11x17: "%% FoomaticRIPOptionSetting: PageSize=11x17"
2328*PageRegion A3/A3: "%% FoomaticRIPOptionSetting: PageSize=A3"
2329*PageRegion A5/A5: "%% FoomaticRIPOptionSetting: PageSize=A5"
2330*PageRegion B5/B5 (JIS): "%% FoomaticRIPOptionSetting: PageSize=B5"
2331*PageRegion Env10/Envelope #10: "%% FoomaticRIPOptionSetting: PageSize=Env10"
2332*PageRegion EnvC5/Envelope C5: "%% FoomaticRIPOptionSetting: PageSize=EnvC5"
2333*PageRegion EnvDL/Envelope DL: "%% FoomaticRIPOptionSetting: PageSize=EnvDL"
2334*PageRegion EnvISOB5/Envelope B5: "%% FoomaticRIPOptionSetting: PageSize=EnvISOB5"
2335*PageRegion EnvMonarch/Envelope Monarch: "%% FoomaticRIPOptionSetting: PageSize=EnvMonarch"
2336*PageRegion Executive/Executive: "%% FoomaticRIPOptionSetting: PageSize=Executive"
2337*PageRegion Legal/US Legal: "%% FoomaticRIPOptionSetting: PageSize=Legal"
2338*CloseUI: *PageRegion
2339
2340*DefaultImageableArea: Letter
2341*ImageableArea Letter/US Letter: "18 36 594 756"
2342*ImageableArea A4/A4: "18 36 577 806"
2343*ImageableArea 11x17/11x17: "18 36 774 1188"
2344*ImageableArea A3/A3: "18 36 824 1155"
2345*ImageableArea A5/A5: "18 36 403 559"
2346*ImageableArea B5/B5 (JIS): "18 36 498 693"
2347*ImageableArea Env10/Envelope #10: "18 36 279 648"
2348*ImageableArea EnvC5/Envelope C5: "18 36 441 613"
2349*ImageableArea EnvDL/Envelope DL: "18 36 294 588"
2350*ImageableArea EnvISOB5/Envelope B5: "18 36 481 673"
2351*ImageableArea EnvMonarch/Envelope Monarch: "18 36 261 504"
2352*ImageableArea Executive/Executive: "18 36 504 720"
2353*ImageableArea Legal/US Legal: "18 36 594 972"
2354
2355*DefaultPaperDimension: Letter
2356*PaperDimension Letter/US Letter: "612 792"
2357*PaperDimension A4/A4: "595 842"
2358*PaperDimension 11x17/11x17: "792 1224"
2359*PaperDimension A3/A3: "842 1191"
2360*PaperDimension A5/A5: "421 595"
2361*PaperDimension B5/B5 (JIS): "516 729"
2362*PaperDimension Env10/Envelope #10: "297 684"
2363*PaperDimension EnvC5/Envelope C5: "459 649"
2364*PaperDimension EnvDL/Envelope DL: "312 624"
2365*PaperDimension EnvISOB5/Envelope B5: "499 709"
2366*PaperDimension EnvMonarch/Envelope Monarch: "279 540"
2367*PaperDimension Executive/Executive: "522 756"
2368*PaperDimension Legal/US Legal: "612 1008"
2369
2370*OpenUI *InputSlot/Media Source: PickOne
2371*FoomaticRIPOption InputSlot: enum CmdLine E
2372*OrderDependency: 100 AnySetup *InputSlot
2373*DefaultInputSlot: Default
2374*InputSlot Default/Printer default: "%% FoomaticRIPOptionSetting: InputSlot=Default"
2375*FoomaticRIPOptionSetting InputSlot=Default: "\x01"
2376*InputSlot Tray1/Tray 1: "%% FoomaticRIPOptionSetting: InputSlot=Tray1"
2377*FoomaticRIPOptionSetting InputSlot=Tray1: "\x03"
2378*InputSlot Tray2/Tray 2: "%% FoomaticRIPOptionSetting: InputSlot=Tray2"
2379*FoomaticRIPOptionSetting InputSlot=Tray2: "\x04"
2380*InputSlot Tray3/Tray 3: "%% FoomaticRIPOptionSetting: InputSlot=Tray3"
2381*FoomaticRIPOptionSetting InputSlot=Tray3: "\x05"
2382*InputSlot Tray4/Tray 4: "%% FoomaticRIPOptionSetting: InputSlot=Tray4"
2383*FoomaticRIPOptionSetting InputSlot=Tray4: "\x06"
2384*InputSlot Tray5/Tray 5: "%% FoomaticRIPOptionSetting: InputSlot=Tray5"
2385*FoomaticRIPOptionSetting InputSlot=Tray5: "\x07"
2386*InputSlot Tray6/Tray 6: "%% FoomaticRIPOptionSetting: InputSlot=Tray6"
2387*FoomaticRIPOptionSetting InputSlot=Tray6: "\x08"
2388*InputSlot Tray7/Tray 7: "%% FoomaticRIPOptionSetting: InputSlot=Tray7"
2389*FoomaticRIPOptionSetting InputSlot=Tray7: "\x09"
2390*InputSlot Manual/Manual Feeder: "%% FoomaticRIPOptionSetting: InputSlot=Manual"
2391*FoomaticRIPOptionSetting InputSlot=Manual: "\x02"
2392*CloseUI: *InputSlot
2393
2394*JCLOpenUI *Manualfeed/Manual Feed of Paper: PickOne
2395*OrderDependency: 100 JCLSetup *Manualfeed
2396*DefaultManualfeed: Off
2397*Manualfeed Off/Off: "@PJL SET MANUALFEED=OFF<0A>"
2398*Manualfeed On/On: "@PJL SET MANUALFEED=ON<0A>"
2399*JCLCloseUI: *Manualfeed
2400
2401*OpenUI *Duplex/Double-Sided printing: PickOne
2402*FoomaticRIPOption Duplex: enum CmdLine A
2403*OrderDependency: 100 AnySetup *Duplex
2404*DefaultDuplex: None
2405*Duplex DuplexNoTumble/On (Flip on Long Edge): "%% FoomaticRIPOptionSetting: Duplex=DuplexNoTumble"
2406*FoomaticRIPOptionSetting Duplex=DuplexNoTumble: " -dDuplex"
2407*Duplex DuplexTumble/On (Flip on Short Edge): "%% FoomaticRIPOptionSetting: Duplex=DuplexTumble"
2408*FoomaticRIPOptionSetting Duplex=DuplexTumble: " -dDuplex -dTumble"
2409*Duplex None/Off: "%% FoomaticRIPOptionSetting: Duplex=None"
2410*FoomaticRIPOptionSetting Duplex=None: ""
2411*CloseUI: *Duplex
2412
2413*JCLOpenUI *Copies/Number of Copies: PickOne
2414*FoomaticRIPOption Copies: int JCL A
2415*FoomaticRIPOptionPrototype Copies: "SET COPIES=%s"
2416*FoomaticRIPOptionRange Copies: 1 100
2417*OrderDependency: 100 JCLSetup *Copies
2418*DefaultCopies: 1
2419*FoomaticRIPDefaultCopies: 1
2420*Copies 1/1: "@PJL SET COPIES=1<0A>"
2421*Copies 2/2: "@PJL SET COPIES=2<0A>"
2422*Copies 3/3: "@PJL SET COPIES=3<0A>"
2423*Copies 4/4: "@PJL SET COPIES=4<0A>"
2424*Copies 5/5: "@PJL SET COPIES=5<0A>"
2425*Copies 6/6: "@PJL SET COPIES=6<0A>"
2426*Copies 7/7: "@PJL SET COPIES=7<0A>"
2427*Copies 8/8: "@PJL SET COPIES=8<0A>"
2428*Copies 9/9: "@PJL SET COPIES=9<0A>"
2429*Copies 10/10: "@PJL SET COPIES=10<0A>"
2430*Copies 11/11: "@PJL SET COPIES=11<0A>"
2431*Copies 12/12: "@PJL SET COPIES=12<0A>"
2432*Copies 13/13: "@PJL SET COPIES=13<0A>"
2433*Copies 14/14: "@PJL SET COPIES=14<0A>"
2434*Copies 15/15: "@PJL SET COPIES=15<0A>"
2435*Copies 16/16: "@PJL SET COPIES=16<0A>"
2436*Copies 17/17: "@PJL SET COPIES=17<0A>"
2437*Copies 18/18: "@PJL SET COPIES=18<0A>"
2438*Copies 19/19: "@PJL SET COPIES=19<0A>"
2439*Copies 20/20: "@PJL SET COPIES=20<0A>"
2440*Copies 21/21: "@PJL SET COPIES=21<0A>"
2441*Copies 22/22: "@PJL SET COPIES=22<0A>"
2442*Copies 23/23: "@PJL SET COPIES=23<0A>"
2443*Copies 24/24: "@PJL SET COPIES=24<0A>"
2444*Copies 25/25: "@PJL SET COPIES=25<0A>"
2445*Copies 26/26: "@PJL SET COPIES=26<0A>"
2446*Copies 27/27: "@PJL SET COPIES=27<0A>"
2447*Copies 28/28: "@PJL SET COPIES=28<0A>"
2448*Copies 29/29: "@PJL SET COPIES=29<0A>"
2449*Copies 30/30: "@PJL SET COPIES=30<0A>"
2450*Copies 31/31: "@PJL SET COPIES=31<0A>"
2451*Copies 32/32: "@PJL SET COPIES=32<0A>"
2452*Copies 33/33: "@PJL SET COPIES=33<0A>"
2453*Copies 34/34: "@PJL SET COPIES=34<0A>"
2454*Copies 35/35: "@PJL SET COPIES=35<0A>"
2455*Copies 36/36: "@PJL SET COPIES=36<0A>"
2456*Copies 37/37: "@PJL SET COPIES=37<0A>"
2457*Copies 38/38: "@PJL SET COPIES=38<0A>"
2458*Copies 39/39: "@PJL SET COPIES=39<0A>"
2459*Copies 40/40: "@PJL SET COPIES=40<0A>"
2460*Copies 41/41: "@PJL SET COPIES=41<0A>"
2461*Copies 42/42: "@PJL SET COPIES=42<0A>"
2462*Copies 43/43: "@PJL SET COPIES=43<0A>"
2463*Copies 44/44: "@PJL SET COPIES=44<0A>"
2464*Copies 45/45: "@PJL SET COPIES=45<0A>"
2465*Copies 46/46: "@PJL SET COPIES=46<0A>"
2466*Copies 47/47: "@PJL SET COPIES=47<0A>"
2467*Copies 48/48: "@PJL SET COPIES=48<0A>"
2468*Copies 49/49: "@PJL SET COPIES=49<0A>"
2469*Copies 50/50: "@PJL SET COPIES=50<0A>"
2470*Copies 51/51: "@PJL SET COPIES=51<0A>"
2471*Copies 52/52: "@PJL SET COPIES=52<0A>"
2472*Copies 53/53: "@PJL SET COPIES=53<0A>"
2473*Copies 54/54: "@PJL SET COPIES=54<0A>"
2474*Copies 55/55: "@PJL SET COPIES=55<0A>"
2475*Copies 56/56: "@PJL SET COPIES=56<0A>"
2476*Copies 57/57: "@PJL SET COPIES=57<0A>"
2477*Copies 58/58: "@PJL SET COPIES=58<0A>"
2478*Copies 59/59: "@PJL SET COPIES=59<0A>"
2479*Copies 60/60: "@PJL SET COPIES=60<0A>"
2480*Copies 61/61: "@PJL SET COPIES=61<0A>"
2481*Copies 62/62: "@PJL SET COPIES=62<0A>"
2482*Copies 63/63: "@PJL SET COPIES=63<0A>"
2483*Copies 64/64: "@PJL SET COPIES=64<0A>"
2484*Copies 65/65: "@PJL SET COPIES=65<0A>"
2485*Copies 66/66: "@PJL SET COPIES=66<0A>"
2486*Copies 67/67: "@PJL SET COPIES=67<0A>"
2487*Copies 68/68: "@PJL SET COPIES=68<0A>"
2488*Copies 69/69: "@PJL SET COPIES=69<0A>"
2489*Copies 70/70: "@PJL SET COPIES=70<0A>"
2490*Copies 71/71: "@PJL SET COPIES=71<0A>"
2491*Copies 72/72: "@PJL SET COPIES=72<0A>"
2492*Copies 73/73: "@PJL SET COPIES=73<0A>"
2493*Copies 74/74: "@PJL SET COPIES=74<0A>"
2494*Copies 75/75: "@PJL SET COPIES=75<0A>"
2495*Copies 76/76: "@PJL SET COPIES=76<0A>"
2496*Copies 77/77: "@PJL SET COPIES=77<0A>"
2497*Copies 78/78: "@PJL SET COPIES=78<0A>"
2498*Copies 79/79: "@PJL SET COPIES=79<0A>"
2499*Copies 80/80: "@PJL SET COPIES=80<0A>"
2500*Copies 81/81: "@PJL SET COPIES=81<0A>"
2501*Copies 82/82: "@PJL SET COPIES=82<0A>"
2502*Copies 83/83: "@PJL SET COPIES=83<0A>"
2503*Copies 84/84: "@PJL SET COPIES=84<0A>"
2504*Copies 85/85: "@PJL SET COPIES=85<0A>"
2505*Copies 86/86: "@PJL SET COPIES=86<0A>"
2506*Copies 87/87: "@PJL SET COPIES=87<0A>"
2507*Copies 88/88: "@PJL SET COPIES=88<0A>"
2508*Copies 89/89: "@PJL SET COPIES=89<0A>"
2509*Copies 90/90: "@PJL SET COPIES=90<0A>"
2510*Copies 91/91: "@PJL SET COPIES=91<0A>"
2511*Copies 92/92: "@PJL SET COPIES=92<0A>"
2512*Copies 93/93: "@PJL SET COPIES=93<0A>"
2513*Copies 94/94: "@PJL SET COPIES=94<0A>"
2514*Copies 95/95: "@PJL SET COPIES=95<0A>"
2515*Copies 96/96: "@PJL SET COPIES=96<0A>"
2516*Copies 97/97: "@PJL SET COPIES=97<0A>"
2517*Copies 98/98: "@PJL SET COPIES=98<0A>"
2518*Copies 99/99: "@PJL SET COPIES=99<0A>"
2519*Copies 100/100: "@PJL SET COPIES=100<0A>"
2520*JCLCloseUI: *Copies
2521
2522*CustomJCLCopies True: "@PJL SET COPIES=\1<0A>"
2523*ParamCustomJCLCopies Copies/Number of Copies: 1 int 1 100
2524
2525
2526*CloseGroup: General
2527
2528*OpenGroup: Adjustment/Adjustment
2529
2530*JCLOpenUI *REt/REt Setting: PickOne
2531*OrderDependency: 100 JCLSetup *REt
2532*DefaultREt: Medium
2533*REt Dark/Dark: "@PJL SET RET=DARK<0A>"
2534*REt Light/Light: "@PJL SET RET=LIGHT<0A>"
2535*REt Medium/Medium: "@PJL SET RET=MEDIUM<0A>"
2536*REt Off/Off: "@PJL SET RET=OFF<0A>"
2537*JCLCloseUI: *REt
2538
2539*JCLOpenUI *TonerDensity/Toner Density: PickOne
2540*OrderDependency: 100 JCLSetup *TonerDensity
2541*DefaultTonerDensity: 3
2542*TonerDensity 1/1: "@PJL SET DENSITY=1<0A>"
2543*TonerDensity 2/2: "@PJL SET DENSITY=2<0A>"
2544*TonerDensity 3/3: "@PJL SET DENSITY=3<0A>"
2545*TonerDensity 4/4: "@PJL SET DENSITY=4<0A>"
2546*TonerDensity 5/5: "@PJL SET DENSITY=5<0A>"
2547*JCLCloseUI: *TonerDensity
2548
2549*FoomaticRIPOption GSResolution: enum CmdLine A 100
2550*FoomaticRIPOptionSetting GSResolution=FromPrinterResolution: ""
2551*FoomaticRIPOptionSetting GSResolution=300x300dpi: " -r300x300"
2552*FoomaticRIPOptionSetting GSResolution=600x600dpi: " -r600x600"
2553*FoomaticRIPOptionSetting GSResolution=1200x600dpi: " -r1200x600"
2554*FoomaticRIPOptionSetting GSResolution=1200x1200dpi: " -r1200x1200"
2555
2556*FoomaticRIPOption JCLResolution: enum JCL A 100
2557*FoomaticRIPOptionSetting JCLResolution=FromPrinterResolution: ""
2558*FoomaticRIPOptionSetting JCLResolution=300x300dpi: "SET RESOLUTION=30&&
25590"
2560*End
2561*FoomaticRIPOptionSetting JCLResolution=600x600dpi: "SET RESOLUTION=60&&
25620"
2563*End
2564*FoomaticRIPOptionSetting JCLResolution=1200x600dpi: "SET RESOLUTION=1&&
2565200x600"
2566*End
2567*FoomaticRIPOptionSetting JCLResolution=1200x1200dpi: "SET RESOLUTION=&&
25681200"
2569*End
2570
2571*CloseGroup: Adjustment
2572
2573*OpenGroup: PrintoutMode/Printout Mode
2574
2575*OpenUI *FastRes/Fast Res.: PickOne
2576*OrderDependency: 100 AnySetup *FastRes
2577*DefaultFastRes: FromPrintoutMode
2578*FastRes FromPrintoutMode/Controlled by 'Printout Mode': "%% FoomaticRIPOptionSetting: FastRes=@PrintoutMode"
2579*FastRes Off/Off: "@PJL SET BITSPERPIXEL=1<0A>"
2580*FastRes On/On: "@PJL SET BITSPERPIXEL=2<0A>"
2581*CloseUI: *FastRes
2582
2583*OpenUI *Economode/Toner Saving: PickOne
2584*OrderDependency: 100 AnySetup *Economode
2585*DefaultEconomode: FromPrintoutMode
2586*Economode FromPrintoutMode/Controlled by 'Printout Mode': "%% FoomaticRIPOptionSetting: Economode=@PrintoutMode"
2587*Economode Off/Off: "@PJL SET ECONOMODE=OFF<0A>"
2588*Economode On/On: "@PJL SET ECONOMODE=ON<0A>"
2589*CloseUI: *Economode
2590
2591*OpenUI *ColorModel/Color Mode: PickOne
2592*FoomaticRIPOption ColorModel: enum CmdLine B
2593*OrderDependency: 100 AnySetup *ColorModel
2594*DefaultColorModel: FromPrintoutMode
2595*ColorModel FromPrintoutMode/Controlled by 'Printout Mode': "%% FoomaticRIPOptionSetting: ColorModel=@PrintoutMode"
2596*ColorModel Color/Color: "%% FoomaticRIPOptionSetting: ColorModel=Color"
2597*FoomaticRIPOptionSetting ColorModel=Color: " -sDEVICE=pxlcolor"
2598*ColorModel Grayscale/Grayscale: "%% FoomaticRIPOptionSetting: ColorModel=Grayscale"
2599*FoomaticRIPOptionSetting ColorModel=Grayscale: " -sDEVICE=pxlmono"
2600*CloseUI: *ColorModel
2601
2602*OpenUI *PrinterResolution/Resolution: PickOne
2603*FoomaticRIPOption PrinterResolution: enum Composite A
2604*OrderDependency: 99 AnySetup *PrinterResolution
2605*DefaultPrinterResolution: FromPrintoutMode
2606*PrinterResolution FromPrintoutMode/Controlled by 'Printout Mode': "%% FoomaticRIPOptionSetting: PrinterResolution=FromPrintoutMode"
2607*FoomaticRIPOptionSetting PrinterResolution=FromPrintoutMode: ""
2608*PrinterResolution 300x300dpi/300 DPI: "%% FoomaticRIPOptionSetting: PrinterResolution=300x300dpi"
2609*FoomaticRIPOptionSetting PrinterResolution=300x300dpi: "JCLResolution&&
2610=300x300dpi GSResolution=300x300dpi"
2611*End
2612*PrinterResolution 600x600dpi/600 DPI: "%% FoomaticRIPOptionSetting: PrinterResolution=600x600dpi"
2613*FoomaticRIPOptionSetting PrinterResolution=600x600dpi: "JCLResolution&&
2614=600x600dpi GSResolution=600x600dpi"
2615*End
2616*CloseUI: *PrinterResolution
2617
2618*CloseGroup: PrintoutMode
2619
2620
2621*% Generic boilerplate PPD stuff as standard PostScript fonts and so on
2622
2623*DefaultFont: Courier
2624*Font AvantGarde-Book: Standard "(001.006S)" Standard ROM
2625*Font AvantGarde-BookOblique: Standard "(001.006S)" Standard ROM
2626*Font AvantGarde-Demi: Standard "(001.007S)" Standard ROM
2627*Font AvantGarde-DemiOblique: Standard "(001.007S)" Standard ROM
2628*Font Bookman-Demi: Standard "(001.004S)" Standard ROM
2629*Font Bookman-DemiItalic: Standard "(001.004S)" Standard ROM
2630*Font Bookman-Light: Standard "(001.004S)" Standard ROM
2631*Font Bookman-LightItalic: Standard "(001.004S)" Standard ROM
2632*Font Courier: Standard "(002.004S)" Standard ROM
2633*Font Courier-Bold: Standard "(002.004S)" Standard ROM
2634*Font Courier-BoldOblique: Standard "(002.004S)" Standard ROM
2635*Font Courier-Oblique: Standard "(002.004S)" Standard ROM
2636*Font Helvetica: Standard "(001.006S)" Standard ROM
2637*Font Helvetica-Bold: Standard "(001.007S)" Standard ROM
2638*Font Helvetica-BoldOblique: Standard "(001.007S)" Standard ROM
2639*Font Helvetica-Narrow: Standard "(001.006S)" Standard ROM
2640*Font Helvetica-Narrow-Bold: Standard "(001.007S)" Standard ROM
2641*Font Helvetica-Narrow-BoldOblique: Standard "(001.007S)" Standard ROM
2642*Font Helvetica-Narrow-Oblique: Standard "(001.006S)" Standard ROM
2643*Font Helvetica-Oblique: Standard "(001.006S)" Standard ROM
2644*Font NewCenturySchlbk-Bold: Standard "(001.009S)" Standard ROM
2645*Font NewCenturySchlbk-BoldItalic: Standard "(001.007S)" Standard ROM
2646*Font NewCenturySchlbk-Italic: Standard "(001.006S)" Standard ROM
2647*Font NewCenturySchlbk-Roman: Standard "(001.007S)" Standard ROM
2648*Font Palatino-Bold: Standard "(001.005S)" Standard ROM
2649*Font Palatino-BoldItalic: Standard "(001.005S)" Standard ROM
2650*Font Palatino-Italic: Standard "(001.005S)" Standard ROM
2651*Font Palatino-Roman: Standard "(001.005S)" Standard ROM
2652*Font Symbol: Special "(001.007S)" Special ROM
2653*Font Times-Bold: Standard "(001.007S)" Standard ROM
2654*Font Times-BoldItalic: Standard "(001.009S)" Standard ROM
2655*Font Times-Italic: Standard "(001.007S)" Standard ROM
2656*Font Times-Roman: Standard "(001.007S)" Standard ROM
2657*Font ZapfChancery-MediumItalic: Standard "(001.007S)" Standard ROM
2658*Font ZapfDingbats: Special "(001.004S)" Standard ROM
2659----------------------------------------------------------------------------
2660
2661Foomatic keywords
2662-----------------
2663
2664*FoomaticIDs: <printer> <driver>
2665 <printer>: The printer ID in the Foomatic database
2666 <driver>: The driver name/ID in the Foomatic database
2667
2668*FoomaticRIPPostPipe: "<code>"
2669 <code>: A shell command line into which the output of foomatic-rip
2670 is piped. Only used with LPRng, LPD, GNUlpr, spooler-less
2671
2672*FoomaticRIPCammandLine: "<code>"
2673 <code>: The general command line prototype, with spots to insert option
2674 settings ("%A", "%B", ...).
2675
2676*FoomaticRIPCammandLinePDF: "<code>"
2677 <code>: The command line prototype for PDF input if it is different to
2678 the one for PostScript input, with spots to insert option
2679 settings ("%A", "%B", ...).
2680
2681*FoomaticRIPNoPageAccounting: <boolean value>
2682 <value>: If True, no accounting code will be inserted into the
2683 PostScript data stream.
2684
2685*FoomaticRIPOption <name>: <type> <style> <spot> [<order>]
2686 <name>: Option name; <type>: enum, bool, int, float;
2687 <style>: CmdLine, JCL, PS, Composite;
2688 <spot>: Insert this at "%<spot>" in the "*FoomaticRIPCammandLine";
2689 <order>: order number (1-choice options only)
2690
2691*FoomaticRIPOptionSetting <name>=<choice>: "<code>"
2692 <name>: Option name; <choice>: choice name;
2693 <code>: Code to insert for Cmdline and JCL options,
2694 Settings of member options for Composite
2695 options (see below)
2696
2697*FoomaticRIPOptionPrototype <name>: "<code>"
2698 (keyword only for numerical and string/password options)
2699 <name>: Option name;
2700 <code>: Code to insert for Cmdline, JCL, and
2701 PS options. With "%s" for the number/string
2702 set by the user.
2703
2704*FoomaticRIPOptionRange <name>: <min> <max>
2705 (keyword only for numerical options)
2706 <name>: Option name;
2707 <min>, <max>: allowed range for the number.
2708
2709*FoomaticRIPOptionMaxLength <name>: <length>
2710 (keyword only for string/password options)
2711 <name>: Option name;
2712 <length>: maximum allowed length for the string.
2713
2714*FoomaticRIPOptionAllowedChars <name>: "<code>"
2715 (keyword only for string options)
2716 <name>: Option name;
2717 <code>: List of allowed characters in the string
2718 (checked by a '/^[...]*$/', see above).
2719
2720*FoomaticRIPOptionAllowedRegExp <name>: "<code>"
2721 (keyword only for string options)
2722 <name>: Option name;
2723 <code>: Perl regular expression which the string must fulfill
2724 (checked by a '/.../', see above).
2725
2726*FoomaticRIPDefault<name>: <value>
2727 (keyword only for numerical options)
2728 <name>: Option name;
2729 <value>: default value, only needs to be in
2730 the allowed range, does not need to be
2731 one of the enumerated choices.
2732
2733*FoomaticRIPJobEntityMaxLength: <integer value>
2734*FoomaticRIPUserEntityMaxLength: <integer value>
2735*FoomaticRIPHostEntityMaxLength: <integer value>
2736*FoomaticRIPTitleEntityMaxLength: <integer value>
2737*FoomaticRIPOptionsEntityMaxLength: <integer value>
2738 <integer value>: Maximum length for the substitution strings for
2739 the special entities "&job;", "&user;", "&host;", "&title;", and
2740 "&options;" which can be used in the quoted strings of all "*Foomatic..."
2741 keywords (foomatic-filters 4.0.6 or newer needed).
2742
2743All strings in quotes (Foomatic command line, snippets to insert in
2744command line, "<code>" in the keyword descriptions above) are encoded
2745with the "htmlify()" function of DB.pm, so they contain no forbidden
2746characters ("<", ">", "\"") any more. In addition they are broken up
2747into short lines. The filter (foomatic-rip) will put them together
2748at first and then replace the HTML/XML entities by the original
2749characters. If a string is split up, an "*End" line follows, as
2750required by the Adobe specification. In the quoted strings also the
2751following special entities can be used to insert job parameters:
2752
2753 Entity Gets replaced by
2754 ---------------------------------------------------------
2755 &job; Job ID
2756 &user; User name (who sent the job)
2757 &host; Job host name
2758 &title; Job title
2759 &options; Job options
2760 &copies; Number of copies
2761 &rbinumcopies; "%RBINumCopies:" of PostScript input
2762 &year; Job rendering date: 4-digit year
2763 &month; Job rendering date: 2-digit month
2764 &date; Job rendering date: 2-digit day of month
2765 &hour; Job rendering date: 2-digit hours (24 hours)
2766 &min; Job rendering date: 2-digit minutes
2767 &sec; Job rendering date: 2-digit seconds
2768
2769foomatic-rip substitutes these entities by the appropriate parameters
2770before starting the rendering process. This way job parameters can be
2771sent to the printer. From foomatic-filters 4.0.6 on the length of the
2772inserted strings can be limited, either by the above-mentioned
2773"*FoomaticRIP...EntityMaxLength:" keywords in the PPD or by adding the
2774length to the entities (ex: "&user8;", "&title16;", ...). If the
2775string to insert for the entity is longer than the limit, it gets cut
2776off to the limit. Note that adding numbers to the entities makes the
2777PPD incompatible with older versions of foomatic-rip. PPDs with the
2778above-mentioned new keywords work with older versions of foomatic-rip,
2779but limits do not get applied. Therefore I generally recommend using
2780the PPD keywords for PPDs to make them publically available.
2781
2782All Foomatic-relevant info is stored with keywords beginning with
2783"*Foomatic...", not in comment lines. So if some program strips the
2784comments off the PPD file, the file still works. The data is stored
2785in a way compliant to the Adobe specification.
2786
2787The "*Foomatic..." lines are located in the option entries, so that all
2788info which is related is located close to each other. This makes the
2789file more easily readable. The lines also contain only the information
2790which is not provided by the standard PPD lines. So redundancy is low
2791and the PPD can more easily be edited and customized.
2792
2793"*Foomatic..." lines are given to all non-PostScript options and to
2794numerical or string/password PostScript options. Usual "Boolean" and
2795"PickOne" PostScript options do not need them. Numerical and
2796string/password options are "PickOne" for most frontends, but with the
2797"*Foomatic..." lines the server (the foomatic-rip filter script)
2798identifies them as numerical or string/password options (and so
2799accepts values which are not listed) and, second, frontends could also
2800read the "*Foomatic..." lines and so show the options as numerical or
2801string (with input field, slider, combo box) or even as password
2802(input field which shows asterisks instead of the actually typed
2803characters), as KDE Print and XPP now do by reading the Perl
2804structure.
2805
2806Non-PostScript options with only one choice consist only of
2807"*Foomatic..." lines. So the one choice is stored in the PPD file but
2808frontends will not show a widget for these options.
2809
2810Also composite options can be described more easily:
2811
2812----------------------------------------------------------------------------
2813
2814*OpenUI *PrintoutMode/Printout Mode: PickOne
2815*FoomaticRIPOption PrintoutMode: enum Composite C
2816*OrderDependency: 20 AnySetup *PrintoutMode
2817*DefaultPrintoutMode: Normal
2818*PrintoutMode Draft/Draft (Economy): "%% FoomaticRIPOptionSetting:
2819PrintoutMode=Draft"
2820*FoomaticRIPOptionSetting PrintoutMode=Draft: "Resolution=300 &&
2821MediaType=Normal Dither=VeryFast"
2822*End
2823*PrintoutMode Normal/Normal: "%% FoomaticRIPOptionSetting:
2824PrintoutMode=Normal"
2825*FoomaticRIPOptionSetting PrintoutMode=Normal: "Resolution=600 &&
2826MediaType=Normal Dither=AdaptiveHybrid"
2827*End
2828*PrintoutMode High/High Quality: "%%
2829FoomaticRIPOptionSetting: PrintoutMode=High"
2830*FoomaticRIPOptionSetting PrintoutMode=High: "Resolution=1200 &&
2831MediaType=Inkjet Dither=AdaptiveHybrid"
2832*End
2833*PrintoutMode Photo/Photo: "%% FoomaticRIPOptionSetting: PrintoutMode=Photo"
2834*FoomaticRIPOptionSetting PrintoutMode=Photo: "Resolution=1200 &&
2835MediaType=GlossyPhoto Dither=EvenTone"
2836*End
2837*CloseUI: *PrintoutMode
2838
2839----------------------------------------------------------------------------
2840
2841Remark to the "*FoomaticRIPDefault<name>: <value>" entries for
2842numerical options:
2843
2844Adobe's PPD specs do not support numerical options. Therefore the
2845numerical options are mapped to enumerated options in the PPD file and
2846their characteristics as a numerical option are stored in
2847"*Foomatic..." keywords. Especially a value between the enumerated
2848fixed values can be used as the default value. Then this value must be
2849given by a "*FoomaticRIPDefault<option>: <value>" line in the PPD
2850file. But this value is only valid, if the "official" default given by
2851a "*Default<option>: <value>" line (it must be one of the enumerated
2852values) points to the enumerated value which is closest to this
2853value. This way a user can select a default value with a tool only
2854supporting PPD files but not Foomatic extensions. This tool only
2855modifies the "*Default<option>: <value>" line and if the
2856"*FoomaticRIPDefault<option>: <value>" had always priority, the user's
2857change in "*Default<option>: <value>" had no effect.
2858
2859For numerical, string, and password options there are also the CUPS
2860PPD extensions for custom options used. This allows GUIs which use
2861CUPS' PPD extensions give full access to these options to the
2862user. See above.
2863