Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > 5d16638603508045ec50428dac189566 > files > 33

foomatic-db-engine-3.0.2-1.20071218.2mdv2008.1.x86_64.rpm


Foomatic 3.0.2
==============

foomatic-db-engine
------------------

Foomatic's database engine generates PPD files from the data in
Foomatic's XML database. It also contains scripts to directly generate
print queues and handle jobs.


Till Kamppeter <till.kamppeter@gmail.com>

http://www.openprinting.org/

This README contains mainly info for developers. See the file USAGE if
you want to know how to use Foomatic.


Copying
-------

This package and also the other Foomatic packages needed to run this
are under the GPL. See http://www.gnu.org/.


Bugs
----

If you spot a data error or any other bug, either post on the Foomatic
developer mailing list

http://lists.freestandards.org/mailman/listinfo/printing-foomatic

or post on the OpenPrinting site support forum

http://forums.openprinting.org/list.php?34


Intro
-----

This is the stable version of Foomatic. See

http://www.freestandards.org/en/OpenPrinting/Database/HowToContribute#programming

to know more about its development.

Your suggestions, bug reports, patches, ... are welcome on

http://forums.openprinting.org/list.php?34

This version is also the base of our database web interface on

http://www.openprinting.org/


New features for Foomatic 3.0.x
-------------------------------

Implemented in 3.0.0:

 - For all supported spoolers (CUPS, LPRng, LPD, GNUlpr, PPR, PDQ, CPS,
   no spooler) the same PostScript-to-printer's-native-language filter
   (RIP, Raster Image Processor), foomatic-rip is used. foomatic-rip
   detects automatically from which spooler it is called.

 - foomatic-rip gets the info about the printer's capabilities and the
   driver options and default settings always from PPD files, independent
   which spooler is used. It is possible to use Foomatic-generated
   PPD files (usually for non-PostScript printers) or manufacturer-
   supplied PPD files of PostScript printers. So

    o PPD files of PostScript printers can be used with every spooler,
      not only with CUPS and PPR and on all spoolers all options will be
      available. So PostScript printers work always "Perfectly".

    o With the PPD file one has one configuration file for every place
      where information about the printer and its options is needed:
      The print queue itself, PPD-aware applications (as Star Office,
      OpenOffice.org, GIMP, ...), and clients (Windows, Mac, Unix with
      arbitrary spooler). The PPD format is a standard format used by
      every modern operating system.

 - PPD building and PostScript processing is done according to the
   Adobe specifications DSC (Document Structuring Conventions) and
   PPD (PostScript Printer Description) as published on

   http://partners.adobe.com/public/developer/ps/index_specs.html

 - foomatic-rip inserts all default settings from the PPD file (so you
   can edit the "*Default..." lines in the PPD files to set the defaults),
   reads option settings from the user's command line, and from the
   PostScript data stream. Settings in the PostScript data stream have
   the highest priority to assure that what one sets in an application
   is used. Depending on the option type the settings are applied to
   the renderer's (usually GhostScript's) command line, to the JCL
   header, or stuffed in at the right place of the PostScript data
   stream.

 - Support for option settings only acting on a certain page selection
   (example: First page on letterhead paper from tray 1, rest on plain
   paper from tray 2). Settings must be put into the
   "%%BeginPageSetup"/ "%%EndPageSetup" sections (or at least right
   after the "%%Page:" comments) of the appropriate pages in the
   PostScript input file. They can also be specified on the command
   line by specifying a page range before the option name (ex: "lpr -o
   1,5-8:ColorMode=CMYK file.ps"). If necessary, the renderer (usually
   GhostScript) is stopped and restarted in the middle of the job,
   when certain pages need a different command line for the
   renderer. The bug of Star Office/OpenOffice.org inserting the
   "%%BeginSetup...%%EndSetup" section after the first "%%Page:"
   comment is taken care of.

 - foomatic-rip does neither use temporary files on the disk, nor does it
   need to load huge documents completely into memory. All is done in data
   streams where not more data than necessary is buffered. To make this
   possible foomatic-rip forks into up to six sub-processes.

 - The installation is very easy, one needs only foomatic-rip
   (absolutely monolithic, no Perl modules needed), a PPD file, and
   optionally foomatic-gswrapper. No different files for different
   spoolers.

 - Custom page size support with all spoolers when the PPD file has
   Adobe-compliant definitions for usage of custom page sizes.

 - The spooler-less printing mode of foomatic-rip can be used for testing 
   and debugging PPD files in arbitrary directories, one simply specifies
   them with the new "--ppd" option.

 - With PDQ one can print arbitrary file types now, and even set up raw
   printers. The PDQ driver files are generated by foomatic-rip, so
   the user does not need to download more files than with other
   spoolers.

 - Under PPR 1.50 and newer foomatic-rip runs as a PPR RIP, under older
   versions, as before, as a PPR interface.

 - foomatic-configure sets up printer queues based on Foomatic database
   entries, arbitrary third-party PPDs (as shipped with PostScript
   printers), or raw queues.

 - foomatic-configure is much faster when copying or modifying print
   queues now, as it does not rebuild the PPD from the Foomatic database
   all the time (as long as one does not force a rebuild with "-f").

 - foomatic-addpjloptions works also in regular installations now, not
   only in "inplace" installations.

 - foomatic-compiledb generates only PPD and XML files now.

 - foomatic-datafile is renamed to foomatic-ppdfile, a compatibility
   link named foomatic-datafile is set. foomatic-ppdfile generates
   only PPDs, the options "-t" and "-f" are ignored.

 - foomatic-configure, foomatic-printjob, and all the other scripts
   have the same command lines as in Foomatic 2.0. Exceptions: In
   foomatic-configure "--oldppd" was dropped, "--ppd" (for setting up a
   queue with a third-party PPD file) added, and the meaning of "-f"
   (force rebuild of PPD) changed.

 - Option groups: Options can be put into groups and subgroups in the
   PPD files, so that GUIs can present them in a structured way (in
   tabs or in a tree structure). It is nearly completely functional,
   the only thing missing is translation support ("long names" for the
   groups, as "Adjustments and Corrections" for "Adjustment", or
   translations to other languages). Now the PPD generator makes
   trivial translations ("ThisIsAGroup" -> "This Is A Group")
   automatically.

 - Composite options: This is a new option type to make it easier for
   users to choose the best settings for a certain printing task,
   especially if the driver has very many options. The idea is to have
   an enumerated choice option which does not directly modify
   something in the driver's command line but sets several of the
   other options.

   We will have a "Printout Mode" option for all printers with the 
   following choices:

      Draft
      Normal
      High Quality
      Very High Quality
      Photo

   For an Epson Stylus Color 680 with Gutenprint it sets the options
   resolution, dithering, and image type as follows:

      Choice           Resolution     Dither            ImageType
      ------------------------------------------------------------------
      Draft            180x180 dpi    Very Fast         LineArt
      Normal           360x360 dpi    Adaptive Hybrid   Photographs
      High Quality     720x720 dpi    Adaptive Hybrid   Photographs
      Very High Qual.  1440x720 dpi   Adaptive Hybrid   Photographs
      Photo            2880x720 dpi   Even Tone         Photographs

   The mentioned settings set all the color mode to "Color", there
   are also choices with a ".Gray" modifier (ex: "Normal.Gray" which
   set the color mode to "Grayscale", but the other mentioned options
   as the standard variants ("Normal").

   The member options of the composite option all get one choice
   called "FromPrintoutMode"/"Controlled by 'Printout Mode'" added,
   which gets their default setting. If this choice is selected, the
   option is set by the composite option according to the table. If
   the user wants to modify one of the individual member options, he
   simply chooses a value other than "FromPrintoutMode" for this
   particular option. In addition the member options will be put into
   a group (named "Printout Mode"). and the composite option goes into
   the same group as "PageSize", "InputSlot", ... So the user sees the
   composite option on the "Front page" of the GUI and can quickly set
   up print jobs without getting confused. The user with more special
   demands goes to the tab with the member options and makes detailed
   choices.

 - Forced composite options: These are special composite options where
   the user cannot set the individual member options, but only the
   composite option (the user is forced to use the composite
   option). This allows options acting at two or more places, for
   example a "PageSize" option for a driver which is a filter
   translating GhostScript bitmap output to the printer's
   language. One lets one member option be an option inserting
   PostScript code for the page size into the PostScript input data
   stream for GhostScript, and another member option insert the
   correct bitmap size into the filter's command line. The user sees
   only the composite option and sets the paper size with it as usual.

 - String and password options: These options allow the user to supply
   nearly arbitrary strings (a length limit and restrictions be a list
   of allowed characters or a Perl regular expression can be set) to
   the printer driver, for example names of color calibration files,
   fax numbers, passwords for confidential jobs, ... Frequently needed
   strings can be added as enumerated choices, so a frontend can show
   the option as a combo-box. The enumerated choices are also used for
   frontends which only support options as defined by the PPD spec.

 - New handling of numerical options in the PPD files:
   "*Default<option>: ..." now always contains one of the enumerated
   choices to be Adobe-compliant, the exact default value for
   Foomatic-aware applications is stored with the new
   "*FoomaticRIPDefault<option>: ..." keywords now.

 - URIs (Unified Resource Identifiers, the descriptions for the
   printer connection type used with the "-c" option of
   foomatic-configure) are exactly the same as under CUPS now. The
   only difference was that before for local printers always URIs
   beginning with "file:" were used, now "parallel:", "usb:", or
   "serial:" is used. The old form with "file:" is still accepted
   for compatibility.

 - For USB printers CUPS 1.1.17 and newer supports URIs which refer to
   manufacturer, model, and serial number and not to the device file
   (/dev/usb/lp*) any more. This way the queues still work when the
   printers are plugged in or turned on in another order in a later
   session (the printers can get different device files
   then). Foomatic now automatically converts the conventional USB
   URIs to the new ones when an appropriate versions of CUPS is used.
   When copying a queue to another spooler the URI is converted back
   in the copied queue.

 - Support for the MTink daemon from the MTink package
   (http://xwtools.automatix.de/). MTink allows monitoring the ink
   levels of Epson inkjets also while printing.

 - Non-printable margins: Both printer and driver XML database entries
   should get a new section for unprintable margins, so that the
   "*ImageableArea" entries in the PPD files can be correctly set.
   Entries should be possible for printers (printer XML file), for
   drivers (main part of driver XML file), for printer/driver combos 
   (in printer list of driver XML file), and they can contain general
   margins (valid for all paper sizes) and paper-size-specific margins.
   If for one "*ImageableArea" entry in a PPD file more than one of the
   above mentioned possible margin entries applies, the "worst case"
   (individually determined for each page border) is inserted. If the
   unprintable margins of a printer depend on options settings, the
   "worst case" is chosen, too.

 - Facility to make a package consisting of all possible Foomatic PPD
   files, foomatic-rip, and foomatic-configure, see
   README.build-foomatic-filters-ppds for how to proceed.

 - Support for inserting arbitrary constant entries (as a default
   resolution if there is no "Resolution" option) into the PPD
   file. The entries can be printer-specific, driver-specific, or
   printer/driver-combo-specific.

 - Extended structure for auto-detection info in printer XML files:
   General section for entries valid for both USB and parallel port
   connection, possibility to insert the constant part of the original
   IEEE-1284 ID string. The ID string will also be inserted into the
   PPD file.

 - Added a facility to chnage all the cryptic numerical printer IDs
   from the old PostGreSQL time to clear-text printer IDs. With a
   translation function it is assured that one can still use the old
   IDs, for example to not break links to the old linuxprinting.org
   web site.

 - The Foomatic database uses clear-text printer IDs for all printers
   now.

Implemented in 3.0.1:

 - CUPS raster drivers can now be used with any spooler. This makes a
   lot of newer commercial or manufacturer-supplied printer drivers
   available for non-CUPS environments. To use a CUPS raster driver
   with a spooler other than CUPS, you need to install GhostScript
   (preferrably ESP GhostScript) with CUPS raster support, the
   appropriate CUPS raster driver. You do not need to install the
   complete CUPS package, the CUPS libraries are enough (libcups and
   libcupsimage, usually in the "libcups" package of your
   distribution) and to compile CUPS raster drivers you need also the
   header files of the CUPS library (libcups-devel, cupsys-dev, or
   similar package of your distro). Then you can set up a print queue
   with the PPD file of the CUPS driver the same way as if you had a
   native PostScript printer.

 - If a printer/driver combo has Foomatic-defined JCL options and the
   driver already generates a JCL header, the JCL options are merged
   into the header produced by the driver.

 - Workaround for newly introduced PostScript generation bug of
   OpenOffice.org 1.1.0 (OOo puts settings for whole document into
   "%%PageSetup" section of first page).

 - Added "use strict;" to the most important Perl scripts, clean-up of
   the scripts (Thanks to Patrick Powell from LPRng)

 - Improved LPRng support (Thanks to Patrick Powell from LPRng)

 - Printer listing options and auto-selection of recommended driver
   for the PPD generator foomatic-ppdfile (Thanks to Patrick Powell
   from LPRng).

 - Support for string options and additional operation modes for
   foomatic-addpjloptions (Thanks to Patrick Powell from LPRng).

 - Additional checks in the configure scripts (Thanks to Patrick
   Powell from LPRng).

 - Composite options can be nested now (normal and forced composite
   options can be mixed).

 - Several modifications to make the PPD files compatible with the
   PostScript drivers for Windows: 100 instead of 999 choices for the
   "Copies" options, no "," and "+" in the "*NickName" and
   "*ShortNickName" entries, optional cutting of the long names of the
   options and choices (translation strings in the PPDs) to 39
   characters for compatibility with the Microsoft PostScript driver
   and the original PostScript driver for Windows of CUPS. All this is
   not required by the Adobe specification for PPD files.

 - Compatibility fixes for IRIX and the *BSD operating systems.

 - Script to update the "gutenprint" driver entry in the database
   using the src/foomatic/foomatic-printermap file of the source
   tarball of Gutenprint 5.0.x.

 - perltoxml() Perl function in DB.pm to generate XML database entries
   from PPD files (thanks to Tim Waugh from Red Hat).

 - Let foomatic-ppdfile (which can be also called under the name
   "foomatic-datafile", for compatibility with frontends) accept
   and ignore the "-t" option for backwards compatibility. Now
   the KDE Printing Manager works correctly again.

 - Fixed PPD file generation so that the files pass the "cupstestppd"
   of CUPS 1.1.20.

Implemented in 3.0.2:

 - Some fixes to make foomatic-rip more robust against weird input via
   the command line or environment variables are done. This solves the
   problem of an attacker being able to run arbitrary commands as "lp"
   (or however the spooler's special user is named) on the print
   server (Security Advisory CAN-2004-0801).

 - Workaround for PostScript generation bug in all OpenOffice.org
   1.1.x versions.

 - Let the PPD generator use the manufacturer as defined in the
   Foomatic database and not the one from the IEEE-1284 auto-detection
   ID string for the "*Manufacturer: ..." tag of the PPD files, as in
   the IDs the manufacturer names often do not comply with the Adobe
   specs (as "Hewlett-Packard", "HP" has to be used).

Implemented after 3.0.2:

 - Support for on-the-fly PPD generation by CUPS 1.2. Now all Foomatic PPDs
   appear in the model lists of the CUPS web interface without needing to
   pre-compile the PPDs. The PPDs get actually generated if one selects
   them for the new print queue to be set up.

Planned/Roadmap for future releases:

 - Option conflicts: PPDs allow to define conflicts between option settings,
   so that one cannot set up things which the printer cannot do or
   which dont make sense (Duplex on transparencies, printing from tray 4
   when only 2 trays are installed, ...).

 - Printer and driver classes: The class XML files should look like printer
   or driver entries, with the same fields and with an additional member
   list. If one marks an option or an option choice as being valid for a 
   class, it is valid for all member printers and classes, If a printer
   or driver is a member of a class, all fields which are left blank in this
   entry, are filled in with the value defined in the appropriate field
   of the class. If the class contains a comment text, it is shown in
   addition to the printer's or driver's own text. This saves from a lot
   of duplicate entering of data when adding printers, drivers, options,
   choice, option groups, or option conflicts to the database.


General features
----------------

 - The XML database is fully internationalized, with complete support
   for...  well, English.  The backends only accept English, because
   it's nonobvious how to find out the user's locale. We think it's
   best to have the user tools accept locale-specific options but
   actually submit them in <en>.

 - There is code to manipulate the XML files of the database. You can 
   load them and get Perl data structures out of them. You can generate
   a printer overview list which shows all printers and for each printer
   which drivers make this model work and you can also generate an XML file
   with all information needed to use a certain printer with certain driver,
   which is the basis for the PPD files which are used to configure printer
   queues under a spooler. These XML files can also be transformed into a 
   Perl data structure.

 - All XML handling is done by two C programs, one makes use of libxml
   to do a DOM parsing of all types of XML files appearing in the Foomatic
   system to get Perl data structures out of them, because Foomatic does all
   printer configuration, job manipulation, printing, and filtering with
   Perl scripts. The other one does XML-to-XML operations: the generation
   of the printer overview list, and the generation of the printer/driver
   combo files. These operations involve reading hundreds of files, cutting
   them apart and assembling them together in another way. To make this as
   fast as possible and also less memory-consuming, we do not use 
   libxml, but did the parsing "manually" to keep data moving operations
   low.

 - All configuration work, especially the generation of the PPD files
   is done by Perl code, because it is much easier to implemnent text 
   manipulation operations in Perl. Also the universal, spooler-independent
   print filter foomatic-rip (in the foomatic-filters package) is written 
   completely in Perl. foomatic-rip does not use any non-standard Perl
   libraries.

 - A program foomatic-configure is provided which implements complete
   printer configuration for the common spoolers. It is designed to
   support CUPS, PPR, PDQ, LPRng, LPD, GNUlpr, and direct spooler-less
   printing and it is designed to make it easy to write GUI or automagic
   printer configuration tools. It also transfers queues between different
   spoolers and generates Perl data structures or XML files so that
   frontends can build menues.

 - Printing and managing print jobs is done by foomatic-printjob,
   you supply exactly the same command line options for doing the same
   tasks on every supported spooler.

 - PJL (Printing Job Language) options can be read from the printer and
   added into the local Foomatic database. This allows access to many
   functions of the printer which are not supported by the driver, as
   paper tray selection, toner saving, toner density, ... This is done
   with foomatic-getpjloptions and foomatic-addpjloptions. Usually,
   PJL is only supported by PCL or PostScript laser printers.

 - Getting a list of all registered printers and with which drivers they
   work (overview XML file) and setting up the datafile for a given 
   printer/driver combo (combo XML file) works in a reasonable time and
   with a reasonable amount of memory. So computing of data can be done
   when the data is needed. Shipping big pre-built data collections or
   having an on-disk cache is not necessary.

 - The PPD files serve also for PPD-aware applications as Star Office,
   Open Office, the GIMP (for printers not supported by Gutenprint), GPR,
   Windows/Mac clients using their PostScript driver (and the Linux/Unix
   server using the Linux driver for the printer). They give access to
   all the driver's options in the printing dialogs of said
   applications. This works for all spoolers.


The upshot of all this is that you can now make changes easily and run
the scripts to calculate out whatever your printer/spooler needs directly.


Programs and important files from this package
----------------------------------------------

Note: The scripts appear as ".in" files in the source tree and CVS, because
the path for the Perl interpreter/the bourne shell is inserted by the
"configure" script.

configure.in

  The source from which GNU autoconf generates the "configure" script

acinclude.m4

  Additional macros for the "configure" script

make_configure

  Calls aclocal and autoconf to generate "configure" from "configure.ac" 
  and "acinclude.m4"

Makefile.in

  The template from which "configure" generates the Makefile

install-sh

  Helper script for "configure"

foomatic-ppdfile

  This program will compute the spooler-independent Foomatic PPD file
  for any valid printer/driver combo available in the Foomatic database,
  both for printing with foomatic-rip and for applications/clients being
  able to access the printer's options.

foomatic-configure

  See USAGE for more info.

  This is the great-grandady of printer configuration programs.

  You can invoke this to configure a printer under any spooler with any
  sort of printer connection.

  The printer can be either one in the Foomatic database, it can be
  one for which you have a PPD file (for example a PostScript printer
  with the PPD from the Windows driver) or a printer which you want to
  use without driver/filter (raw queue).

  It also includes methods to summarize the current configurations, to add
  new queues, reconfigure existing queues, enumerate the printers known to 
  the world, and return xml data objects describing individual printers and 
  drivers.

  It should be very straightforward to write interactive printer
  configuration tools around this script:

  1. foomatic-configure -O prints the XML db overview on stdout
  2. foomatic-configure -Q prints an XML summary of printer queues
  3. foomatic-configure -X prints the XML for a database object
  4. foomatic-configure with various options does the actual setup
  5. foomatic-configure -P prints Perl structures for frontends
  6. foomatic-configure -C copies queues, also to other spoolers
  7. foomatic-configure -D sets a queue as the default queue
  8. foomatic-configure -R removes a queue
	
  foomatic-configure supports CUPS, PPR, PDQ, LPD, LPRng, GNUlpr, and
  direct spooler-less printing nearly completely. The program is 
  structured with a dispatch table; for the cost of a few Perl 
  functions it can support even more spoolers. If not told, it attempts
  to guess which spooler to use, or asks.

  Regarding item (2), the summary of current config.  It shows each
  queue, giving attributes for spooler, and various settings.  Queues
  with the foomatic attribute set to zero are neither queues set up with
  the help of the Foomatic database nor set up with a PPD file (and
  foomatic-rip in case of LPRng, LPD, GNUlpr, PDQ, or no spooler). These
  queues cannot be modified by foomatic-configure. Trying to modify them
  would turn them into raw queues. The summary shows also which is the
  default queue, if a default queue is defined for the current spooler.
  The $PRINTER environment variable is not taken into account here.

  For all spoolers, foomatic-configure fully groks the configuration
  format. It rewrites the whole thing, preserving ordering, comments,
  etc, and regularizing the syntax on each rewrite.  So it can change
  entries that are clearly foomatic-rip/PPD ones, and leave others 
  alone. Also changes of the option default settings done manually (or 
  with KUPS, XPP, XPDQ, KDEPrint, ...) are preserved when modifying
  a queue.

  It is wrong to store configuration in a weird place just because foomatic 
  is used: the user should be able to edit the config by hand the
  old-fashioned way...

  When configuring printers, the PPD file is put into 
  /etc/foomatic/<spooler>/ (and if needed symlinked to from elsewhere).
  The PPD files are Adobe-compliant and can also be symlinked/used by 
  applications or clients. They get a basename taken from the queue name.

  For printer configuration frontends it is necessary to get all info
  about the queue configuration, the options, possible settings, and
  default settings. This info can be retrieved as a Perl data
  structure. The structure produced by

     foomatic-configure -q -P > testfile.pl

  can be read by the following Perl script example.pl

     #!/usr/bin/perl
     my @QUEUES;

     eval (join('',(<STDIN>)));

     my $i;
     my $N = $#QUEUES + 1;
     print "$N Queues\n";
     for ($i = 0;  $i < $N; $i++) {
         my $n = $i + 1;
         print "$n : $QUEUES[$i]->{'queuedata'}{'queue'}\n";
     }

  with

     cat testfile.pl | ./example.pl

  Queue copying especially allows to switch between spoolers overtaking
  ones queues with all settings and adjustments.

foomatic-getpjloptions

  Reads the PJL options from local (parallel, USB. serial, ...) or remote
  (only socket, LPD is not bi-directional) printers to standard output. They
  can be piped into foomatic-addpjloptions to add them to the database. Call
  the program without arguments for help.

foomatic-addpjloptions

  Add the PJL options listed by a printer to the Foomatic database. The
  option list is read from a file or from standard input. The ID of the
  printer for which the options are has to be provided (option -p). You can 
  add all PJL options or only the most important ones (-i). When you are
  adding the options from a file, you are asked whether the printer ID is
  correct, but you can turn this off if you want (-f). Call the program with
  the -h option to get help.

  Note: The program needs the three files foomatic-templates/pjl*.xml

  Example for making available the PJL options of the networked HP LaserJet
  4050 (Foomatic ID: 62304), hostname printer6, port 9100:

  # Remove the "native" PJL options from the database
  rm -f `grep -li "pjl" db/source/opt/*.xml`
  # Remove the options from a former PJL option poll on the same printer
  rm -f foomatic-db/opt/pjl-62304-*
  # Get the PJL options from the printer
  foomatic-getpjloptions printer6 9100 | foomatic-addpjloptions -p 62304
  # Move the XML files into the database
  foomatic-kitload -k foomatic-db/
  # Set up printer queue
  foomatic-configure -n LaserJet4050 -c socket://printer6:9100/ \
     -d lj5gray -p 62304

  Instead of using "foomatic-configure" you can also generate the PPD file: 

  ./foomatic-ppdfile -d lj5gray -p HP-LaserJet_4050 > lj4050.ppd

  And set up the queue manually as described on
  http://www.openprinting.org/

  For CUPS you can for example do:

  lpadmin -p LaserJet4050 -E -v socket://printer6:9100/ -P lj4050.ppd

foomatic-kitload

  This program installs a foomatic data kit into the local data
  library.  It takes a -k <dirname> option, where <dirname> is the
  toplevel directory of a foomatic driver "kit".  A "kit" is a
  selection of XML source files arranged exactly as in the source/
  section of the master database (ie, opt/ driver/ printer/ subdirs).
  The gutenprint's foomatic-generator produces exactly such a kit.

  Foomatic-kitload is moderately paranoid about kits: the kit must
  contain at least one of printer/ driver/ and opt/; the kit must
  contain only files ending in .xml, the kit cannot be the local
  library itself, etc.  But it does not inspect the contents of the
  kit files in any way.

foomatic-printjob

  See USAGE for more info.

  This program implements all the logic for controlling the dynamic 
  elements of queues.  In other words, jobs. It'll submit them, provide
  status on them, cancel them, etc. This provides an easy way for
  application authors to print in a spooler and driver neutral way.

foomatic-ipp

  This program (not yet written) provides basic IPP export for queues
  accessible to foomatic-printjob and foomatic-configure.  Whee!
  (Grant, are you still planning to do that?)

foomatic-compiledb

  This program will run around and generate combo data for all valid
  printer/driver combinations (or for selected drivers). The data is put
  into one directory and it is generated in a format specified by the user
  (PPD files or printer/driver combo XML files).

  compile_db takes a -j# flag: it will run that many compute
  processes in parallel.  You should run compile_db with a -j flag to 
  specify how may processes to run concurrently.  (Gratuitous feature: 
  you can add more processes in the middle without conflict! Just run
  another with -f until they all finish).

  Generally, compile_db should just not be necessary except for people
  who want to distribute sets of configuration files. foomatic-ppdfile and
  especially foomatic-configure will automagically compute just what they 
  need at runtime.

foomatic-combo-xml

  The Foomatic accelaration engine written in C (by Till), it computes
  printer/driver combo XML files or the printer overview XML file in less
  then two seconds (on a crappy 128MB/350MHz machine). foomatic-compiledb
  needs less than three minutes for its job on a two-processor 1GB/1GHz 
  machine. The printer/driver combo XML files are computed around 600 times
  faster than with the pure Perl programs of the beginning of the XML
  Foomatic. In addition, foomatic-combo-xml does not need more than 10 MB
  of memory.

  The program is called by the Foomatic Perl library, but can also be
  called stand-alone, call the program without command line options to
  know how to use it.

  foomatic-combo-xml does not need any XML parsing libraries, to make it
  faster and less memory-consuming, the XML files are somehow "manually"
  parsed.

foomatic-perl-data

  The XML-to-Perl translator, also written in C (by Till). This program
  reads the XML files of the Foomatic database and translates them into Perl
  data structures, so that the Perl scripts can access the data.

  The intention of this program is to get rid of the many Perl XML libraries
  which made the installation of Foomatic very awkward. No only the libxml
  C library is needed, a library which ships with most distributions of
  free operating systems. One can use either libxml 1.x (1.8.17 and newer)
  or 2.x, but 2.x is recommended.

  Without any C helper programs the following problems appeared:

  - The thing was *at least* an order of magnitude slower than life
    under Postgres and Perl was.  It took hours to run compile_db, and
    up to some minutes (at least a few seconds) to compile one combo.
    The first one took more time as the option cache loaded.  (The
    new overview and pcache mechanisms mitigated this a bit, but not
    much for compile_db).

  - Memory: compiledb compute processes peaked at about 150MB RAM.  You
    could turn down the number of computations per process, but it
    never got much below 130MB.

  - Due to the slowness of the Perl XML handling an on-disk cache was used.
    This lead to old files from the cache being used when one changed
    something in the database and forgot to delete the cache.

  - Many Perl libraries were needed which made the installation of Foomatic
    rather difficult. Now only the libxml C library is needed. This library
    ships with every modern distro of GNU/Linux.

foomatic-fix-xml

  Run this program if you have compiled foomatic-perl-data against libxml
  1.x and you have old database entries with a leading blank line. libxml
  1.x chokes on leading blank lines.

foomatic-cleanupdrivers

  Removes all driver entries with empty driver command lines. This way
  frontends do not show printer/driver combos which do not work.

foomatic-preferred-driver

  Sets a recommended driver for every printer which has no recommended
  driver entry or has one pointing to a driver which does not exist in
  the local Foomatic database (for example when you have removed a driver
  entry from the database which belongs to a driver which is not built
  into your GhostScript).

foomatic-nonumericalids

  This script changes all old cryptic numerical printer IDs from the
  old PostGreSQL time to clear-text printer IDs in the installed
  Foomatic database. The current "foomatic-db" has no numerical IDs
  any more (this script has been applied to it), but if you use and
  older Foomatic database (for example to match the of your distro)
  you can change the IDs with this script. With a translation table it
  is assured that one can still use the old IDs.

foomatic-replaceoldprinterids

  Replaces references to old numerical or otherwise obsolete printer
  IDs in arbitrary files. By default it uses the db/oldprinterids file
  of the current Foomatic database as translation table, but you can 
  use arbitrary translation tables. You can also give regular
  expressions (Perl) for the text surrounding the IDs. Do
  "foomatic-replaceoldprinterids -h" to know how to use it.


Filters
-------

To be able to print with the PPD files and queues made with the stuff
in this package, you need the foomatic-rip filter provided by the
"foomatic-filters" package.

foomatic-rip

  See the documentation of the "foomatic-filters" package for more info.

  This is a universal print filter which works with all printer spoolers
  auto-detecting the spooler from which it is called. Its job is to
  translate the incoming data (PostScript in most cases) to the
  printer's native language taking into account all option settings,
  either defaults or job-specific ones. It reads the PPD file assigned
  to the print queue, either a Foomatic-generated one or a 
  manufacturer-supplied PPD file of a PostScript printer, uses the
  information to find the default option settings and to build the
  renderer's (usually GhostScript, "cat" for PostScript printers)
  command line, and applies the user-supplied options. Then it builds
  the renderer's command line and passes the data through it. If the
  data is not PostScript, a pre-filter ("a2ps", "enscript", "mpage",
  ...) is added.

foomatic-gswrapper

  This is not really a backend filter, but it is used by foomatic-rip
  when it is present. This is a wrapper around Ghostscript. It regularizes 
  options if they differ between gs flavors. foomatic-rip auto-detects the
  presence of foomatic-gswrapper.



About the database
------------------

The database is provided by the "foomatic-db" package, additional database
entries are in "foomatic-db-hpijs", other "foomatic-db-..." packages are
supplied with the drivers. "foomatic-db" is required for using the programs
provided by this package.

There is a $libdir, somewhere.  Underneath $libdir there are (Install
"foomatic-db" at first and then this package. Then the $libdir will be
auto-detected):

 db/                             - the database
 db/oldprinterids                - translation table for old numerical
				   printer IDs
 db/kitload.log                  - list of third-party "kit" files
 db/source/                      - "source" data, provided by humans, etc
 db/source/printer/<poid>.xml    - printer-specific data, one per printer id
 db/source/driver/<driver>.xml   - driver-specific data, one per driver name
 db/source/opt/<idx>.xml         - option data, one file per option

You can edit the files whenever you want and regenerate the affected
printer queues with foomatic-configure, there is no on-disk cache (it
is not needed, the database handling is fast enough), the data is
always directly derived from the source files. So you changes will be
taken into account without any special steps.


Foomatic::DB API
----------------

This API isn't required, now that the data is an an easy-to-process
format (nevermind the foomatic-configure language independent "api")
for heathen users of non-Perl languages, but even for such dogs it's
instructive to poke at how certain things are done:

get_driverlist
get_printerlist
get_printers_for_driver
get_drivers_for_printer

  These all return lists of printer id's or driver names.  The
  get_foo_for_bar methods accept a printer id or driver name as
  appropriate; the frst two just return all and take no arguments.

get_overview
get_overview_xml

  This returns an overview listing of all printers, with ids, makes,
  models, functionaliy, drivers, etc.  The various flavors return a
  Perl data structure or XML.

get_makes
get_models_by_make

  These return makes and models lists.

get_javascript2

  This returns a JavaScript function that accepts two widget element
  names.  If the first one is set to a value that euqals a known make,
  then the second one's choices are replaced with a set of models
  valued with printer IDs.  We use this to make a "nested menu" out of
  two menu controls on a web page.

get_printer_from_make_model

  This returns a printer id from a make and model

normalize

  This is used in sorts to sort printer model names properly.  You
  can't sort a printer model as a word, because the number messes it
  up, and you can't sort by number, because that doesn't work either.
  You can sort characterwise on a normalized() name.

get_combo_data_xml

  This returns the combined printer/driver data for a particular
  combination.  Arguments are driver and printer id.

  The "combo" operation is less trival than it looks; be careful when
  messing with it. It took us hours to get right... Currently, it is
  implemented in the foomatic-combo-xml.c C accelerator.

get_printer_xml
get_printer
get_driver_xml
get_driver

  These return the information in the printer info or driver info
  database files. The *_xml functions produce XML, the others Perl
  data structures.

getdat

  This returns a Perl data structure of all the data for a given
  printer/driver combo. It contains a description of printer
  capabilities, all options, choices, and ranges valid for this
  particular combo. It is used to build the PPD files, but can also
  be used by Perl frontends. It takes driver and printer ID arguments;
  just like get_combo_data_xml

getppd

  This returns the spooler-independent PPD file for foomatic-rip and for 
  applications and clients. It takes no arguments; instead you must call 
  getdat first, and they'll then magically find that result. 

getdocs
getexecdocs
get_summarydocs

  For some reason there are three functions which return documentation
  about job options for particular printer/driver pairs. There's also a 
  fourth one inside foomatic-rip (invoked by the "docs" option).

  These work the same way as getppd; you call getdat first.

  Once, these worked if you called getdat with only a driver; in that
  case it sort of documented it for all printers at once. This is
  sort of incomplete, especially what with PJL arguments in the world.
  Grant also probably broke it in the xml rewrite. Till has
  rewritten getexecdocs to produce documentation for a given printer
  driver pair, it provides the data presented on the "Execution Details"
  pages of OpenPrinting.
  
get_libdir

  Returns the library directory.


Dependencies
------------

Besides Perl and a C compiler with its standard libraries you will
need the libxml C library for XML handling and one of the tools
"wget"/"curl".

In addition, you need the Foomatic database ("foomatic-db") and the
Foomatic filters ("foomatic-filters") packages. It is recommended to
install these packages before you install this package. Then the paths
to its components get auto-detected during the build of this package.

Composite options are introduced in "foomatic-db" from December 17,
2002 ("20021217") or newer, "foomatic-db-hpijs" 1.3-2 or newer, and
Gimp-Print (now Gutenprint) 4.2.5 or newer. "foomatic-filters" 2.9.1
or newer is needed for using them. Nested composite options are
supported and introduced on August 1, 2003.

"wget" (from www.gnu.org) is really a standard tool which nearly every
distribution includes.

Because libxml is also used by GNOME, it is probably also part of
every distribution of GNU/Linux or *BSD and one can also easily build
it on any Unix-like operating system. If you distribution does not
provide libxml you can get libxml from

   http://www.xmlsoft.org/

If your distribution contains libxml, note that besides the "libxml"
or "libxml2" package you must install also a package with a name
"libxml-devel" or "libxml2-devel" to be able to compile programs which
use libxml. This additional package contains the needed header files
and "xml(2)-config", which tells the C compiler where it finds the
header files. If "xml(2)-config" or some header files in the packages
of your distribution are missing, compile libxml from source.

Till has tested with the versions 1.8.17 and 2.4.19 of libxml, both
work, but 1.8.17 requires that the XML files do not have leading blank
lines. Use foomatic-fix-xml if you have such XML files (old or
third-party files).

Using libxml 2.x is highly recommended.

You need libxml 2.x, aclocal (in the "automake" package in some
distros), and autoconf when you want to compile Foomatic from CVS.

See the USAGE file for compilation details.


Data
----

There are three main source datafiles; annotated examples:

source/opt/2.xml
================

# Every option exists independently from printers or drivers, because
# they might apply to arbitrary combinations of printers and/or
# drivers.  In practice, some drivers have wholly unique options
# (gutenprint for example), while others (lots of generic basic
# Ghostscript drivers, for example) share some options.

<option type="enum" id="opt/2">

# Options are of a type "enum", "bool", "int", "float", "string", or
# "password", options have an ID.  The id is also the filename.

# The shortname is a spaceless short name for the thing.  It must not
# contain / or : (otherwise it will not be handled correctly in PPD
# files). It should be one of the standard Adobe PPD option names if
# apropriate

  <arg_shortname>

# Various things here, and all <comments>, are internationalized.
# They take the usual posix locale codes in the form xx[_YY], where xx
# is a two-letter iso language code, and YY is two-letter country code
# to distinguise differing national dialects.
#
# Generally the national dialects won't be very common or necessary
# here.  The backends currently require that <en> content be provided.

   <en>PageSize</en><!-- backends only know <en> shortnames! -->
  </arg_shortname>

# The longname is a short phrase describing the thing in more detail
# GUI tools usually show longnames

  <arg_longname>
   <en>Page Size</en>
  </arg_longname>

# The comments are used to form documentation.  In theory these can
# become man pages or the like.

  <!-- A multilingual <comments> block can appear here, too;
       it should be treated as documentation for the user. -->

# The execution section describe how the backend should execute this
# option. The order and spot apply to the *driver*'s prototype for
# <arg_substitution /> (once called commandline) style options, or
# just the order applies for <arg_postscript /> and <arg_pjl />
# options. The order and the <arg_section> go into the "*OrderDependency"
# line of the appropriate option entry in the PPD file, for this example
# one would get

#    *OrderDependency: 100 DocumentSetup *PageSize

# When no <arg_section> is given, "AnySetup" is used as a default.

# For <arg_substitution /> options the <arg_proto> is inserted into
# the driver's command line, at the spot (e. g. "%A") whose letter is
# given between the <arg_spot>...</arg_spot> tags, the <arg_proto> of
# an <arg_postscript /> option is a snippet of PostScript code which
# is inserted into the PostScript data stream of the job, for
# DSC-conforming PostScript into the section specified with
# <arg_section>, otherwise in the beginning. The <arg_proto> lines of
# <arg_pjl /> options are PJL commands which are sent to the printer
# before the output of the driver's command line is sent. Because this
# only works reliably when the driver output does not have its own PJL
# command header, these options are ignored when the driver's XML file
# is marked with a <nopjl /> tag in its <execution> section. Drivers
# which produce their own PJL and therefore are marked with <nopjl />
# are for example "hpijs" and "hl1250". There is also the
# <arg_composite /> execution style for composite options, see the
# "Composite Options" section below. The user's value gets put into
# the <arg_proto>'s %s location. 

# The <arg_group>...</arg_group> tags put the option into the PPD
# option group named here. In many PPD-based GUIs ("kprinter", "xpp",
# OpenOffice.org, ...) every group is shown as a tab or a tree branch
# containing the member options of this group. You can also specify
# subgroups. Then you have to use a "group path" similar to directory
# paths, with the group and subgroup names separated by slashes
# (<arg_group>General/Paper</arg_group> is the "Paper" subgroup in the
# "General" group). Subgroups are not recommended as there is no GUI
# supporting them. If an option is member of a composite option (See
# "Composite Options" section below), the <arg_group>...</arg_group>
# tags will be ignored.

  <arg_execution>
   <arg_group>General</arg_group>
   <arg_order>100</arg_order>
   <arg_section>DocumentSetup</arg_section>
   <arg_spot>Z</arg_spot>
   <arg_postscript />
   <arg_proto>&lt;&lt;/PageSize[%s]/ImagingBBox null&gt;&gt;setpagedevice</arg_proto>
  </arg_execution>

# The constraints define what printer/driver combinations this option
# applies to.  The *most specific* constraint rules the day; it's
# "sense" says whether or not the option is "in".  The winning
# constraint also provides the default value used when this option
# applies to that printer and driver.

# Constraint elements are: driver, make, model.  The driver is the
# driver name, or not present to apply to any driver.  The make is the
# printer make, or not present to apply to any printer make.  The
# model is the driver model, or not present to apply to any printer.
# Instead of make/model, you can also specify <printer>id</printer>.

# IMPORTANT: The make and model must match the one in the printer xml
# definition, and everywhere else in the other options. One needs to
# write a utility to change printer names sensibly.

# It is illegal to have a model with no make.

# It is illegal to have none of make/model/driver.

# It is illegal to have *no* constraints, or at least such options are
# never used.

# For enum options, the defval is the id of the enum_val that is the
# default.  For other option types, it is the actual default value
# (ie, a number, or 1 or 0 for boolean, etc).

  <constraints>
     <constraint sense="true">
      <driver>sj48</driver>
      <arg_defval>ev/1</arg_defval>
     </constraint>
     <constraint sense="true">
      <driver>r4081</driver>
      <arg_defval>ev/1</arg_defval>
     </constraint>
# A gajillion constraints deleted
  </constraints>
  <enum_vals>
   <enum_val id="ev/1">
    <ev_longname>
     <en>US Letter</en>
    </ev_longname>
    <!-- A multilingual <comments> block can appear here, too;
         it should be treated as documentation for the user. -->
    <ev_shortname>
     <en>Letter</en>
     <!-- Until someone tells me how to learn the user locale in 
          backends, the shortname must be monolingual in <en>! -->
    </ev_shortname>

# If present, the driverval is what gets substituted in for the %s in
# the option's prototype.  This way the user-visible stuff can be
# anything.

    <ev_driverval>612 792</ev_driverval>

# This enum_val has no constraints.  It *is* OK for enum_vals to
# have no constraints; they are assumed to apply unless
# constrained otherwise.

   </enum_val>
   <enum_val id="ev/115">
    <ev_longname>
     <en>A3</en>
    </ev_longname>
    <!-- A multilingual <comments> block can appear here, too;
         it should be treated as documentation for the user. -->
    <ev_shortname>
     <en>A3</en>
     <!-- Until someone tells me how to learn the user locale in 
          backends, the shortname must be monolingual in <en>! -->
    </ev_shortname>
    <ev_driverval>842 1191</ev_driverval>

# Here are some example constraints for an enum_val.  The A3 size
# paper doesn't fit on lots of printers, so there are various
# constraints to make the right thing happen.

    <constraints>
     <constraint sense="true">
      <driver>ml85p</driver>
      <arg_defval>na</arg_defval>
     </constraint>
     <constraint sense="true">
      <make>HP</make>
      <model>DeskJet 1000C</model>
      <driver>pnm2ppa</driver>
      <arg_defval>na</arg_defval>
     </constraint>
     <constraint sense="false">
      <make>HP</make>
      <model>DeskJet 820C</model>
      <driver>pnm2ppa</driver>
      <arg_defval>na</arg_defval>
     </constraint>

     # lots more...

    </constraints>
   </enum_val>
  </enum_vals>
</option>

# To allow custom page sizes to be used one has add a choice with the
# "<ev_shortname>" being "Custom" to the "PageSize" option (example
# below). This choice will be treated as the custom page size. When
# the user selects this choice, he has to provide the width and the
# height of the page in addition. These values are converted into
# PostScript points (1/72 inches) and inserted into placeholders in
# the "<ev_driverval>" of this choice. The "<ev_driverval>" should
# contain a placeholder "%0" for the page width and "%1" for the page
# height. Alternatively the "<ev_driverval>" can contain two zeros
# ("0") from which the first will be replaced by the page width and
# the second by the page height. Then one gets Adobe-compliant entries
# for the custom page size in the PPD files and one can set a custom
# page size with the following commands:

# CUPS: lpr -P huge -o PageSize=Custom.500x750cm bigposter.ps
# LPRng: lpr -P huge -Z PageSize=Custom.500x750cm bigposter.ps
# GNUlpr: lpr -P huge -o PageSize=Custom.500x750cm bigposter.ps
# LPD: lpr -P huge -JPageSize=Custom.500x750cm bigposter.ps
# PPR (RIP): ppr -P huge -F "*PageSize Custom" --ripopts 500x750cm
#          bigposter.ps
# PPR (Int.): ppr -P huge -F "*PageSize Custom" -i 500x750cm bigposter.ps
# PDQ: pdq -P huge -oPageSize_Custom -aPageWidth=500
#          -aPageHeight=750 -oPageSizeUnit_cm bigposter.ps
# No spooler: foomatic-rip -P huge -o PageSize=Custom.500x750cm
#	   bigposter.ps

# Here is an example for a custom page size setting:

#   <enum_val id="ev/PageSize-Custom">
#    <ev_longname>
#     <en>Custom size</en>
#    </ev_longname>
#    <!-- A multilingual <comments> block can appear here, too;
#         it should be treated as documentation for the user. -->
#    <ev_shortname>
#     <en>Custom</en>
#     <!-- Until someone tells me how to learn the user locale in 
#          backends, the shortname must be monolingual in <en>! -->
#    </ev_shortname>
#    <ev_driverval>%0 %1</ev_driverval>
#   </enum_val>

# The entry

#    <ev_driverval>0 0</ev_driverval>

# would have the same effect as the <ev_driverval> of the example.

# For numerical (int, float) and bool options there is no <enum_vals>
# section. Instead of this section numerical options have tags to
# specify minimum and maximum value:

#  <arg_max>10.0</arg_max>
#  <arg_min>0.0</arg_min>

# For the %s in the <arg_proto> a number, either the user's choice
# when he has specified this option or the default value is
# inserted. Only numbers between the minimum and the maximum and in
# case of int options only integer numbers are allowed.

# Bool options can be set or not be set. There <arg_proto> will be
# inserted if they are set, nothing if they are not set. A %s in the
# <arg_proto> is not allowed, there is nothing to insert for it. As
# <arg_defval> in the option's constraints one can use 0 for not
# setting the option by default or 1 for setting it by default.

# Bool options need the specification of a name for the case when they
# are not set. This will be used by GUIs and in PPD files:

#  <arg_shortname_false>
#    <en>CorrectBlack</en><!-- Backends only know <en> shortnames! -->
#  </arg_shortname_false>

# This name should not contain spaces, ":", or "/".

# See below for string and password options.

printer/HP-LaserJet_4000.xml
============================

# The printer file contains information specific to a particular
# printer.

<printer id="printer/HP-LaserJet_4000">

# Make and model are not internationalized.  There will eventually be
# an "alias" mechanism, but the need is different.

  <make>HP</make>
  <model>LaserJet 4000</model>

# According to the Adobe specifications for PPD files every PPD file
# must contain a unique DOS-compatible file name (the "*PCFileName"),
# a file name with an up to 8 characters log base name and an up to 3
# characters long extension, and upper and lower case letters being
# considered as equal. As every PPD file is for a printer/driver
# combo, we let the first 6 characters being provided by the printer
# entry:

  <pcmodel>HPLJ4K</pcmodel>

# The first two characters should be the manufacturer prefix as listed
# in Appendix D of Adobe's "PostScript Printer Description (PPD) File
# Format Specification Version 4.3", available on

# http://partners.adobe.com/public/developer/en/ps/5003.PPD_Spec_v4.3.pdf

# Various stuff about the machine

  <mechanism>

# Printer types can be <laser />, <led />, <inkjet />, <dotmatrix />,
# <impact />, <sublimation />, <transfer />. Other types we have to
# add to the CGI script on OpenPrinting to make the web interface
# displaying them properly.

    <laser/>

# At some point we can make color be less of a boolean flag and more
# of a section full of goodies.

    <!--not "color"-->
    <resolution>

# In theory this is a list.  In practice We've only got one per
# printer which is the maximum resolution the manufacturer claims
# for this printer.

      <dpi>
        <x>1200</x>
        <y>1200</y>
      </dpi>
    </resolution>

    <consumables>

# Information about ink, drums, etc.
# The comments are supposed to be qualitative ("Separate drum and
# toner cartridges")

      <comments>
        <en>toner</en>
      </comments>

# There should be <partno>12A1975</partno> elements with manufacturer
# part numbers for the various carts, etc it takes. Then one could
# have a price watcher thingy like there is now for the printers.

      <!--one or more "partno" elements.-->
    </consumables>
  </mechanism>

  <url>http://www.pandi.hp.com/pandi-db/prod_info.show?model=C4118A&amp;name=LaserJet4000</url>

# The lang section.  In practice this will be only minimally useful;
# 
#  - Backends can pstops the ps down a level if needed
#  - Backends know if pjl options apply
#  - Backends can know if "quick text" will work
#
# Commonly used language tags: <pcl level="x" />, <escp2 />, <proprietary />

  <lang>
    <postscript level="2">
    <!--unknown ppd filename "ppd"--></postscript>
    <pjl/>
    <text>
      <charset>us-ascii</charset>
    </text>
  </lang>

# The autodetection stuff

  <autodetect>

# There are three ways to auto-detect a printer, via the parallel port
# (<parallel>...</parallel>), the USB (<usb>...</usb>), or SNMP
# (TCP/Socket-connected printer, <snmp>...</snmp>). Through these
# interfaces the printers report back an IEEE-1284-complient ID string
# from which the fields "MFG" (<manufacturer>...</manufacturer>),
# "MDL" (<model>...</model>), "DES" (<description>...</description>),
# and "CMD" (<commandset>...</commandset>) are used. The string itself
# can be put between <ieee1284>...</ieee1284> tags, but all items
# which are not constant for all printers of this model, as the serial
# number ("SERN:...;") and the device status ("VSTATUS:...;") have to
# be removed here. As the ID string is usually the same for all
# detection methods, one can put the entries between
# <general>...</general> tags, then the <parallel>...</parallel>,
# <usb>...</usb>, and <snmp>...</snmp> are only used for
# differences to the data between the <general>...</general> tags. A
# complete entry could look like:
#
#  <autodetect>
#    <general>
#      <ieee1284>MFG:HEWLETT-PACKARD;MDL:DESKJET 600;CMD:MLC,PCL,PML;CLASS:PRINTER;DESCRIPTION:Hewlett-Packard DeskJet 600;</ieee1284>
#      <commandset>MLC,PCL,PML</commandset>
#      <description>Hewlett-Packard DeskJet 600</description>
#      <manufacturer>HEWLETT-PACKARD</manufacturer>
#      <model>DESKJET 600</model>
#    </general>
#  </autodetect>
#

# On Linux you find this info for the parallel ports (/dev/lp<N>, <N>
# = 0, 1, 2, ...) in the files
#
#   /proc/sys/dev/parport/parport0/autoprobe*
#
# for the USB under Linux it is more complicated, easiest is to use a little
# Perl script, called "getusbprinterid.pl":
# You need to find the IOCTL call value to pass to the perl ioctl function.
# Here is a little C program that does this.  This is easier than trying to
# use p2h and convert the *.h files to perl.

# --------------------------------------------------------------------------
#  /*
#       print the IOCTL call value for printer information
#  */
#  #include <stdio.h>
#  #include <sys/ioctl.h>
#  /* From the /usr/src/linux<version>/drivers/usb/printer.c */
#  #define DRIVER_VERSION "v0.11"
#  #define DRIVER_AUTHOR "Michael Gee, Pavel Machek, Vojtech Pavlik, Randy Dunlap, Pete Zaitcev, David Paschal"
#  #define DRIVER_DESC "USB Printer Device Class driver"
#  
#  #define USBLP_BUF_SIZE      8192
#  #define DEVICE_ID_SIZE      1024
#  
#  /* ioctls: */
#  #define LPGETSTATUS     0x060b      /* same as in drivers/char/lp.c */
#  #define IOCNR_GET_DEVICE_ID     1
#  #define IOCNR_GET_PROTOCOLS     2
#  #define IOCNR_SET_PROTOCOL      3
#  #define IOCNR_HP_SET_CHANNEL        4
#  #define IOCNR_GET_BUS_ADDRESS       5
#  #define IOCNR_GET_VID_PID       6
#  /* Get device_id string: */
#  #define LPIOC_GET_DEVICE_ID(len) _IOC(_IOC_READ, 'P', IOCNR_GET_DEVICE_ID, len)
#  /* The following ioctls were added for http://hpoj.sourceforge.net: */
#  /* Get two-int array:
#  * [0]=current protocol (1=7/1/1, 2=7/1/2, 3=7/1/3),
#  * [1]=supported protocol mask (mask&(1<<n)!=0 means 7/1/n supported): */
#  #define LPIOC_GET_PROTOCOLS(len) _IOC(_IOC_READ, 'P', IOCNR_GET_PROTOCOLS, len)
#  /* Set protocol (arg: 1=7/1/1, 2=7/1/2, 3=7/1/3): */
#  #define LPIOC_SET_PROTOCOL _IOC(_IOC_WRITE, 'P', IOCNR_SET_PROTOCOL, 0)
#  /* Set channel number (HP Vendor-specific command): */
#  #define LPIOC_HP_SET_CHANNEL _IOC(_IOC_WRITE, 'P', IOCNR_HP_SET_CHANNEL, 0)
#  /* Get two-int array: [0]=bus number, [1]=device address: */
#  #define LPIOC_GET_BUS_ADDRESS(len) _IOC(_IOC_READ, 'P', IOCNR_GET_BUS_ADDRESS, len)
#  /* Get two-int array: [0]=vendor ID, [1]=product ID: */
#  #define LPIOC_GET_VID_PID(len) _IOC(_IOC_READ, 'P', IOCNR_GET_VID_PID, len)
#  
#  
#  int main( int argc, char *argv, char *envp[] )
#  {
#   int len = 1024;
#   int v;
#   /* _IOC(), _IOC_READ as defined in /usr/include/asm/ioctl.h
# LPIOC_GET_DEVICE_ID(len) = _IOC(_IOC_READ, 'P', IOCNR_GET_DEVICE_ID, len)
#   */
#   v = LPIOC_GET_DEVICE_ID(len);          printf("$LPIOC_GET_DEVICE_ID = 0x%08x;\n", v );
#   v = LPIOC_GET_BUS_ADDRESS(len);        printf("$LPIOC_GET_BUS_ADDRESS = 0x%08x;\n", v );
#   v = LPIOC_GET_VID_PID(len);            printf("$LPIOC_GET_VID_PID = 0x%08x;\n", v );
#   return(0);
#  }
#  
#     
# save this to a file, say getv.c, and then use:
#  make mc       # compiles it
#  ./mc          # runs it
#  $LPIOC_GET_DEVICE_ID = 0x84005001;
#  $LPIOC_GET_BUS_ADDRESS = 0x84005005;
#  $LPIOC_GET_VID_PID = 0x84005006;



# Here is the getusbprinterid.pl PERL program to get the usb information
#    
#	!/usr/bin/perl
#	open FILE, "$ARGV[0]" or die "cannot open $ARGV[0]";
#	my $result;
#	# len = 1024
#	# LPIOC_GET_DEVICE_ID(len) = _IOC(_IOC_READ, 'P', IOCNR_GET_DEVICE_ID, len)
#	# _IOC(), _IOC_READ as defined in /usr/include/asm/ioctl.h
#	$LPIOC_GET_DEVICE_ID = 0x84005001;
#	$LPIOC_GET_BUS_ADDRESS = 0x84005005;
#	$LPIOC_GET_VID_PID = 0x84005006;
#	
#	ioctl(FILE, $LPIOC_GET_DEVICE_ID , $result) or die;
#	# Cut resulting string to its real length
#	my $length = ord(substr($result, 1, 1)) + (ord(substr($result, 0, 1)) << 8);
#	$result = substr($result, 2, $length-2);
#	# Remove non-printable characters
#	$result =~ tr/[\x0-\x1f]/\./;
#	print "DeviceID $result\n";
#	
#	$result = pack("LL",0);
#	ioctl(FILE, $LPIOC_GET_BUS_ADDRESS , $result) or die;
#	my( $v1, $v2 ) = unpack("LL", $result );
#	print "Bus '$v1', Device '$v2'\n";
#	
#	$result = pack("LL",0);
#	ioctl(FILE, $LPIOC_GET_VID_PID, $result) or die;
#	my( $v1, $v2 ) = unpack("LL", $result );
#	print "Vendor '$v1', Product '$v2'\n";
#	
#	close FILE;
#	
#    
# --------------------------------------------------------------------------

# Running the program with "perl getusbprinterid.pl /dev/usb/lp0" returns the
# ID string of the device on /dev/usb/lp0.
# For example: perl getusbprinter.pl /dev/usb/lp0  
#  DeviceID MFG:Hewlett-Packard;CMD:PJL,MLC,PCL,PCLXL,POSTSCRIPT;MDL:\
#    HP LaserJet 2200;CLS:PRINTER;DES:Hewlett-Packard LaserJet 2200;\
#    MEM:8MB;OPTRAY:250Sheets
#  Bus '2', Device '2'
#  Vendor '1008', Product '535'
#
# (lines broken for clarity)


    <!--no known parport probe information-->
  </autodetect>

# Our grading system.  It's US-style letter grades A, B, D, and F,
# which the website shows as "Perfectly", "Mostly", "Partially" and
# "Paperweight" .
# THERE IS NO `C'!!!

  <functionality>A</functionality>

# Arguably, the scores should live with the printer/driver association
# and not on the printer, but then it's a big hassle to figure out if
# a printer works... So the score is the one reached with the driver
# working best, the "recommended" driver.

# There's a spot for this "recommended" driver, usually the driver
# which gives the maximum output quality. It is for user information
# on the web site, but newbie-friendly printer setup GUIs should use
# it, too. Unfortunately, only "printerdrake" of Mandrake Linux makes
# use of it.

  <!--unknown preferred "driver"-->

# The <unverified /> tag was on all printer entries which were
# formerly entered by visitors using the web printer input interface
# as the database was still PostGreSQL-driven.

  <!--not "unverified"-->

# If there is a web site with additional interesting info about this
# printer, it can be mentioned in the entry by putting it between
# <contrib_url>...</contrib_url> tags,

  <!--no "contrib_url"-->

# The regular notes section.  The allowed tags are: <p>, <a
# href="foobar"> </a> and many other simple tags (<b>, <i>, <tt>,
# ...). Not that to distinguish what is XML and what is the embedded
# HTML, make the following replacements:
#
#   < --> &lt;
#   > --> &gt;
#   " --> &quot;
#   ' --> &apos;
#   & --> &amp;
#

  <comments>
    <en>
    I don&apos;t believe this:&lt;p&gt;

    &lt;i&gt;1200x1200 dpi only possible with Windows drivers,
    600x600 can be reached w/o particular software.
    The difference is visible, but only slightly, so
    the Functionality got &quot;Mostly&quot;&lt;p&gt;&lt;/i&gt;&lt;p&gt;

    Do the following:&lt;p&gt;

    Set the resolution on the front panel to &quot;Prores 1200&quot;, not
    to &quot;Fastres 1200&quot;. When you use CUPS with HPs PPD file, turn
    off &quot;Fastres 1200&quot; in the printer configuration
    options.&lt;p&gt;

    Try the generic PostScript PPD file which comes with KUPS 1.0 or newer.
    </en>
  </comments>
</printer>


driver/md2k.xml
===============

The driver files contain information about drivers.  There are a few
things, but the two biggies are the prototype and the printers list

<driver id="driver/md2k">
 <name>md2k</name>

# According to the Adobe specifications for PPD files every PPD file
# must contain a unique DOS-compatible file name (the "*PCFileName"),
# a file name with an up to 8 characters log base name and an up to 3
# characters long extension, and upper and lower case letters being
# considered as equal. As every PPD file is for a printer/driver combo,
# we let the last 2 characters being provided by the driver entry:

 <pcdriver>M2</pcdriver>
 <url>http://plaza26.mbn.or.jp/~higamasa/gdevmd2k/</url>
 <execution>

# Driver types are 
#
#  <ghostscript /> : The driver code is compiled into GhostScript
#
#  <filter /> :      The driver code is a separate executable, either a
#                    filter which converts generic bitmap output of
#                    GhostScript to the printer's language, a wrapper 
#                    around GhostScript, or an IJS plug-in.
#
#  <uniprint /> :    A uniprint driver, consisting of one or more .upp
#                    files for GhostScript.
#
#  <postscript /> :  A driver which has PostScript also as output (for 
#                    PostScript printers). It usually does not call
#                    GhostScript but only applies the user's option
#                    settings to the data stream. But GhostScript can
#                    be called here, too, as for downgrading to a lower
#                    PostScript level.
#
# The driver type only provides information for the web pages, it is not
# used when generating config files for a spooler.

# The driver's <execution> section can also contain a
#
# <nopjl />
#
# which suppresses the usage of PJL options (options which send PJL
# commands to the printer). This one does with drivers where the
# driver itself already produces a PJL header, the second one built
# by the PJL options would then be ignored by the printer, and so
# this kind of options does not make sense. Such driver are for
# example "hpijs" and "hl1250".

# And the driver's <execution> section can also contain a
#
# <nopageaccounting/>
#
# This suppresses the inserting of page accounting code (for CUPS)
# into the PostScript data stream. Some drivers lead to unexpected
# behavior with that. Especially for the generic PostScript driver
# (which does not use Ghostscript in most cases) the accounting code
# should not be inserted.

# The prototype defines what command the backends run to drive this
# printer.  It must take postscript on stdin and generate "printer
# stuff" on stdout.  Various %A, %B, etc substitution "spots" are
# specified; this is where substition options will be placed.

  <prototype>gs -q -dBATCH -dSAFER -dQUIET -dNOPAUSE -sDEVICE=md2k%A%Z -sOutputFile=- -</prototype>
 </execution>
 <comments>
  <en>
    Part of the gdevmd2k-0.2a package by Shinya Umino.  The web page and
    documentation are in Japanese.
    &lt;a href="/clippings/MD5000-translation.txt"&gt;Here&lt;/a&gt;
    is an English translation of the driver's web page, and &lt;a
    href="/clippings/alpsmd.txt"&gt;here&lt;/a&gt; is the README from the
    driver package.
  </en>
 </comments>

# The printer list is a simple list of printers that this driver works
# with.  Historically, these "bits" were on the printer cgi form page,
# but now they're put here.

 <printers>
  <printer>
   <id>printer/Alps-MD-1000</id><!-- Alps MD-1000 -->
  </printer>
  <printer>
   <id>printer/Alps-MD-1300</id><!-- Alps MD-1300 -->
  </printer>
  <printer>
   <id>printer/Alps-MD-2000</id><!-- Alps MD-2000 -->
  </printer>
  <printer>
   <id>printer/Alps-MD-4000</id><!-- Alps MD-4000 -->
  </printer>
 </printers>
</driver>

# In the printer list it is also possible to place comments specific to
# a certain printer/driver pair:
#
#  <printer>
#   <id>printer/HP-LaserJet_4050</id><!-- HP LaserJet 4050 -->
#   <comments>
#    <en>to 1200dpi</en>
#   </comments>
#  </printer>


Composite Options
-----------------

This is an option type to make it easier for users to choose the best
settings for a certain printing task, even if the driver has very many
options. The idea is to have an enumerated choice option which does
not directly modify something in the driver's command line but sets
several of the other options.

One example is the "PrintoutMode" option which will be made available
for all printer/driver combos which have at least one option regarding
the printout quality or document type. 

The possible choices should be the same for every printer and driver,
so that users (especially newbies) can bring their printers in the
right mode by choosing one easy to understand item from a menu instead
of having to switch several cryptic driver options. For now the
choices are the following:

   Command line  GUI                Intention
   -----------------------------------------------------------------------
   Draft         Draft              Very fast, ink/toner-saving printout
   Normal        Normal             Quick standard quality printout
   High          High Quality       High quality for plain paper
   VeryHigh      Very High Quality  Highest quality for plain/inkjet paper
   Photo         Photo              Highest quality for photo paper

These choices can also have one of the following modifiers:

   Modifier      Intention
   -----------------------------------------------------------------------
   .Gray         Grayscale printing on a color printer
   .Mono         Monochrome printing (no grayscales, black or white)

Examples:

   Command line   GUI                      Comment
   ---------------------------------------------------------------------
   High.Gray      High Quality Grayscale
   Photo          Photo                    Color photos on color printer
   VeryHigh.Mono  Very High Quality Monochrome  Really black text in
                                           highest quality on inkjet
                                           printer, not suitable for
                                           halftone images.
   Normal         Normal                   Standard color in 300/360 dpi
                                           on normal paper, grayscale
                                           on black-and-white printers

Not all choices/combinations of basic choices and modifiers must be
present. Often modes are simply not available on certain
printer/driver combos, as "Photo" on most lasers. It is highly
recommended to have "Normal" available, though (and having this the
default).

The GUI names can have additional remarks in parantheses, for example
when manual intervention (other cartridge, photo paper) is needed.

To add such an option to the database, one only needs to add an option
XML file like the one below into the db/source/opt directory of the
database. The file db/source/opt/pcl3-PrintoutMode.xml could look
like this:

--------------------------------------------------------------------------
<option type="enum" id="opt/pcl3-PrintoutMode">
  <!-- A multilingual <comments> block can appear here, too;
       it should be treated as documentation for the user. -->
  <arg_longname>
   <en>Printout Mode</en>
  </arg_longname>
  <arg_shortname>
   <en>PrintoutMode</en><!-- backends only know <en> shortnames! -->
  </arg_shortname>
  <arg_execution>
   <arg_order>10</arg_order>
   <arg_section>AnySetup</arg_section>
   <arg_spot>A</arg_spot>
   <arg_composite />
   <!-- <arg_proto></arg_proto> -->
  </arg_execution>
  <constraints>
     <constraint sense="true">
      <driver>pcl3</driver>
      <arg_defval>ev/pcl3-PrintoutMode-Normal</arg_defval>
     </constraint>
  </constraints>
  <enum_vals>
   <enum_val id="ev/pcl3-PrintoutMode-Draft">
    <ev_longname>
     <en>Draft</en>
    </ev_longname>
    <!-- A multilingual <comments> block can appear here, too;
         it should be treated as documentation for the user. -->
    <ev_shortname>
     <en>Draft</en>
     <!-- Until someone tells me how to learn the user locale in
          backends, the shortname must be monolingual in <en>! -->
    </ev_shortname>
    <ev_driverval>MediaType=Plain Resolution=150 Quality=Draft IntensityRendering=Halftones Passes=1</ev_driverval>
   </enum_val>
   <enum_val id="ev/pcl3-PrintoutMode-Normal">
    <ev_longname>
     <en>Normal</en>
    </ev_longname>
    <!-- A multilingual <comments> block can appear here, too;
         it should be treated as documentation for the user. -->
    <ev_shortname>
     <en>Normal</en>
     <!-- Until someone tells me how to learn the user locale in
          backends, the shortname must be monolingual in <en>! -->
    </ev_shortname>
    <ev_driverval>MediaType=Plain Resolution=300 Quality=Normal IntensityRendering=Halftones Passes=1</ev_driverval>
   </enum_val>
   <enum_val id="ev/pcl3-PrintoutMode-High">
    <ev_longname>
     <en>High</en>
    </ev_longname>
    <!-- A multilingual <comments> block can appear here, too;
         it should be treated as documentation for the user. -->
    <ev_shortname>
     <en>High</en>
     <!-- Until someone tells me how to learn the user locale in
          backends, the shortname must be monolingual in <en>! -->
    </ev_shortname>
    <ev_driverval>MediaType=Plain Resolution=600 Quality=Presentation IntensityRendering=FloydSteinberg Passes=4</ev_driverval>
   </enum_val>
   <enum_val id="ev/pcl3-PrintoutMode-Photo">
    <ev_longname>
     <en>Photo (on photo paper)</en>
    </ev_longname>
    <!-- A multilingual <comments> block can appear here, too;
         it should be treated as documentation for the user. -->
    <ev_shortname>
     <en>Photo</en>
     <!-- Until someone tells me how to learn the user locale in
          backends, the shortname must be monolingual in <en>! -->
    </ev_shortname>
    <ev_driverval>MediaType=Premium Resolution=600 Quality=Presentation IntensityRendering=FloydSteinberg Passes=4</ev_driverval>
   </enum_val>
  </enum_vals>
</option>
--------------------------------------------------------------------------

The shown option is only an example, it is neither in the CVS nore
will it work with all printers which use the "pcl3" driver. You can
paste it into a file (make the <ev_driverval>"s being one line, the
items separated by spaces) and copy it to db/source/opt/ to try it
out.

The "<arg_composite />" tag for the execution style specifies it as a
composite option. The <arg_spot> and <arg_proto> are meaningless in a
composite option and the "<ev_driverval>"s contain a space-separated
list of all settings of which the pre-made configuration represented
by this choice consists. Every choice of the composite option must set
EXACTLY THE SAME individual options. In no choice it is allowed to
leave out one of them. These individual options are the member options
of the composite option. Not all options of a driver/printer combo
need to be member options of the composite option. It is not allowed
to have one option being member of more than one composite option. The
composite option must be an enumerated choice options, the member
options must be enumerated choice or boolean options. Member options
can even be composite options, so composite options can be nested.

It is enough to add a composite option as shown. The PPD generator
(getppd() in lib/Foomatic/DB.pm, package "foomatic-db-engine") will
take care of the rest. It will

   - Order all member options into a group (PPD group, see "Option
     Grouping" below) named after the composite option.

   - Add to every member option the choice "Controlled by '<name of
     the composite option>'" and make this choice the default. If this
     is chosen, the composite option will set the value for this
     member, depending on what value is chosen for the composite
     option. If the user chooses something else than "Controlled by
     '<name of the composite option>'" the member option does not obey
     the setting given by the composite option. So the advanced user
     can also set the member options individually.

   - If necessary the <arg_order> and <arg_section> of the composite
     option is replaced by other values in the PPD file, so that the
     composite option will be stuffed into the PostScript data stream
     always before all its member options. Do not give "0" as the
     order number to any of the member options.

A composite option can also span only one (but not zero) member
option. This is for example done with the "PrintoutMode" option of the
HPIJS driver ("foomatic-db-hpijs" package). This driver has only one
option for setting resolution and quality, but this options has
sometimes many choices with rather cryptic names. The "PrintoutMode"
maps to the most important choices with the above-mentioned names, and
in addition, these names are the same as of the "PrintoutMode" options
of other drivers, so the user finds the important printing modes more
easily.

The facility of composite options can also be used for other things
than for a "PrintoutMode" option, for example a finisher could be
controlled by a composite option (to have the most common finishing
tasks as "Bound booklet", "Stapled booklet", "Letter in envelope",
...).


Forced Composite Options
------------------------

Forced composite options are very similar to composite options, but the
user cannot set the individual member options, but only the composite
option (the user is forced to use the composite option). This allows
options acting at two or more places.

Example: A printer driver is a filter which converts a generic bitmap
produced by GhostScript to the printer's native format. The command
line for converting PostScript to the printer's language could look like this

gs -q -dBATCH -dSAFER -dNOPAUSE -sDEVICE=bitcmyk -r600 -sOutputFile=-
- | filter -size=<width>x<height>

where <width> and <height> is the page size in points (1/72
inches). In addition, GhostScript needs to know the page size. For
this one usually puts the following PostScript code into the
PostScript input file:

<</PageSize[<width> <height>]/ImagingBBox null>>setpagedevice

where <width> and <height> is again the page size in points. So we
need two options for setting the page size, one PostScript option to
set the page size for GhostScript and one command line option to set
the page size for the filter. The user would have to change both when
he wants to print on another paper size, and it does not make sense to
have different settings for the two. So one could make the "PageSize"
option a composite option of the two, but then the GUI exposes an ugly
"PageSize" group with the two individual options. To avoid this, one
uses a forced composite option ("Forced" because the user is forced to
use the composite option, the individual member options are not
accessible).

Assuming that the name of the PostScript option for the page size is
"GSPageSize", the name of the page size option for the filter is
"filterPageSize" and both have the choices "A4", "Letter", and
"Legal", the forced composite option named "PageSize" would look as
follows:

--------------------------------------------------------------------------
<option type="enum" id="opt/filter-PageSize">
  <!-- A multilingual <comments> block can appear here, too;
       it should be treated as documentation for the user. -->
  <arg_longname>
   <en>Page Size</en>
  </arg_longname>
  <arg_shortname>
   <en>PageSize</en><!-- backends only know <en> shortnames! -->
  </arg_shortname>
  <arg_execution>
   <arg_order>10</arg_order>
   <arg_section>AnySetup</arg_section>
   <arg_spot>A</arg_spot>
   <arg_forced_composite />
  </arg_execution>
  <constraints>
     <constraint sense="true">
      <driver>filter</driver>
      <arg_defval>ev/filter-PageSize-Letter</arg_defval>
     </constraint>
  </constraints>
  <enum_vals>
   <enum_val id="ev/filter-PageSize-Letter">
    <ev_longname>
     <en>Letter</en>
    </ev_longname>
    <!-- A multilingual <comments> block can appear here, too;
         it should be treated as documentation for the user. -->
    <ev_shortname>
     <en>Letter</en>
     <!-- Until someone tells me how to learn the user locale in
          backends, the shortname must be monolingual in <en>! -->
    </ev_shortname>
    <ev_driverval>GSPageSize=Letter filterPageSize=Letter</ev_driverval>
   </enum_val>
   <enum_val id="ev/filter-PageSize-Legal">
    <ev_longname>
     <en>Legal</en>
    </ev_longname>
    <!-- A multilingual <comments> block can appear here, too;
         it should be treated as documentation for the user. -->
    <ev_shortname>
     <en>Legal</en>
     <!-- Until someone tells me how to learn the user locale in
          backends, the shortname must be monolingual in <en>! -->
    </ev_shortname>
    <ev_driverval>GSPageSize=Legal filterPageSize=Legal</ev_driverval>
   </enum_val>
   <enum_val id="ev/filter-PageSize-A4">
    <ev_longname>
     <en>A4</en>
    </ev_longname>
    <!-- A multilingual <comments> block can appear here, too;
         it should be treated as documentation for the user. -->
    <ev_shortname>
     <en>A4</en>
     <!-- Until someone tells me how to learn the user locale in
          backends, the shortname must be monolingual in <en>! -->
    </ev_shortname>
    <ev_driverval>GSPageSize=A4 filterPageSize=A4</ev_driverval>
   </enum_val>
  </enum_vals>
</option>
--------------------------------------------------------------------------

This looks exactly like a usual composite option and works also the
same way. The only difference is that instead of an "<arg_composite
/>" tag "<arg_forced_composite />" is used. If the PPD generator finds
such an option, it hides the member options by only using
"*Foomatic..." keywords to describe them, not any standard PPD
keywords as "*OpenUI...", "*OrderDependency...", ... This way
PPD-aware graphical frontends do not see the member options but
foomatic-rip has all information from them to run the driver
correctly.


String and Password Options
---------------------------

These options allow the user to supply nearly arbitrary strings
(within limits of length, characters and structure) to the printer
driver, for example names of color calibration files, fax numbers,
passwords for confidential jobs, ... Frequently needed strings can be
added as enumerated choices, so a frontend can show the option as a
combo-box. The enumerated choices are also used for frontends which
only support options as defined by the PPD spec. So having enumerated
choices is highly recommended for most of these options.

In the XML database string and password options look similar to
enumerated choice options. The differences are the option types
"string" or "password" and the additional tags to restrict the
possible strings.

The "<arg_maxlength>" tags give a length limit, it should once not
allow strings longer than around 100 characters, as otherwise
foomatic-configure could generate a line longer than the allowed 255
characters in the PPD file when setting the default value, and second,
which is very important, it should not allow strings which are too
long for the printer filter or driver so that buffer overflows cannot
occur. Not using the "<arg_maxlength>" tags makes arbitrary long
strings to be accepted, this is not recommended.

With "<arg_allowedchars>" the accepted strings can be restricted to
contain only the characters given in the list. This restrictions does
not only avoid that the filter chokes on a wrong option, it serves
mainly for security reasons, for example to avoid a string like "|| rm
-rf * ||" for a command line option. So if the option prototype does
not quote the string, command delimiter characters, I/O re-directors,
and shell special characters (";", "|", "&", "<", ">", "*", "?", "[",
"]", "{", "}", "(", ")", "$", "\", "'", """) should not be allowed. If
the string is quoted by the option prototype, the closing quote
character and the backslash should not be allowed, so that one cannot
escape from the quoting. The allowed characters are checked by a
"/^[...]*$/" expression in the Perl scripts, so ranges with "-", a
list of forbidden characters with a leading "^", or special characters
as "\w", "\d", "\x07", ...  are allowed. To allow a backslash, one has
to escape it by using two backslashes ("\\"). To allow a "-" it must
be in the end of the list to not make it defining a range and for a
"^" must be placed at any other place than the beginning of the string
if it should be explicitly allowed.

"<arg_allowedregexp>" allows also to restrict the structure of the
string, as it defines an arbitrary Perl regular expression (see "man
perlre") which has to be matched by the string. This serves also for
having only strings which are usable by the filter and which do not
destroy the command line structure. With this one can for example
forbid a backslash as the last character to avoid escaping the closing
quote of the option prototype. Regular expressions are applied via a
'/.../' expression in the Perl scripts. To apply the pattern matching
modifiers "i", "m", "s", or "x" (as "/.../i" for case-insensitive
matching) begin the regular expression with "(?<modifiers>)" (as
"(?i)..." for case-insensitive matching).

It is highly recommended to use at least one of "<arg_allowedchars>"
and "<arg_allowedregexp>", as otherwise all characters are allowed in
the user-supplied string and so a malicious user can execute arbitrary
shell or PostScript commands. If both tags are used, both conditions
have to be fulfilled.

Note that for the character lists and regular expressions in the XML
files the following character substitutions have to be done:

   < --> &lt;
   > --> &gt;
   " --> &quot;
   ' --> &apos;
   & --> &amp;

Here is an example for an option to supply the file name for an ICC
profile for the "foo2zjs" driver (this option is neither in the CVS
for the Foomatic database nor tested with this driver):

--------------------------------------------------------------------------
<option type="string" id="opt/foo2zjs-ICM">
    <comments>
	<en>
	This option controls which .ICM file to use for color correction.
	ICM files are stored in the directory /usr/share/foo2zjs/icm/.
	</en>
    </comments>
    <arg_longname> <en>ICM Color Profile</en> </arg_longname>
    <arg_shortname> <en>ICM</en> </arg_shortname>
    <arg_execution>
	<arg_group>Adjustment</arg_group>
	<arg_order>300</arg_order>
	<arg_spot>A</arg_spot>
	<arg_required />
	<arg_substitution />
	<arg_proto>-G%s </arg_proto>
    </arg_execution>
    <arg_maxlength>127</arg_maxlength>
    <arg_allowedchars>A-Za-z0-9\._/-</arg_allowedchars>
    <arg_allowedregexp>(?&lt;!\/)$</arg_allowedregexp>
    <constraints>
	<constraint sense="true">
	    <driver>foo2zjs</driver>
	    <arg_defval>ev/foo2zjs-ICM-none</arg_defval>
	</constraint>
	<constraint sense="true">
	    <make>Minolta</make>
	    <model>magicolor 2300 DL</model>
	    <driver>foo2zjs</driver>
	    <arg_defval>ev/foo2zjs-ICM-DL2312</arg_defval>
	</constraint>
	<constraint sense="true">
	    <make>Minolta</make>
	    <model>magicolor 2200 DL</model>
	    <driver>foo2zjs</driver>
	    <arg_defval>ev/foo2zjs-ICM-DL2200RGB</arg_defval>
	</constraint>
    </constraints>
    <enum_vals>
	<enum_val id="ev/foo2zjs-ICM-none">
	    <ev_longname> <en>No ICM color correction</en> </ev_longname>
	    <ev_shortname> <en>None</en> </ev_shortname>
	    <ev_driverval></ev_driverval>
	</enum_val>
	<enum_val id="ev/foo2zjs-ICM-DL2312">
	    <ev_longname> <en>File DL2312.icm</en> </ev_longname>
	    <ev_shortname> <en>DL2312</en> </ev_shortname>
	    <ev_driverval>DL2312.icm</ev_driverval>
	    <constraints>
	        <constraint sense="false">
	    	    <make>HP</make> <model>LaserJet 1000</model>
	        </constraint>
	    </constraints>
	</enum_val>
	<enum_val id="ev/foo2zjs-ICM-DL2324">
	    <ev_longname> <en>File DL2324.icm</en> </ev_longname>
	    <ev_shortname> <en>DL2324</en> </ev_shortname>
	    <ev_driverval>DL2324.icm</ev_driverval>
	    <constraints>
	        <constraint sense="false">
	    	    <make>HP</make> <model>LaserJet 1000</model>
	        </constraint>
	    </constraints>
	</enum_val>

	...

    </enum_vals>
</option>
--------------------------------------------------------------------------

This option allows to choose either one of the given file names,
either by using the "<ev_shortname>"s or the "<ev_driverval>"s, or one
can give every arbitrary other file name with a maximum length of 127
characters, only containing letters, digits, periods, underscores,
dashes, and slashes, and not having a slash in the end (no
directories). Note that in Perl the period must be escaped by a
backslash to be taken literally, otherwise it stands for an arbitrary
character. The regukar expression for blocking out strings ending with
a slash is "(?<!\/)$" (see "man perlre", search for "(?"). Here the
slash is quoted by a backslash. In the XML file the "<" is replaced by
"&lt;" so that the XML structure does not get broken. foomatic-rip
translates this back before applying the regular expression.

To be able to offer strings as an enumerated choice which are not
allowed as an option name in a PPD file, the "<ev_shortname>" may
differ from the "<ev_driverval>", the string inserted at the "%s"
place holder in the "<arg_proto>" is always the "<ev_driverval>",
independent whether the user supplies the "<ev_driverval>" directly or
the "<ev_shortname>". In this example both

   lpr -o ICM= file.ps

and

   lpr -o ICM=None file.ps

supply an empty string as the value of the ICM option.

For the default value there must be an enumerated choice, if there is
none, the PPD generator will create one. So this entry is allowed
(this option is only an example, it is not in the CVS of the Foomatic
database):

--------------------------------------------------------------------------
<option type="password" id="opt/Password">
  <!-- A multilingual <comments> block can appear here, too;
       it should be treated as documentation for the user. -->
  <arg_longname>
   <en>Password (for confidential jobs)</en>
  </arg_longname>
  <arg_shortname>
   <en>Password</en><!-- backends only know <en> shortnames! -->
  </arg_shortname>
  <arg_execution>
   <arg_group>General</arg_group>
   <arg_order>100</arg_order>
   <arg_spot>B</arg_spot>
   <arg_substitution />
   <arg_proto> --pass=%s</arg_proto>
  </arg_execution>
  <arg_maxlength>30</arg_maxlength>
  <arg_allowedchars>A-Za-z0-9\.,_\+\=\:-/</arg_allowedchars>
  <constraints>
     <constraint sense='true'>
      <driver>mydriver</driver>
      <arg_defval></arg_defval>
     </constraint>
  </constraints>
</option>
--------------------------------------------------------------------------

The default value is an empty string here. So the PPD generator will
add a choice for the empty string.

Normally, automatically added choices get the same "<ev_shortname>" as
the string itself, but if the string is not allowed as an option name
in a PPD file, the "<ev_shortname>" will be modified. For an empty
string (as in the example above) "None" will be used and all
characters except numbers, letters, and underscores ("_") will be
replaced by underscores.

The option types "string" and "password" are treated exactly the same
way by the PPD generator and by foomatic-rip, the different names
are only for frontends to know whether the input field should display
the typed characters or asterisks on the screen.


Option Grouping
---------------

All options should be put in groups (with the tags
"<arg_group>...</arg_group>" in the "<arg_execution>" section of the
option XML files, see above). This way many GUIs sort the options into
tabs or tree branches according to the groups. This way one gets only
the most important options on the first tab and not so often needed
ones on additional tabs. This also overrides the automatic option
grouping of CUPS (Groups "General" and "Extra").

It is recommended to have the options in groups as follows (plus
perhaps special groups, but not one group for every option):

General

  Here go options which are most used on a job-by-job basis, as the
  options for paper type, size, and tray, ink type, duplex, ... and
  all options affecting the printout quality, as resolution,
  dithering, ... and especially "PrintoutMode". If a "PrintoutMode"
  option is present, all quality-related options covered by the
  "PrintoutMode" option go into the automatically created
  "PrintoutMode" group (see above). And this is intended, these
  options are now usually controlled by "PrintoutMode" and so they are
  not the most important options for the first tab any more.

  Do not put color/brightness/gamma, ... options here, they go to
  "Adjustment".

  Options typically to go here are:

    o PageSize
    o InputSlot
    o MediaType
    o InkType
    o Duplex
    o PrintoutMode
    o Resolution
    o REt
    o Dither
    o FastRes
    o Economode
    o ...

  All options mentioned after "PrintoutMode" will usually be used as
  member options for "PrintoutMode", they are only in this group when
  there is no "PrintoutMode" option.

PrintoutMode

  This group only exists if there is a "PrintoutMode" option, because
  it is generated by this option. It contains the member options of
  "PrintoutMode". Typical candidates are

    o Resolution
    o REt
    o Dither
    o FastRes
    o Economode
    o ...

  They do not need an "<arg_group>PrintoutMode</arg_group>" line, they
  are put into this group automatically. You should better put an
  "<arg_group>General</arg_group>" line into these options, so that
  they go into the "General" group when there is a printer/driver
  combo for which no "PrintoutMode" option applies.

Adjustment

  Options for correcting the appearance of colors, contrast, ..., for
  head alignment, ... etc. Here most numerical options will go, but
  also things like "Density", also if it is an enumerated choice
  option. Typical candidates are:

    o Gamma
    o Brightness
    o Contrast
    o Density
    o Saturation
    o Cyan
    o Magenta
    o Yellow
    o ...

Finishing

  If a printer has a stapler, folder, cutter, envelope packer, or
  similar devices to do additional processing on the ready printout,
  the options to control this stuff go into this group. Examples:

    o Stapling
    o Binding
    o Cutting
    o Booklet
    o ...

Miscellaneous

  Options which do not fit into the mentioned groups and for which it
  is not worth to make a special group.


Unprintable margins
-------------------

On most printers you cannot print arbitrarily close to the borders of
the paper. You usually will have margins of certain width on which you
cannot print. For filters and applkication programs to know about
these margins PPD file have "*ImageableArea" lines which define the
positions of the lower, the upper, the left, and the right borders of
the area on which the printer can print. There is one line for each
paper size listed in the "*PageSize" option.

To conveniently generating these lines one can use the following XML
structure in the Foomatic database entries:

--------------------------------------------------------------------------
<margins>
     <general>
       <!-- The margins here are valid for every paper size for -->
       <!-- which there is no "exception" section -->
       <!-- ---------- -->
       <!-- possible units: -->
       <!-- pt, inches, mm, cm,
       <!-- dotsNNNdpi (NNN: resolution in which dots are counted) -->
       <!-- if "unit" not present, default unit is pt -->
       <!-- ---------- -->
       <!-- if a margin is not present, default width is 0 -->
       <!-- ---------- -->
       <!-- a missing "general" section assumes zero borders as the -->
       <!-- general borders and "pt" as the default unit for -->
       <!-- "exceptions". -->
       <unit>pt</unit>
       <top>9</top>
       <bottom>36</bottom>
       <left>18</left>
       <right>18</right>
     </general>
     <exception PageSize="Photo4x6TearoffTab">
       <!-- if one or more of "unit", "top", "bottom", "left", -->
       <!-- "right" is missing, the appropriate item of the "general" -->
       <!-- section is used -->
       <top>0</top>
       <left>0</left>
       <right>0</right>
     </exception>
     <exception PageSize="A4">
       <!-- It is also possible to give absolute values in PostScript -->
       <!-- coordinates where the origin is the lower left corner. To -->
       <!-- do so, the <absolute /> tag has to be added, otherwise -->
       <!-- the values are the widths of the unprintable margins -->
       <absolute />
       <left>10</left>
       <right>585</right>
     </exception>
     <exception PageSize="...">
       ...
     </exception>
     ...
<margins>
--------------------------------------------------------------------------

This structure is allowed in printer entries in the "<mechanism>" 
section and in driver entries in the "<execution>" section or inside a 
"<printer>" entry of the driver's printer list. In the "<execution>" 
section of a driver entry the margins are valid for all printers used 
with this driver, in a "<printer>" entry they apply only to the given 
printer/driver combo.

The shown example could be for the HP PhotoSmart 7150/7350, which does 
full-bleed only on HP's special photo paper with an 0.5 inch wide 
tear-off tab on the lower border (and some other paper sizes used in the 
photo tray). On all other paper sizes the printer leaves white borders 
of half an inch at the top and at the bottom and a quarter of an inch on 
the left and right hand side (1 inch are 72 pt). In addition, the page 
size "A4" allows to print up to 10 points to the left and the right borders.

At first we give the general borders ("<general>" section) where we 
choose the unit "pt" (PostScript points) for the numbers. These borders 
are valid for all paper sizes which are not explicitly mentioned with an 
"<exception ...>" section. For our printers one of the exceptions is the 
4x6 photo paper with the tear-off tab (including the tab the paper is 
4x6.5 inches large). here the printer prints up to the left, right, and 
top borders. Therefore we have margins of zero here. At the lower border 
the printer still leaves half an inch white (therefore probably HP 
introduced the tear-off tab), so we keep the 36 pt of the "<general>" 
section by not mentioning a new lower border. For A4 we redefine the 
left and the right border. This is also possible in absolute PostScript 
coordinates measured from the lower left corner, as we do here. We 
indicate this with the "<absolute />" tag. The left border is at 10 pt 
from the left, and as A4 paper is 595 pt wide, the right border is at 
585 points from the left.

One hint for the choice of the units: Float numbers as border widths are 
allowed, but it is recommended for having exact info to choose a unit 
which gives integer numbers for the widths (which is always possible 
with the "dotsNNNdpi" unit with NNN being the maximum resolution of the 
printer).

A "<margins>" section in a printer entry should represent the printer's 
hardware capabilities. Such a section in a driver entry should represent 
how the driver's limitations are. If there are margins defined in both 
the printer and the driver entry of the desired printer/driver combo, 
the more restrictive (wider) borders count. If there are no border 
definitions in both the printer and the driver entry, the borders are 
assumed to be of zero width (full-bleed).


Adding arbitrary extra entries to the PPD file
----------------------------------------------

The "<ppdentry>" tags allow to add extra lines to the PPD file. The 
tags can be put into the top level ("<printer>") of a printer XML entry, 
into the "<execution>" section of a driver XML entry, or into the 
"<printer>" entries of the printer list in a driver XML file. They serve 
mainly to put a default resolution into PPD files for drivers without 
"Resolution" option. Examples:

"hpijs"  driver, default resolution for HP DeskJet 350. For this driver 
the default resolution depends on the printer class. Therefore the 
appropriate "<ppdentry>"s have to be in the printer entries of the 
printer list:

--------------------------------------------------------------------------
<driver id="driver/hpijs">
  <name>hpijs</name>
  ...
  <printers>
   <printer>
    <id>printer/HP-DeskJet_350C</id><!-- HP DeskJet 350C -->
    <ppdentry>
      *DefaultResolution: 600dpi
    </ppdentry>
    <margins>
     <general>
      <unit>in</unit>
      <relative />
      <left>0.25</left>
      <right>0.25</right>
      <top>0.125</top>
      <bottom>0.67</bottom>
     </general>
     <exception PageSize="A4">
      <left>0.135</left>
      <right>0.135</right>
     </exception>
    </margins>
   </printer>
   ...
  </printers>
</driver>
--------------------------------------------------------------------------

"pnm2ppa" driver: This driver has no "Resolution" option, and all 
printers print in 600 dpi with it. So we put the "<ppdentry>" into the 
"<execution>" section:

--------------------------------------------------------------------------
<driver id="driver/pnm2ppa">
  <name>pnm2ppa</name>
  <url>http://sourceforge.net/projects/pnm2ppa/</url>
  <execution>
   <filter />
   <prototype>gs -q -dNOPAUSE -dPARANOIDSAFER -dBATCH -r600%A%Z 
-sOutputFile=- - | pnm2ppa%C%B -i - -o -</prototype>
   <ppdentry>
    *DefaultResolution: 600dpi
   </ppdentry>
  </execution>
  ...
</driver>
--------------------------------------------------------------------------

Note that leading spaces are removed from the lines between the
"<ppdentry>" tags before they get inserted into the PPD file.

The lines are added at the end of the PPD file header, right after the
lines for the basic hardware capabilities of the printer.


Example for a Foomatic-generated PPD file
-----------------------------------------

This is an example PPD file, the PPD file for the Citizen printiva600U
used with the "ppmtomd" driver. It was generated with the command line

   ./foomatic-ppdfile -p Citizen-printiva600U -d ppmtomd

(Note that the group tags in this example are added manually, they are
 only an example to show how the option grouping for this combo could
 look like. It can be different to the actual implementation in the
 foomatic-db package).

The structure is completely Adobe-compliant and no information is in
comments. Besides the usual keywords which one finds in PPDs there are some
special ones beginning with "*Foomatic...". These keywords are read by
foomatic-rip and contain all information to build the renderer's command
line. See explanations for these keywords below the example file.

If a printer has auto-detection information in the Foomatic database,
the manufacturer and model names from there are inserted in the
"*Manufacturer:" and "*Product:" fields and the IEEE-1284 ID string is
put into the "*1284DeviceID:" field.

----------------------------------------------------------------------------
*PPD-Adobe: "4.3"
*%
*% For information on using this, and to obtain the required backend
*% script, consult http://www.openprinting.org/
*%
*% This file is published under the GNU General Public License
*%
*% PPD-O-MATIC (3.0.0 or newer) generated this PPD file. It is for use with
*% all programs and environments which use PPD files for dealing with
*% printer capability information. The printer must be configured with the
*% "foomatic-rip" backend filter script of Foomatic 3.0.0 or newer. This
*% file and "foomatic-rip" work together to support PPD-controlled printer
*% driver option access with arbitrary free software printer drivers and
*% printing spoolers.
*%
*% To save this file on your disk, wait until the download has completed
*% (the animation of the browser logo must stop) and then use the
*% "Save as..." command in the "File" menu of your browser or in the
*% pop-up manu when you click on this document with the right mouse button.
*% DO NOT cut and paste this file into an editor with your mouse. This can
*% introduce additional line breaks which lead to unexpected results.
*%
*% You may save this file as 'Citizen-printiva600U-ppmtomd.ppd'
*%
*%
*FormatVersion:	"4.3"
*FileVersion:	"1.1"
*LanguageVersion: English 
*LanguageEncoding: ISOLatin1
*PCFileName:	"PPMTOMD.PPD"
*Manufacturer:	"Citizen"
*Product:	"(printiva600U)"
*cupsVersion:	1.0
*cupsManualCopies: True
*cupsModelNumber:  2
*cupsFilter:	"application/vnd.cups-postscript 0 foomatic-rip"
*%pprRIP:        foomatic-rip other
*ModelName:     "Citizen printiva600U"
*NickName:      "Citizen printiva600U, Foomatic + ppmtomd"
*ShortNickName: "Citizen printiva600U, ppmtomd"
*PSVersion:	"(3010.000) 550"
*PSVersion:	"(3010.000) 651"
*PSVersion:	"(3010.000) 652"
*PSVersion:	"(3010.000) 653"
*PSVersion:	"(3010.000) 704"
*PSVersion:	"(3010.000) 705"
*PSVersion:	"(3010.000) 800"
*LanguageLevel:	"3"
*ColorDevice:	True
*DefaultColorSpace: RGB
*FileSystem:	False
*Throughput:	"1"
*LandscapeOrientation: Plus90
*TTRasterizer:	Type42

 
*VariablePaperSize: False

*FoomaticIDs: Citizen-printiva600U ppmtomd
*FoomaticRIPCommandLine: "gs -q -dNOPAUSE -dBATCH -dPARANOIDSAFER -sDE&&
VICE=ppmraw -sOutputFile=-%A%B -informat Colour%C"
*End

*FoomaticRIPOption Model: enum CmdLine C 210
*FoomaticRIPOptionSetting Model=Printiva-600U: " -model Printiva-600U"

*OpenGroup: General/General

*OpenUI *PageSize/Page Size and Printing Quality: PickOne
*FoomaticRIPOption PageSize: enum CmdLine B
*OrderDependency: 100 AnySetup *PageSize
*DefaultPageSize: Letter
*PageSize Letter/Letter, 600x600 DPI: "%% FoomaticRIPOptionSetting: PageSize=Letter"
*FoomaticRIPOptionSetting PageSize=Letter: " -sPAPERSIZE=letter -r600x&&
600 - | ppmtomd -autoshift -papersize Letter"
*End
*PageSize A4/A4, 600x600 DPI: "%% FoomaticRIPOptionSetting: PageSize=A4"
*FoomaticRIPOptionSetting PageSize=A4: " -sPAPERSIZE=a4 -r600x600 - | &&
ppmtomd -autoshift -papersize A4"
*End
*PageSize A4HR/A4, 1200x600 DPI: "%% FoomaticRIPOptionSetting: PageSize=A4HR"
*FoomaticRIPOptionSetting PageSize=A4HR: " -sPAPERSIZE=a4 -r1200x600 -&&
 | ppmtomd -resolution 1200 -inresolution 1200 -autoshift -papersize A&&
4"
*End
*PageSize B5/B5, 600x600 DPI: "%% FoomaticRIPOptionSetting: PageSize=B5"
*FoomaticRIPOptionSetting PageSize=B5: " -sPAPERSIZE=b5 -r600x600 - | &&
ppmtomd -autoshift -papersize B5"
*End
*PageSize B5HR/B5, 1200x600 DPI: "%% FoomaticRIPOptionSetting: PageSize=B5HR"
*FoomaticRIPOptionSetting PageSize=B5HR: " -sPAPERSIZE=b5 -r1200x600 -&&
 | ppmtomd -resolution 1200 -inresolution 1200 -autoshift -papersize B&&
5"
*End
*PageSize Executive/Executive, 600x600 DPI: "%% FoomaticRIPOptionSetting: PageSize=Executive"
*FoomaticRIPOptionSetting PageSize=Executive: " -sPAPERSIZE=executive &&
-r600x600 - | ppmtomd -autoshift -papersize Executive"
*End
*PageSize ExecutiveHR/Executive, 1200x600 DPI: "%% FoomaticRIPOptionSetting: PageSize=ExecutiveHR"
*FoomaticRIPOptionSetting PageSize=ExecutiveHR: " -sPAPERSIZE=executiv&&
e -r1200x600 - | ppmtomd -resolution 1200 -inresolution 1200 -autoshif&&
t -papersize Executive"
*End
*PageSize Legal/Legal, 600x600 DPI: "%% FoomaticRIPOptionSetting: PageSize=Legal"
*FoomaticRIPOptionSetting PageSize=Legal: " -sPAPERSIZE=legal -r600x60&&
0 - | ppmtomd -autoshift -papersize Legal"
*End
*PageSize LegalHR/Legal, 1200x600 DPI: "%% FoomaticRIPOptionSetting: PageSize=LegalHR"
*FoomaticRIPOptionSetting PageSize=LegalHR: " -sPAPERSIZE=legal -r1200&&
x600 - | ppmtomd -resolution 1200 -inresolution 1200 -autoshift -paper&&
size Legal"
*End
*PageSize LetterHR/Letter, 1200x600 DPI: "%% FoomaticRIPOptionSetting: PageSize=LetterHR"
*FoomaticRIPOptionSetting PageSize=LetterHR: " -sPAPERSIZE=letter -r12&&
00x600 - | ppmtomd -resolution 1200 -inresolution 1200 -autoshift -pap&&
ersize Letter"
*End
*CloseUI: *PageSize

*OpenUI *PageRegion: PickOne
*OrderDependency: 100 AnySetup *PageRegion
*DefaultPageRegion: Letter
*PageRegion Letter/Letter, 600x600 DPI: "%% FoomaticRIPOptionSetting: PageSize=Letter"
*PageRegion A4/A4, 600x600 DPI: "%% FoomaticRIPOptionSetting: PageSize=A4"
*PageRegion A4HR/A4, 1200x600 DPI: "%% FoomaticRIPOptionSetting: PageSize=A4HR"
*PageRegion B5/B5, 600x600 DPI: "%% FoomaticRIPOptionSetting: PageSize=B5"
*PageRegion B5HR/B5, 1200x600 DPI: "%% FoomaticRIPOptionSetting: PageSize=B5HR"
*PageRegion Executive/Executive, 600x600 DPI: "%% FoomaticRIPOptionSetting: PageSize=Executive"
*PageRegion ExecutiveHR/Executive, 1200x600 DPI: "%% FoomaticRIPOptionSetting: PageSize=ExecutiveHR"
*PageRegion Legal/Legal, 600x600 DPI: "%% FoomaticRIPOptionSetting: PageSize=Legal"
*PageRegion LegalHR/Legal, 1200x600 DPI: "%% FoomaticRIPOptionSetting: PageSize=LegalHR"
*PageRegion LetterHR/Letter, 1200x600 DPI: "%% FoomaticRIPOptionSetting: PageSize=LetterHR"
*CloseUI: *PageRegion

*DefaultImageableArea: Letter
*ImageableArea Letter/Letter, 600x600 DPI: "0 0 612 792"
*ImageableArea A4/A4, 600x600 DPI: "0 0 595 842"
*ImageableArea A4HR/A4, 1200x600 DPI: "0 0 595 842"
*ImageableArea B5/B5, 600x600 DPI: "0 0 498 708"
*ImageableArea B5HR/B5, 1200x600 DPI: "0 0 498 708"
*ImageableArea Executive/Executive, 600x600 DPI: "0 0 522 756"
*ImageableArea ExecutiveHR/Executive, 1200x600 DPI: "0 0 522 756"
*ImageableArea Legal/Legal, 600x600 DPI: "0 0 612 1008"
*ImageableArea LegalHR/Legal, 1200x600 DPI: "0 0 612 1008"
*ImageableArea LetterHR/Letter, 1200x600 DPI: "0 0 612 792"

*DefaultPaperDimension: Letter
*PaperDimension Letter/Letter, 600x600 DPI: "612 792"
*PaperDimension A4/A4, 600x600 DPI: "595 842"
*PaperDimension A4HR/A4, 1200x600 DPI: "595 842"
*PaperDimension B5/B5, 600x600 DPI: "498 708"
*PaperDimension B5HR/B5, 1200x600 DPI: "498 708"
*PaperDimension Executive/Executive, 600x600 DPI: "522 756"
*PaperDimension ExecutiveHR/Executive, 1200x600 DPI: "522 756"
*PaperDimension Legal/Legal, 600x600 DPI: "612 1008"
*PaperDimension LegalHR/Legal, 1200x600 DPI: "612 1008"
*PaperDimension LetterHR/Letter, 1200x600 DPI: "612 792"

*OpenUI *PrintingMode/Printing Mode: PickOne
*FoomaticRIPOption PrintingMode: enum CmdLine C
*OrderDependency: 130 AnySetup *PrintingMode
*DefaultPrintingMode: Colour
*PrintingMode Black/Monochrome printing, standard black cartridge: "%% FoomaticRIPOptionSetting: PrintingMode=Black"
*FoomaticRIPOptionSetting PrintingMode=Black: " -datamode Black"
*PrintingMode Cassette/Do not care about cartridges, colours one page at a time: "%% FoomaticRIPOptionSetting: PrintingMode=Cassette"
*FoomaticRIPOptionSetting PrintingMode=Cassette: " -datamode Cassette"
*PrintingMode Colour/Colours one page at a time: "%% FoomaticRIPOptionSetting: PrintingMode=Colour"
*FoomaticRIPOptionSetting PrintingMode=Colour: " -datamode Colour"
*PrintingMode EconoBlack/Monochrome printing, re-usable economy black cartridge: "%% FoomaticRIPOptionSetting: PrintingMode=EconoBlack"
*FoomaticRIPOptionSetting PrintingMode=EconoBlack: " -datamode EconoBl&&
ack"
*End
*PrintingMode MultiColour/More than 4 colours, colours one page at a time: "%% FoomaticRIPOptionSetting: PrintingMode=MultiColour"
*FoomaticRIPOptionSetting PrintingMode=MultiColour: " -datamode MultiC&&
olour"
*End
*PrintingMode RasterCassette/Do not care about cartridges, each line in all colours: "%% FoomaticRIPOptionSetting: PrintingMode=RasterCassette"
*FoomaticRIPOptionSetting PrintingMode=RasterCassette: " -datamode Ras&&
terCassette"
*End
*PrintingMode RasterColour/Each line in all colours: "%% FoomaticRIPOptionSetting: PrintingMode=RasterColour"
*FoomaticRIPOptionSetting PrintingMode=RasterColour: " -datamode Raste&&
rColour"
*End
*CloseUI: *PrintingMode

*OpenUI *Dither/Dithering: PickOne
*FoomaticRIPOption Dither: enum CmdLine C
*OrderDependency: 140 AnySetup *Dither
*DefaultDither: Halftone
*Dither Black/Monochrome printing, standard black cartridge: "%% FoomaticRIPOptionSetting: Dither=Black"
*FoomaticRIPOptionSetting Dither=Black: " -dither Black"
*Dither EconoBlack/Monochrome printing, re-usable economy black cartridge: "%% FoomaticRIPOptionSetting: Dither=EconoBlack"
*FoomaticRIPOptionSetting Dither=EconoBlack: " -dither EconoBlack"
*Dither FloydSteinberg/Floyd-Steinberg (not recommended for MicroDry): "%% FoomaticRIPOptionSetting: Dither=FloydSteinberg"
*FoomaticRIPOptionSetting Dither=FloydSteinberg: " -dither FloydSteinb&&
erg"
*End
*Dither Halftone/Halftone (recommended for general use): "%% FoomaticRIPOptionSetting: Dither=Halftone"
*FoomaticRIPOptionSetting Dither=Halftone: " -dither Halftone"
*Dither MultiColour/More than 4 colours, colours one page at a time: "%% FoomaticRIPOptionSetting: Dither=MultiColour"
*FoomaticRIPOptionSetting Dither=MultiColour: " -dither MultiColour"
*Dither None/No dithering: "%% FoomaticRIPOptionSetting: Dither=None"
*FoomaticRIPOptionSetting Dither=None: " -dither None"
*Dither Square/Square (experimental, not recommended): "%% FoomaticRIPOptionSetting: Dither=Square"
*FoomaticRIPOptionSetting Dither=Square: " -dither Square"
*CloseUI: *Dither

*OpenUI *ColourCorrection/Colour Correction: PickOne
*FoomaticRIPOption ColourCorrection: enum CmdLine C
*OrderDependency: 110 AnySetup *ColourCorrection
*DefaultColourCorrection: Plain
*ColourCorrection Plain/Plain (RGB --> CMYK): "%% FoomaticRIPOptionSetting: ColourCorrection=Plain"
*FoomaticRIPOptionSetting ColourCorrection=Plain: " -colourcorrection &&
Plain"
*End
*ColourCorrection None/None (RGB --> CMY): "%% FoomaticRIPOptionSetting: ColourCorrection=None"
*FoomaticRIPOptionSetting ColourCorrection=None: " -colourcorrection N&&
one"
*End
*ColourCorrection Photo/Photo (CMYK, gamma corrcetion, ...): "%% FoomaticRIPOptionSetting: ColourCorrection=Photo"
*FoomaticRIPOptionSetting ColourCorrection=Photo: " -colourcorrection &&
Photo"
*End
*CloseUI: *ColourCorrection

*OpenUI *KeepBlack/Keep pure black: Boolean
*FoomaticRIPOption KeepBlack: bool CmdLine C
*FoomaticRIPOptionSetting KeepBlack: " -keepblack"
*OrderDependency: 190 AnySetup *KeepBlack
*DefaultKeepBlack: False
*KeepBlack True/KeepBlack: "%% FoomaticRIPOptionSetting: KeepBlack=True"
*KeepBlack False/CorrectBlack: "%% FoomaticRIPOptionSetting: KeepBlack=False"
*CloseUI: *KeepBlack

*OpenUI *UseMultiColourRibbon/Use multi-colour ribbon: Boolean
*FoomaticRIPOption UseMultiColourRibbon: bool CmdLine C
*FoomaticRIPOptionSetting UseMultiColourRibbon: " -usemulticolourribbo&&
n"
*End
*OrderDependency: 260 AnySetup *UseMultiColourRibbon
*DefaultUseMultiColourRibbon: False
*UseMultiColourRibbon True/UseMultiColourRibbon: "%% FoomaticRIPOptionSetting: UseMultiColourRibbon=True"
*UseMultiColourRibbon False/UseStandardRibbons: "%% FoomaticRIPOptionSetting: UseMultiColourRibbon=False"
*CloseUI: *UseMultiColourRibbon

*CloseGroup: General

*OpenGroup: CombinedJobs/Combined Jobs

*OpenUI *JobType/Job Type: PickOne
*FoomaticRIPOption JobType: enum CmdLine C
*OrderDependency: 150 AnySetup *JobType
*DefaultJobType: SinglePass
*JobType MiddlePass/Middle pass of an overlayed printout: "%% FoomaticRIPOptionSetting: JobType=MiddlePass"
*FoomaticRIPOptionSetting JobType=MiddlePass: " -midpass"
*JobType FirstPass/First pass of an overlayed printout: "%% FoomaticRIPOptionSetting: JobType=FirstPass"
*FoomaticRIPOptionSetting JobType=FirstPass: " -firstpass"
*JobType LastPass/Last pass of an overlayed printout: "%% FoomaticRIPOptionSetting: JobType=LastPass"
*FoomaticRIPOptionSetting JobType=LastPass: " -lastpass"
*JobType SinglePass/Single Pass Job: "%% FoomaticRIPOptionSetting: JobType=SinglePass"
*FoomaticRIPOptionSetting JobType=SinglePass: ""
*CloseUI: *JobType

*OpenUI *Overlay/Print next job over the current one: Boolean
*FoomaticRIPOption Overlay: bool CmdLine C
*FoomaticRIPOptionSetting Overlay: " -overlay"
*OrderDependency: 230 AnySetup *Overlay
*DefaultOverlay: False
*Overlay True/Overlay: "%% FoomaticRIPOptionSetting: Overlay=True"
*Overlay False/DoNotOverlay: "%% FoomaticRIPOptionSetting: Overlay=False"
*CloseUI: *Overlay

*OpenUI *NoReset/Reset after job: Boolean
*FoomaticRIPOption NoReset: bool CmdLine C
*FoomaticRIPOptionSetting NoReset: " -noreset"
*OrderDependency: 220 AnySetup *NoReset
*DefaultNoReset: False
*NoReset True/NoReset: "%% FoomaticRIPOptionSetting: NoReset=True"
*NoReset False/Reset: "%% FoomaticRIPOptionSetting: NoReset=False"
*CloseUI: *NoReset

*CloseGroup: CombinedJobs

*OpenGroup: Finishing/Finishing

*OpenUI *CurlCorrection/Curl Correction: PickOne
*FoomaticRIPOption CurlCorrection: enum CmdLine C
*OrderDependency: 160 AnySetup *CurlCorrection
*DefaultCurlCorrection: Default
*CurlCorrection Default/Default behaviour: "%% FoomaticRIPOptionSetting: CurlCorrection=Default"
*FoomaticRIPOptionSetting CurlCorrection=Default: ""
*CurlCorrection Always/Always: "%% FoomaticRIPOptionSetting: CurlCorrection=Always"
*FoomaticRIPOptionSetting CurlCorrection=Always: " -forcecurlcorrectio&&
n"
*End
*CurlCorrection Never/Never: "%% FoomaticRIPOptionSetting: CurlCorrection=Never"
*FoomaticRIPOptionSetting CurlCorrection=Never: " -nocurlcorrection"
*CloseUI: *CurlCorrection

*OpenUI *Glossy/Glossy finishing: Boolean
*FoomaticRIPOption Glossy: bool CmdLine C
*FoomaticRIPOptionSetting Glossy: " -glossy"
*OrderDependency: 170 AnySetup *Glossy
*DefaultGlossy: False
*Glossy True/Glossy: "%% FoomaticRIPOptionSetting: Glossy=True"
*Glossy False/noGlossy: "%% FoomaticRIPOptionSetting: Glossy=False"
*CloseUI: *Glossy

*CloseGroup: Finishing

*OpenGroup: Adjustment/Adjustment

*OpenUI *Colours/Colours to be printed: PickOne
*FoomaticRIPOption Colours: enum CmdLine C
*OrderDependency: 120 AnySetup *Colours
*DefaultColours: CMYK
*Colours C/Cyan only: "%% FoomaticRIPOptionSetting: Colours=C"
*FoomaticRIPOptionSetting Colours=C: " -colours c"
*Colours CK/Cyan, Black: "%% FoomaticRIPOptionSetting: Colours=CK"
*FoomaticRIPOptionSetting Colours=CK: " -colours c,k"
*Colours CM/Cyan, Magenta: "%% FoomaticRIPOptionSetting: Colours=CM"
*FoomaticRIPOptionSetting Colours=CM: " -colours c,m"
*Colours CMK/Cyan, Magenta, Black: "%% FoomaticRIPOptionSetting: Colours=CMK"
*FoomaticRIPOptionSetting Colours=CMK: " -colours c,m,k"
*Colours CMY/Cyan, Magenta, Yellow: "%% FoomaticRIPOptionSetting: Colours=CMY"
*FoomaticRIPOptionSetting Colours=CMY: " -colours c,m,y"
*Colours CMYK/Cyan, Magenta, Yellow, Black: "%% FoomaticRIPOptionSetting: Colours=CMYK"
*FoomaticRIPOptionSetting Colours=CMYK: " -colours c,m,y,k"
*Colours CY/Cyan, Yellow: "%% FoomaticRIPOptionSetting: Colours=CY"
*FoomaticRIPOptionSetting Colours=CY: " -colours c,y"
*Colours CYK/Cyan, Yellow, Black: "%% FoomaticRIPOptionSetting: Colours=CYK"
*FoomaticRIPOptionSetting Colours=CYK: " -colours c,y,k"
*Colours K/Black only: "%% FoomaticRIPOptionSetting: Colours=K"
*FoomaticRIPOptionSetting Colours=K: " -colours k"
*Colours M/Magenta only: "%% FoomaticRIPOptionSetting: Colours=M"
*FoomaticRIPOptionSetting Colours=M: " -colours m"
*Colours MK/Magenta, Black: "%% FoomaticRIPOptionSetting: Colours=MK"
*FoomaticRIPOptionSetting Colours=MK: " -colours m,k"
*Colours MY/Magenta, Yellow: "%% FoomaticRIPOptionSetting: Colours=MY"
*FoomaticRIPOptionSetting Colours=MY: " -colours m,y"
*Colours MYK/Magenta, Yellow, Black: "%% FoomaticRIPOptionSetting: Colours=MYK"
*FoomaticRIPOptionSetting Colours=MYK: " -colours m,y,k"
*Colours None/None: "%% FoomaticRIPOptionSetting: Colours=None"
*FoomaticRIPOptionSetting Colours=None: " -colours none"
*Colours Y/Yellow only: "%% FoomaticRIPOptionSetting: Colours=Y"
*FoomaticRIPOptionSetting Colours=Y: " -colours y"
*Colours YK/Yellow, Black: "%% FoomaticRIPOptionSetting: Colours=YK"
*FoomaticRIPOptionSetting Colours=YK: " -colours y,k"
*CloseUI: *Colours

*OpenUI *GammaCorrection/Gamma Correction: PickOne
*FoomaticRIPOption GammaCorrection: float CmdLine C
*FoomaticRIPOptionPrototype GammaCorrection: " -gamma %s"
*FoomaticRIPOptionRange GammaCorrection: 0.10 10.0
*OrderDependency: 180 AnySetup *GammaCorrection
*DefaultGammaCorrection: 1.0
*FoomaticRIPDefaultGammaCorrection: 1.0
*GammaCorrection 0.1/0.1: "%% FoomaticRIPOptionSetting: GammaCorrection=0.1"
*GammaCorrection 0.2/0.2: "%% FoomaticRIPOptionSetting: GammaCorrection=0.2"
*GammaCorrection 0.3/0.3: "%% FoomaticRIPOptionSetting: GammaCorrection=0.3"
*GammaCorrection 0.4/0.4: "%% FoomaticRIPOptionSetting: GammaCorrection=0.4"
*GammaCorrection 0.5/0.5: "%% FoomaticRIPOptionSetting: GammaCorrection=0.5"
*GammaCorrection 0.6/0.6: "%% FoomaticRIPOptionSetting: GammaCorrection=0.6"
*GammaCorrection 0.7/0.7: "%% FoomaticRIPOptionSetting: GammaCorrection=0.7"
*GammaCorrection 0.8/0.8: "%% FoomaticRIPOptionSetting: GammaCorrection=0.8"
*GammaCorrection 0.9/0.9: "%% FoomaticRIPOptionSetting: GammaCorrection=0.9"
*GammaCorrection 1.0/1.0: "%% FoomaticRIPOptionSetting: GammaCorrection=1.0"
*GammaCorrection 1.1/1.1: "%% FoomaticRIPOptionSetting: GammaCorrection=1.1"
*GammaCorrection 1.2/1.2: "%% FoomaticRIPOptionSetting: GammaCorrection=1.2"
*GammaCorrection 1.3/1.3: "%% FoomaticRIPOptionSetting: GammaCorrection=1.3"
*GammaCorrection 1.4/1.4: "%% FoomaticRIPOptionSetting: GammaCorrection=1.4"
*GammaCorrection 1.5/1.5: "%% FoomaticRIPOptionSetting: GammaCorrection=1.5"
*GammaCorrection 1.6/1.6: "%% FoomaticRIPOptionSetting: GammaCorrection=1.6"
*GammaCorrection 1.7/1.7: "%% FoomaticRIPOptionSetting: GammaCorrection=1.7"
*GammaCorrection 1.8/1.8: "%% FoomaticRIPOptionSetting: GammaCorrection=1.8"
*GammaCorrection 1.9/1.9: "%% FoomaticRIPOptionSetting: GammaCorrection=1.9"
*GammaCorrection 2.0/2.0: "%% FoomaticRIPOptionSetting: GammaCorrection=2.0"
*GammaCorrection 2.1/2.1: "%% FoomaticRIPOptionSetting: GammaCorrection=2.1"
*GammaCorrection 2.2/2.2: "%% FoomaticRIPOptionSetting: GammaCorrection=2.2"
*GammaCorrection 2.3/2.3: "%% FoomaticRIPOptionSetting: GammaCorrection=2.3"
*GammaCorrection 2.4/2.4: "%% FoomaticRIPOptionSetting: GammaCorrection=2.4"
*GammaCorrection 2.5/2.5: "%% FoomaticRIPOptionSetting: GammaCorrection=2.5"
*GammaCorrection 2.6/2.6: "%% FoomaticRIPOptionSetting: GammaCorrection=2.6"
*GammaCorrection 2.7/2.7: "%% FoomaticRIPOptionSetting: GammaCorrection=2.7"
*GammaCorrection 2.8/2.8: "%% FoomaticRIPOptionSetting: GammaCorrection=2.8"
*GammaCorrection 2.9/2.9: "%% FoomaticRIPOptionSetting: GammaCorrection=2.9"
*GammaCorrection 3.0/3.0: "%% FoomaticRIPOptionSetting: GammaCorrection=3.0"
*GammaCorrection 3.1/3.1: "%% FoomaticRIPOptionSetting: GammaCorrection=3.1"
*GammaCorrection 3.2/3.2: "%% FoomaticRIPOptionSetting: GammaCorrection=3.2"
*GammaCorrection 3.3/3.3: "%% FoomaticRIPOptionSetting: GammaCorrection=3.3"
*GammaCorrection 3.4/3.4: "%% FoomaticRIPOptionSetting: GammaCorrection=3.4"
*GammaCorrection 3.5/3.5: "%% FoomaticRIPOptionSetting: GammaCorrection=3.5"
*GammaCorrection 3.6/3.6: "%% FoomaticRIPOptionSetting: GammaCorrection=3.6"
*GammaCorrection 3.7/3.7: "%% FoomaticRIPOptionSetting: GammaCorrection=3.7"
*GammaCorrection 3.8/3.8: "%% FoomaticRIPOptionSetting: GammaCorrection=3.8"
*GammaCorrection 3.9/3.9: "%% FoomaticRIPOptionSetting: GammaCorrection=3.9"
*GammaCorrection 4.0/4.0: "%% FoomaticRIPOptionSetting: GammaCorrection=4.0"
*GammaCorrection 4.1/4.1: "%% FoomaticRIPOptionSetting: GammaCorrection=4.1"
*GammaCorrection 4.2/4.2: "%% FoomaticRIPOptionSetting: GammaCorrection=4.2"
*GammaCorrection 4.3/4.3: "%% FoomaticRIPOptionSetting: GammaCorrection=4.3"
*GammaCorrection 4.4/4.4: "%% FoomaticRIPOptionSetting: GammaCorrection=4.4"
*GammaCorrection 4.5/4.5: "%% FoomaticRIPOptionSetting: GammaCorrection=4.5"
*GammaCorrection 4.6/4.6: "%% FoomaticRIPOptionSetting: GammaCorrection=4.6"
*GammaCorrection 4.7/4.7: "%% FoomaticRIPOptionSetting: GammaCorrection=4.7"
*GammaCorrection 4.8/4.8: "%% FoomaticRIPOptionSetting: GammaCorrection=4.8"
*GammaCorrection 4.9/4.9: "%% FoomaticRIPOptionSetting: GammaCorrection=4.9"
*GammaCorrection 5.0/5.0: "%% FoomaticRIPOptionSetting: GammaCorrection=5.0"
*GammaCorrection 5.1/5.1: "%% FoomaticRIPOptionSetting: GammaCorrection=5.1"
*GammaCorrection 5.2/5.2: "%% FoomaticRIPOptionSetting: GammaCorrection=5.2"
*GammaCorrection 5.3/5.3: "%% FoomaticRIPOptionSetting: GammaCorrection=5.3"
*GammaCorrection 5.4/5.4: "%% FoomaticRIPOptionSetting: GammaCorrection=5.4"
*GammaCorrection 5.5/5.5: "%% FoomaticRIPOptionSetting: GammaCorrection=5.5"
*GammaCorrection 5.6/5.6: "%% FoomaticRIPOptionSetting: GammaCorrection=5.6"
*GammaCorrection 5.7/5.7: "%% FoomaticRIPOptionSetting: GammaCorrection=5.7"
*GammaCorrection 5.8/5.8: "%% FoomaticRIPOptionSetting: GammaCorrection=5.8"
*GammaCorrection 5.9/5.9: "%% FoomaticRIPOptionSetting: GammaCorrection=5.9"
*GammaCorrection 6.0/6.0: "%% FoomaticRIPOptionSetting: GammaCorrection=6.0"
*GammaCorrection 6.1/6.1: "%% FoomaticRIPOptionSetting: GammaCorrection=6.1"
*GammaCorrection 6.2/6.2: "%% FoomaticRIPOptionSetting: GammaCorrection=6.2"
*GammaCorrection 6.3/6.3: "%% FoomaticRIPOptionSetting: GammaCorrection=6.3"
*GammaCorrection 6.4/6.4: "%% FoomaticRIPOptionSetting: GammaCorrection=6.4"
*GammaCorrection 6.5/6.5: "%% FoomaticRIPOptionSetting: GammaCorrection=6.5"
*GammaCorrection 6.6/6.6: "%% FoomaticRIPOptionSetting: GammaCorrection=6.6"
*GammaCorrection 6.7/6.7: "%% FoomaticRIPOptionSetting: GammaCorrection=6.7"
*GammaCorrection 6.8/6.8: "%% FoomaticRIPOptionSetting: GammaCorrection=6.8"
*GammaCorrection 6.9/6.9: "%% FoomaticRIPOptionSetting: GammaCorrection=6.9"
*GammaCorrection 7.0/7.0: "%% FoomaticRIPOptionSetting: GammaCorrection=7.0"
*GammaCorrection 7.1/7.1: "%% FoomaticRIPOptionSetting: GammaCorrection=7.1"
*GammaCorrection 7.2/7.2: "%% FoomaticRIPOptionSetting: GammaCorrection=7.2"
*GammaCorrection 7.3/7.3: "%% FoomaticRIPOptionSetting: GammaCorrection=7.3"
*GammaCorrection 7.4/7.4: "%% FoomaticRIPOptionSetting: GammaCorrection=7.4"
*GammaCorrection 7.5/7.5: "%% FoomaticRIPOptionSetting: GammaCorrection=7.5"
*GammaCorrection 7.6/7.6: "%% FoomaticRIPOptionSetting: GammaCorrection=7.6"
*GammaCorrection 7.7/7.7: "%% FoomaticRIPOptionSetting: GammaCorrection=7.7"
*GammaCorrection 7.8/7.8: "%% FoomaticRIPOptionSetting: GammaCorrection=7.8"
*GammaCorrection 7.9/7.9: "%% FoomaticRIPOptionSetting: GammaCorrection=7.9"
*GammaCorrection 8.0/8.0: "%% FoomaticRIPOptionSetting: GammaCorrection=8.0"
*GammaCorrection 8.1/8.1: "%% FoomaticRIPOptionSetting: GammaCorrection=8.1"
*GammaCorrection 8.2/8.2: "%% FoomaticRIPOptionSetting: GammaCorrection=8.2"
*GammaCorrection 8.3/8.3: "%% FoomaticRIPOptionSetting: GammaCorrection=8.3"
*GammaCorrection 8.4/8.4: "%% FoomaticRIPOptionSetting: GammaCorrection=8.4"
*GammaCorrection 8.5/8.5: "%% FoomaticRIPOptionSetting: GammaCorrection=8.5"
*GammaCorrection 8.6/8.6: "%% FoomaticRIPOptionSetting: GammaCorrection=8.6"
*GammaCorrection 8.7/8.7: "%% FoomaticRIPOptionSetting: GammaCorrection=8.7"
*GammaCorrection 8.8/8.8: "%% FoomaticRIPOptionSetting: GammaCorrection=8.8"
*GammaCorrection 8.9/8.9: "%% FoomaticRIPOptionSetting: GammaCorrection=8.9"
*GammaCorrection 9.0/9.0: "%% FoomaticRIPOptionSetting: GammaCorrection=9.0"
*GammaCorrection 9.1/9.1: "%% FoomaticRIPOptionSetting: GammaCorrection=9.1"
*GammaCorrection 9.2/9.2: "%% FoomaticRIPOptionSetting: GammaCorrection=9.2"
*GammaCorrection 9.3/9.3: "%% FoomaticRIPOptionSetting: GammaCorrection=9.3"
*GammaCorrection 9.4/9.4: "%% FoomaticRIPOptionSetting: GammaCorrection=9.4"
*GammaCorrection 9.5/9.5: "%% FoomaticRIPOptionSetting: GammaCorrection=9.5"
*GammaCorrection 9.6/9.6: "%% FoomaticRIPOptionSetting: GammaCorrection=9.6"
*GammaCorrection 9.7/9.7: "%% FoomaticRIPOptionSetting: GammaCorrection=9.7"
*GammaCorrection 9.8/9.8: "%% FoomaticRIPOptionSetting: GammaCorrection=9.8"
*GammaCorrection 9.9/9.9: "%% FoomaticRIPOptionSetting: GammaCorrection=9.9"
*GammaCorrection 10.0/10.0: "%% FoomaticRIPOptionSetting: GammaCorrection=10.0"
*CloseUI: *GammaCorrection

*OpenUI *GammaSaturation/Gamma correction on saturation HSV component: PickOne
*FoomaticRIPOption GammaSaturation: float CmdLine C
*FoomaticRIPOptionPrototype GammaSaturation: " -satgamma %s"
*FoomaticRIPOptionRange GammaSaturation: 0.10 10.0
*OrderDependency: 250 AnySetup *GammaSaturation
*DefaultGammaSaturation: 1.0
*FoomaticRIPDefaultGammaSaturation: 1.0
*GammaSaturation 0.1/0.1: "%% FoomaticRIPOptionSetting: GammaSaturation=0.1"
*GammaSaturation 0.2/0.2: "%% FoomaticRIPOptionSetting: GammaSaturation=0.2"
*GammaSaturation 0.3/0.3: "%% FoomaticRIPOptionSetting: GammaSaturation=0.3"
*GammaSaturation 0.4/0.4: "%% FoomaticRIPOptionSetting: GammaSaturation=0.4"
*GammaSaturation 0.5/0.5: "%% FoomaticRIPOptionSetting: GammaSaturation=0.5"
*GammaSaturation 0.6/0.6: "%% FoomaticRIPOptionSetting: GammaSaturation=0.6"
*GammaSaturation 0.7/0.7: "%% FoomaticRIPOptionSetting: GammaSaturation=0.7"
*GammaSaturation 0.8/0.8: "%% FoomaticRIPOptionSetting: GammaSaturation=0.8"
*GammaSaturation 0.9/0.9: "%% FoomaticRIPOptionSetting: GammaSaturation=0.9"
*GammaSaturation 1.0/1.0: "%% FoomaticRIPOptionSetting: GammaSaturation=1.0"
*GammaSaturation 1.1/1.1: "%% FoomaticRIPOptionSetting: GammaSaturation=1.1"
*GammaSaturation 1.2/1.2: "%% FoomaticRIPOptionSetting: GammaSaturation=1.2"
*GammaSaturation 1.3/1.3: "%% FoomaticRIPOptionSetting: GammaSaturation=1.3"
*GammaSaturation 1.4/1.4: "%% FoomaticRIPOptionSetting: GammaSaturation=1.4"
*GammaSaturation 1.5/1.5: "%% FoomaticRIPOptionSetting: GammaSaturation=1.5"
*GammaSaturation 1.6/1.6: "%% FoomaticRIPOptionSetting: GammaSaturation=1.6"
*GammaSaturation 1.7/1.7: "%% FoomaticRIPOptionSetting: GammaSaturation=1.7"
*GammaSaturation 1.8/1.8: "%% FoomaticRIPOptionSetting: GammaSaturation=1.8"
*GammaSaturation 1.9/1.9: "%% FoomaticRIPOptionSetting: GammaSaturation=1.9"
*GammaSaturation 2.0/2.0: "%% FoomaticRIPOptionSetting: GammaSaturation=2.0"
*GammaSaturation 2.1/2.1: "%% FoomaticRIPOptionSetting: GammaSaturation=2.1"
*GammaSaturation 2.2/2.2: "%% FoomaticRIPOptionSetting: GammaSaturation=2.2"
*GammaSaturation 2.3/2.3: "%% FoomaticRIPOptionSetting: GammaSaturation=2.3"
*GammaSaturation 2.4/2.4: "%% FoomaticRIPOptionSetting: GammaSaturation=2.4"
*GammaSaturation 2.5/2.5: "%% FoomaticRIPOptionSetting: GammaSaturation=2.5"
*GammaSaturation 2.6/2.6: "%% FoomaticRIPOptionSetting: GammaSaturation=2.6"
*GammaSaturation 2.7/2.7: "%% FoomaticRIPOptionSetting: GammaSaturation=2.7"
*GammaSaturation 2.8/2.8: "%% FoomaticRIPOptionSetting: GammaSaturation=2.8"
*GammaSaturation 2.9/2.9: "%% FoomaticRIPOptionSetting: GammaSaturation=2.9"
*GammaSaturation 3.0/3.0: "%% FoomaticRIPOptionSetting: GammaSaturation=3.0"
*GammaSaturation 3.1/3.1: "%% FoomaticRIPOptionSetting: GammaSaturation=3.1"
*GammaSaturation 3.2/3.2: "%% FoomaticRIPOptionSetting: GammaSaturation=3.2"
*GammaSaturation 3.3/3.3: "%% FoomaticRIPOptionSetting: GammaSaturation=3.3"
*GammaSaturation 3.4/3.4: "%% FoomaticRIPOptionSetting: GammaSaturation=3.4"
*GammaSaturation 3.5/3.5: "%% FoomaticRIPOptionSetting: GammaSaturation=3.5"
*GammaSaturation 3.6/3.6: "%% FoomaticRIPOptionSetting: GammaSaturation=3.6"
*GammaSaturation 3.7/3.7: "%% FoomaticRIPOptionSetting: GammaSaturation=3.7"
*GammaSaturation 3.8/3.8: "%% FoomaticRIPOptionSetting: GammaSaturation=3.8"
*GammaSaturation 3.9/3.9: "%% FoomaticRIPOptionSetting: GammaSaturation=3.9"
*GammaSaturation 4.0/4.0: "%% FoomaticRIPOptionSetting: GammaSaturation=4.0"
*GammaSaturation 4.1/4.1: "%% FoomaticRIPOptionSetting: GammaSaturation=4.1"
*GammaSaturation 4.2/4.2: "%% FoomaticRIPOptionSetting: GammaSaturation=4.2"
*GammaSaturation 4.3/4.3: "%% FoomaticRIPOptionSetting: GammaSaturation=4.3"
*GammaSaturation 4.4/4.4: "%% FoomaticRIPOptionSetting: GammaSaturation=4.4"
*GammaSaturation 4.5/4.5: "%% FoomaticRIPOptionSetting: GammaSaturation=4.5"
*GammaSaturation 4.6/4.6: "%% FoomaticRIPOptionSetting: GammaSaturation=4.6"
*GammaSaturation 4.7/4.7: "%% FoomaticRIPOptionSetting: GammaSaturation=4.7"
*GammaSaturation 4.8/4.8: "%% FoomaticRIPOptionSetting: GammaSaturation=4.8"
*GammaSaturation 4.9/4.9: "%% FoomaticRIPOptionSetting: GammaSaturation=4.9"
*GammaSaturation 5.0/5.0: "%% FoomaticRIPOptionSetting: GammaSaturation=5.0"
*GammaSaturation 5.1/5.1: "%% FoomaticRIPOptionSetting: GammaSaturation=5.1"
*GammaSaturation 5.2/5.2: "%% FoomaticRIPOptionSetting: GammaSaturation=5.2"
*GammaSaturation 5.3/5.3: "%% FoomaticRIPOptionSetting: GammaSaturation=5.3"
*GammaSaturation 5.4/5.4: "%% FoomaticRIPOptionSetting: GammaSaturation=5.4"
*GammaSaturation 5.5/5.5: "%% FoomaticRIPOptionSetting: GammaSaturation=5.5"
*GammaSaturation 5.6/5.6: "%% FoomaticRIPOptionSetting: GammaSaturation=5.6"
*GammaSaturation 5.7/5.7: "%% FoomaticRIPOptionSetting: GammaSaturation=5.7"
*GammaSaturation 5.8/5.8: "%% FoomaticRIPOptionSetting: GammaSaturation=5.8"
*GammaSaturation 5.9/5.9: "%% FoomaticRIPOptionSetting: GammaSaturation=5.9"
*GammaSaturation 6.0/6.0: "%% FoomaticRIPOptionSetting: GammaSaturation=6.0"
*GammaSaturation 6.1/6.1: "%% FoomaticRIPOptionSetting: GammaSaturation=6.1"
*GammaSaturation 6.2/6.2: "%% FoomaticRIPOptionSetting: GammaSaturation=6.2"
*GammaSaturation 6.3/6.3: "%% FoomaticRIPOptionSetting: GammaSaturation=6.3"
*GammaSaturation 6.4/6.4: "%% FoomaticRIPOptionSetting: GammaSaturation=6.4"
*GammaSaturation 6.5/6.5: "%% FoomaticRIPOptionSetting: GammaSaturation=6.5"
*GammaSaturation 6.6/6.6: "%% FoomaticRIPOptionSetting: GammaSaturation=6.6"
*GammaSaturation 6.7/6.7: "%% FoomaticRIPOptionSetting: GammaSaturation=6.7"
*GammaSaturation 6.8/6.8: "%% FoomaticRIPOptionSetting: GammaSaturation=6.8"
*GammaSaturation 6.9/6.9: "%% FoomaticRIPOptionSetting: GammaSaturation=6.9"
*GammaSaturation 7.0/7.0: "%% FoomaticRIPOptionSetting: GammaSaturation=7.0"
*GammaSaturation 7.1/7.1: "%% FoomaticRIPOptionSetting: GammaSaturation=7.1"
*GammaSaturation 7.2/7.2: "%% FoomaticRIPOptionSetting: GammaSaturation=7.2"
*GammaSaturation 7.3/7.3: "%% FoomaticRIPOptionSetting: GammaSaturation=7.3"
*GammaSaturation 7.4/7.4: "%% FoomaticRIPOptionSetting: GammaSaturation=7.4"
*GammaSaturation 7.5/7.5: "%% FoomaticRIPOptionSetting: GammaSaturation=7.5"
*GammaSaturation 7.6/7.6: "%% FoomaticRIPOptionSetting: GammaSaturation=7.6"
*GammaSaturation 7.7/7.7: "%% FoomaticRIPOptionSetting: GammaSaturation=7.7"
*GammaSaturation 7.8/7.8: "%% FoomaticRIPOptionSetting: GammaSaturation=7.8"
*GammaSaturation 7.9/7.9: "%% FoomaticRIPOptionSetting: GammaSaturation=7.9"
*GammaSaturation 8.0/8.0: "%% FoomaticRIPOptionSetting: GammaSaturation=8.0"
*GammaSaturation 8.1/8.1: "%% FoomaticRIPOptionSetting: GammaSaturation=8.1"
*GammaSaturation 8.2/8.2: "%% FoomaticRIPOptionSetting: GammaSaturation=8.2"
*GammaSaturation 8.3/8.3: "%% FoomaticRIPOptionSetting: GammaSaturation=8.3"
*GammaSaturation 8.4/8.4: "%% FoomaticRIPOptionSetting: GammaSaturation=8.4"
*GammaSaturation 8.5/8.5: "%% FoomaticRIPOptionSetting: GammaSaturation=8.5"
*GammaSaturation 8.6/8.6: "%% FoomaticRIPOptionSetting: GammaSaturation=8.6"
*GammaSaturation 8.7/8.7: "%% FoomaticRIPOptionSetting: GammaSaturation=8.7"
*GammaSaturation 8.8/8.8: "%% FoomaticRIPOptionSetting: GammaSaturation=8.8"
*GammaSaturation 8.9/8.9: "%% FoomaticRIPOptionSetting: GammaSaturation=8.9"
*GammaSaturation 9.0/9.0: "%% FoomaticRIPOptionSetting: GammaSaturation=9.0"
*GammaSaturation 9.1/9.1: "%% FoomaticRIPOptionSetting: GammaSaturation=9.1"
*GammaSaturation 9.2/9.2: "%% FoomaticRIPOptionSetting: GammaSaturation=9.2"
*GammaSaturation 9.3/9.3: "%% FoomaticRIPOptionSetting: GammaSaturation=9.3"
*GammaSaturation 9.4/9.4: "%% FoomaticRIPOptionSetting: GammaSaturation=9.4"
*GammaSaturation 9.5/9.5: "%% FoomaticRIPOptionSetting: GammaSaturation=9.5"
*GammaSaturation 9.6/9.6: "%% FoomaticRIPOptionSetting: GammaSaturation=9.6"
*GammaSaturation 9.7/9.7: "%% FoomaticRIPOptionSetting: GammaSaturation=9.7"
*GammaSaturation 9.8/9.8: "%% FoomaticRIPOptionSetting: GammaSaturation=9.8"
*GammaSaturation 9.9/9.9: "%% FoomaticRIPOptionSetting: GammaSaturation=9.9"
*GammaSaturation 10.0/10.0: "%% FoomaticRIPOptionSetting: GammaSaturation=10.0"
*CloseUI: *GammaSaturation

*OpenUI *LFAdjust/Line Feed Adjustment: PickOne
*FoomaticRIPOption LFAdjust: int CmdLine C
*FoomaticRIPOptionPrototype LFAdjust: " -lfadjust %s"
*FoomaticRIPOptionRange LFAdjust: -128 127
*OrderDependency: 200 AnySetup *LFAdjust
*DefaultLFAdjust: 0
*FoomaticRIPDefaultLFAdjust: 0
*LFAdjust -128/-128: "%% FoomaticRIPOptionSetting: LFAdjust=-128"
*LFAdjust -125/-125: "%% FoomaticRIPOptionSetting: LFAdjust=-125"
*LFAdjust -120/-120: "%% FoomaticRIPOptionSetting: LFAdjust=-120"
*LFAdjust -115/-115: "%% FoomaticRIPOptionSetting: LFAdjust=-115"
*LFAdjust -110/-110: "%% FoomaticRIPOptionSetting: LFAdjust=-110"
*LFAdjust -105/-105: "%% FoomaticRIPOptionSetting: LFAdjust=-105"
*LFAdjust -100/-100: "%% FoomaticRIPOptionSetting: LFAdjust=-100"
*LFAdjust -95/-95: "%% FoomaticRIPOptionSetting: LFAdjust=-95"
*LFAdjust -90/-90: "%% FoomaticRIPOptionSetting: LFAdjust=-90"
*LFAdjust -85/-85: "%% FoomaticRIPOptionSetting: LFAdjust=-85"
*LFAdjust -80/-80: "%% FoomaticRIPOptionSetting: LFAdjust=-80"
*LFAdjust -75/-75: "%% FoomaticRIPOptionSetting: LFAdjust=-75"
*LFAdjust -70/-70: "%% FoomaticRIPOptionSetting: LFAdjust=-70"
*LFAdjust -65/-65: "%% FoomaticRIPOptionSetting: LFAdjust=-65"
*LFAdjust -60/-60: "%% FoomaticRIPOptionSetting: LFAdjust=-60"
*LFAdjust -55/-55: "%% FoomaticRIPOptionSetting: LFAdjust=-55"
*LFAdjust -50/-50: "%% FoomaticRIPOptionSetting: LFAdjust=-50"
*LFAdjust -45/-45: "%% FoomaticRIPOptionSetting: LFAdjust=-45"
*LFAdjust -40/-40: "%% FoomaticRIPOptionSetting: LFAdjust=-40"
*LFAdjust -35/-35: "%% FoomaticRIPOptionSetting: LFAdjust=-35"
*LFAdjust -30/-30: "%% FoomaticRIPOptionSetting: LFAdjust=-30"
*LFAdjust -25/-25: "%% FoomaticRIPOptionSetting: LFAdjust=-25"
*LFAdjust -20/-20: "%% FoomaticRIPOptionSetting: LFAdjust=-20"
*LFAdjust -15/-15: "%% FoomaticRIPOptionSetting: LFAdjust=-15"
*LFAdjust -10/-10: "%% FoomaticRIPOptionSetting: LFAdjust=-10"
*LFAdjust -5/-5: "%% FoomaticRIPOptionSetting: LFAdjust=-5"
*LFAdjust 0/0: "%% FoomaticRIPOptionSetting: LFAdjust=0"
*LFAdjust 5/5: "%% FoomaticRIPOptionSetting: LFAdjust=5"
*LFAdjust 10/10: "%% FoomaticRIPOptionSetting: LFAdjust=10"
*LFAdjust 15/15: "%% FoomaticRIPOptionSetting: LFAdjust=15"
*LFAdjust 20/20: "%% FoomaticRIPOptionSetting: LFAdjust=20"
*LFAdjust 25/25: "%% FoomaticRIPOptionSetting: LFAdjust=25"
*LFAdjust 30/30: "%% FoomaticRIPOptionSetting: LFAdjust=30"
*LFAdjust 35/35: "%% FoomaticRIPOptionSetting: LFAdjust=35"
*LFAdjust 40/40: "%% FoomaticRIPOptionSetting: LFAdjust=40"
*LFAdjust 45/45: "%% FoomaticRIPOptionSetting: LFAdjust=45"
*LFAdjust 50/50: "%% FoomaticRIPOptionSetting: LFAdjust=50"
*LFAdjust 55/55: "%% FoomaticRIPOptionSetting: LFAdjust=55"
*LFAdjust 60/60: "%% FoomaticRIPOptionSetting: LFAdjust=60"
*LFAdjust 65/65: "%% FoomaticRIPOptionSetting: LFAdjust=65"
*LFAdjust 70/70: "%% FoomaticRIPOptionSetting: LFAdjust=70"
*LFAdjust 75/75: "%% FoomaticRIPOptionSetting: LFAdjust=75"
*LFAdjust 80/80: "%% FoomaticRIPOptionSetting: LFAdjust=80"
*LFAdjust 85/85: "%% FoomaticRIPOptionSetting: LFAdjust=85"
*LFAdjust 90/90: "%% FoomaticRIPOptionSetting: LFAdjust=90"
*LFAdjust 95/95: "%% FoomaticRIPOptionSetting: LFAdjust=95"
*LFAdjust 100/100: "%% FoomaticRIPOptionSetting: LFAdjust=100"
*LFAdjust 105/105: "%% FoomaticRIPOptionSetting: LFAdjust=105"
*LFAdjust 110/110: "%% FoomaticRIPOptionSetting: LFAdjust=110"
*LFAdjust 115/115: "%% FoomaticRIPOptionSetting: LFAdjust=115"
*LFAdjust 120/120: "%% FoomaticRIPOptionSetting: LFAdjust=120"
*LFAdjust 125/125: "%% FoomaticRIPOptionSetting: LFAdjust=125"
*LFAdjust 127/127: "%% FoomaticRIPOptionSetting: LFAdjust=127"
*CloseUI: *LFAdjust

*OpenUI *PHAdjust/Density: PickOne
*FoomaticRIPOption PHAdjust: int CmdLine C
*FoomaticRIPOptionPrototype PHAdjust: " -phadjust %s"
*FoomaticRIPOptionRange PHAdjust: -50 50
*OrderDependency: 240 AnySetup *PHAdjust
*DefaultPHAdjust: 0
*FoomaticRIPDefaultPHAdjust: 0
*PHAdjust -50/-50: "%% FoomaticRIPOptionSetting: PHAdjust=-50"
*PHAdjust -49/-49: "%% FoomaticRIPOptionSetting: PHAdjust=-49"
*PHAdjust -48/-48: "%% FoomaticRIPOptionSetting: PHAdjust=-48"
*PHAdjust -47/-47: "%% FoomaticRIPOptionSetting: PHAdjust=-47"
*PHAdjust -46/-46: "%% FoomaticRIPOptionSetting: PHAdjust=-46"
*PHAdjust -45/-45: "%% FoomaticRIPOptionSetting: PHAdjust=-45"
*PHAdjust -44/-44: "%% FoomaticRIPOptionSetting: PHAdjust=-44"
*PHAdjust -43/-43: "%% FoomaticRIPOptionSetting: PHAdjust=-43"
*PHAdjust -42/-42: "%% FoomaticRIPOptionSetting: PHAdjust=-42"
*PHAdjust -41/-41: "%% FoomaticRIPOptionSetting: PHAdjust=-41"
*PHAdjust -40/-40: "%% FoomaticRIPOptionSetting: PHAdjust=-40"
*PHAdjust -39/-39: "%% FoomaticRIPOptionSetting: PHAdjust=-39"
*PHAdjust -38/-38: "%% FoomaticRIPOptionSetting: PHAdjust=-38"
*PHAdjust -37/-37: "%% FoomaticRIPOptionSetting: PHAdjust=-37"
*PHAdjust -36/-36: "%% FoomaticRIPOptionSetting: PHAdjust=-36"
*PHAdjust -35/-35: "%% FoomaticRIPOptionSetting: PHAdjust=-35"
*PHAdjust -34/-34: "%% FoomaticRIPOptionSetting: PHAdjust=-34"
*PHAdjust -33/-33: "%% FoomaticRIPOptionSetting: PHAdjust=-33"
*PHAdjust -32/-32: "%% FoomaticRIPOptionSetting: PHAdjust=-32"
*PHAdjust -31/-31: "%% FoomaticRIPOptionSetting: PHAdjust=-31"
*PHAdjust -30/-30: "%% FoomaticRIPOptionSetting: PHAdjust=-30"
*PHAdjust -29/-29: "%% FoomaticRIPOptionSetting: PHAdjust=-29"
*PHAdjust -28/-28: "%% FoomaticRIPOptionSetting: PHAdjust=-28"
*PHAdjust -27/-27: "%% FoomaticRIPOptionSetting: PHAdjust=-27"
*PHAdjust -26/-26: "%% FoomaticRIPOptionSetting: PHAdjust=-26"
*PHAdjust -25/-25: "%% FoomaticRIPOptionSetting: PHAdjust=-25"
*PHAdjust -24/-24: "%% FoomaticRIPOptionSetting: PHAdjust=-24"
*PHAdjust -23/-23: "%% FoomaticRIPOptionSetting: PHAdjust=-23"
*PHAdjust -22/-22: "%% FoomaticRIPOptionSetting: PHAdjust=-22"
*PHAdjust -21/-21: "%% FoomaticRIPOptionSetting: PHAdjust=-21"
*PHAdjust -20/-20: "%% FoomaticRIPOptionSetting: PHAdjust=-20"
*PHAdjust -19/-19: "%% FoomaticRIPOptionSetting: PHAdjust=-19"
*PHAdjust -18/-18: "%% FoomaticRIPOptionSetting: PHAdjust=-18"
*PHAdjust -17/-17: "%% FoomaticRIPOptionSetting: PHAdjust=-17"
*PHAdjust -16/-16: "%% FoomaticRIPOptionSetting: PHAdjust=-16"
*PHAdjust -15/-15: "%% FoomaticRIPOptionSetting: PHAdjust=-15"
*PHAdjust -14/-14: "%% FoomaticRIPOptionSetting: PHAdjust=-14"
*PHAdjust -13/-13: "%% FoomaticRIPOptionSetting: PHAdjust=-13"
*PHAdjust -12/-12: "%% FoomaticRIPOptionSetting: PHAdjust=-12"
*PHAdjust -11/-11: "%% FoomaticRIPOptionSetting: PHAdjust=-11"
*PHAdjust -10/-10: "%% FoomaticRIPOptionSetting: PHAdjust=-10"
*PHAdjust -9/-9: "%% FoomaticRIPOptionSetting: PHAdjust=-9"
*PHAdjust -8/-8: "%% FoomaticRIPOptionSetting: PHAdjust=-8"
*PHAdjust -7/-7: "%% FoomaticRIPOptionSetting: PHAdjust=-7"
*PHAdjust -6/-6: "%% FoomaticRIPOptionSetting: PHAdjust=-6"
*PHAdjust -5/-5: "%% FoomaticRIPOptionSetting: PHAdjust=-5"
*PHAdjust -4/-4: "%% FoomaticRIPOptionSetting: PHAdjust=-4"
*PHAdjust -3/-3: "%% FoomaticRIPOptionSetting: PHAdjust=-3"
*PHAdjust -2/-2: "%% FoomaticRIPOptionSetting: PHAdjust=-2"
*PHAdjust -1/-1: "%% FoomaticRIPOptionSetting: PHAdjust=-1"
*PHAdjust 0/0: "%% FoomaticRIPOptionSetting: PHAdjust=0"
*PHAdjust 1/1: "%% FoomaticRIPOptionSetting: PHAdjust=1"
*PHAdjust 2/2: "%% FoomaticRIPOptionSetting: PHAdjust=2"
*PHAdjust 3/3: "%% FoomaticRIPOptionSetting: PHAdjust=3"
*PHAdjust 4/4: "%% FoomaticRIPOptionSetting: PHAdjust=4"
*PHAdjust 5/5: "%% FoomaticRIPOptionSetting: PHAdjust=5"
*PHAdjust 6/6: "%% FoomaticRIPOptionSetting: PHAdjust=6"
*PHAdjust 7/7: "%% FoomaticRIPOptionSetting: PHAdjust=7"
*PHAdjust 8/8: "%% FoomaticRIPOptionSetting: PHAdjust=8"
*PHAdjust 9/9: "%% FoomaticRIPOptionSetting: PHAdjust=9"
*PHAdjust 10/10: "%% FoomaticRIPOptionSetting: PHAdjust=10"
*PHAdjust 11/11: "%% FoomaticRIPOptionSetting: PHAdjust=11"
*PHAdjust 12/12: "%% FoomaticRIPOptionSetting: PHAdjust=12"
*PHAdjust 13/13: "%% FoomaticRIPOptionSetting: PHAdjust=13"
*PHAdjust 14/14: "%% FoomaticRIPOptionSetting: PHAdjust=14"
*PHAdjust 15/15: "%% FoomaticRIPOptionSetting: PHAdjust=15"
*PHAdjust 16/16: "%% FoomaticRIPOptionSetting: PHAdjust=16"
*PHAdjust 17/17: "%% FoomaticRIPOptionSetting: PHAdjust=17"
*PHAdjust 18/18: "%% FoomaticRIPOptionSetting: PHAdjust=18"
*PHAdjust 19/19: "%% FoomaticRIPOptionSetting: PHAdjust=19"
*PHAdjust 20/20: "%% FoomaticRIPOptionSetting: PHAdjust=20"
*PHAdjust 21/21: "%% FoomaticRIPOptionSetting: PHAdjust=21"
*PHAdjust 22/22: "%% FoomaticRIPOptionSetting: PHAdjust=22"
*PHAdjust 23/23: "%% FoomaticRIPOptionSetting: PHAdjust=23"
*PHAdjust 24/24: "%% FoomaticRIPOptionSetting: PHAdjust=24"
*PHAdjust 25/25: "%% FoomaticRIPOptionSetting: PHAdjust=25"
*PHAdjust 26/26: "%% FoomaticRIPOptionSetting: PHAdjust=26"
*PHAdjust 27/27: "%% FoomaticRIPOptionSetting: PHAdjust=27"
*PHAdjust 28/28: "%% FoomaticRIPOptionSetting: PHAdjust=28"
*PHAdjust 29/29: "%% FoomaticRIPOptionSetting: PHAdjust=29"
*PHAdjust 30/30: "%% FoomaticRIPOptionSetting: PHAdjust=30"
*PHAdjust 31/31: "%% FoomaticRIPOptionSetting: PHAdjust=31"
*PHAdjust 32/32: "%% FoomaticRIPOptionSetting: PHAdjust=32"
*PHAdjust 33/33: "%% FoomaticRIPOptionSetting: PHAdjust=33"
*PHAdjust 34/34: "%% FoomaticRIPOptionSetting: PHAdjust=34"
*PHAdjust 35/35: "%% FoomaticRIPOptionSetting: PHAdjust=35"
*PHAdjust 36/36: "%% FoomaticRIPOptionSetting: PHAdjust=36"
*PHAdjust 37/37: "%% FoomaticRIPOptionSetting: PHAdjust=37"
*PHAdjust 38/38: "%% FoomaticRIPOptionSetting: PHAdjust=38"
*PHAdjust 39/39: "%% FoomaticRIPOptionSetting: PHAdjust=39"
*PHAdjust 40/40: "%% FoomaticRIPOptionSetting: PHAdjust=40"
*PHAdjust 41/41: "%% FoomaticRIPOptionSetting: PHAdjust=41"
*PHAdjust 42/42: "%% FoomaticRIPOptionSetting: PHAdjust=42"
*PHAdjust 43/43: "%% FoomaticRIPOptionSetting: PHAdjust=43"
*PHAdjust 44/44: "%% FoomaticRIPOptionSetting: PHAdjust=44"
*PHAdjust 45/45: "%% FoomaticRIPOptionSetting: PHAdjust=45"
*PHAdjust 46/46: "%% FoomaticRIPOptionSetting: PHAdjust=46"
*PHAdjust 47/47: "%% FoomaticRIPOptionSetting: PHAdjust=47"
*PHAdjust 48/48: "%% FoomaticRIPOptionSetting: PHAdjust=48"
*PHAdjust 49/49: "%% FoomaticRIPOptionSetting: PHAdjust=49"
*PHAdjust 50/50: "%% FoomaticRIPOptionSetting: PHAdjust=50"
*CloseUI: *PHAdjust

*OpenUI *XShift/Horizontal (X-)Shift (in dots): PickOne
*FoomaticRIPOption XShift: int CmdLine C
*FoomaticRIPOptionPrototype XShift: " -xshift %s"
*FoomaticRIPOptionRange XShift: -600 600
*OrderDependency: 450 AnySetup *XShift
*DefaultXShift: 0
*FoomaticRIPDefaultXShift: 0
*XShift -600/-600: "%% FoomaticRIPOptionSetting: XShift=-600"
*XShift -580/-580: "%% FoomaticRIPOptionSetting: XShift=-580"
*XShift -560/-560: "%% FoomaticRIPOptionSetting: XShift=-560"
*XShift -540/-540: "%% FoomaticRIPOptionSetting: XShift=-540"
*XShift -520/-520: "%% FoomaticRIPOptionSetting: XShift=-520"
*XShift -500/-500: "%% FoomaticRIPOptionSetting: XShift=-500"
*XShift -480/-480: "%% FoomaticRIPOptionSetting: XShift=-480"
*XShift -460/-460: "%% FoomaticRIPOptionSetting: XShift=-460"
*XShift -440/-440: "%% FoomaticRIPOptionSetting: XShift=-440"
*XShift -420/-420: "%% FoomaticRIPOptionSetting: XShift=-420"
*XShift -400/-400: "%% FoomaticRIPOptionSetting: XShift=-400"
*XShift -380/-380: "%% FoomaticRIPOptionSetting: XShift=-380"
*XShift -360/-360: "%% FoomaticRIPOptionSetting: XShift=-360"
*XShift -340/-340: "%% FoomaticRIPOptionSetting: XShift=-340"
*XShift -320/-320: "%% FoomaticRIPOptionSetting: XShift=-320"
*XShift -300/-300: "%% FoomaticRIPOptionSetting: XShift=-300"
*XShift -280/-280: "%% FoomaticRIPOptionSetting: XShift=-280"
*XShift -260/-260: "%% FoomaticRIPOptionSetting: XShift=-260"
*XShift -240/-240: "%% FoomaticRIPOptionSetting: XShift=-240"
*XShift -220/-220: "%% FoomaticRIPOptionSetting: XShift=-220"
*XShift -200/-200: "%% FoomaticRIPOptionSetting: XShift=-200"
*XShift -180/-180: "%% FoomaticRIPOptionSetting: XShift=-180"
*XShift -160/-160: "%% FoomaticRIPOptionSetting: XShift=-160"
*XShift -140/-140: "%% FoomaticRIPOptionSetting: XShift=-140"
*XShift -120/-120: "%% FoomaticRIPOptionSetting: XShift=-120"
*XShift -100/-100: "%% FoomaticRIPOptionSetting: XShift=-100"
*XShift -80/-80: "%% FoomaticRIPOptionSetting: XShift=-80"
*XShift -60/-60: "%% FoomaticRIPOptionSetting: XShift=-60"
*XShift -40/-40: "%% FoomaticRIPOptionSetting: XShift=-40"
*XShift -20/-20: "%% FoomaticRIPOptionSetting: XShift=-20"
*XShift 0/0: "%% FoomaticRIPOptionSetting: XShift=0"
*XShift 20/20: "%% FoomaticRIPOptionSetting: XShift=20"
*XShift 40/40: "%% FoomaticRIPOptionSetting: XShift=40"
*XShift 60/60: "%% FoomaticRIPOptionSetting: XShift=60"
*XShift 80/80: "%% FoomaticRIPOptionSetting: XShift=80"
*XShift 100/100: "%% FoomaticRIPOptionSetting: XShift=100"
*XShift 120/120: "%% FoomaticRIPOptionSetting: XShift=120"
*XShift 140/140: "%% FoomaticRIPOptionSetting: XShift=140"
*XShift 160/160: "%% FoomaticRIPOptionSetting: XShift=160"
*XShift 180/180: "%% FoomaticRIPOptionSetting: XShift=180"
*XShift 200/200: "%% FoomaticRIPOptionSetting: XShift=200"
*XShift 220/220: "%% FoomaticRIPOptionSetting: XShift=220"
*XShift 240/240: "%% FoomaticRIPOptionSetting: XShift=240"
*XShift 260/260: "%% FoomaticRIPOptionSetting: XShift=260"
*XShift 280/280: "%% FoomaticRIPOptionSetting: XShift=280"
*XShift 300/300: "%% FoomaticRIPOptionSetting: XShift=300"
*XShift 320/320: "%% FoomaticRIPOptionSetting: XShift=320"
*XShift 340/340: "%% FoomaticRIPOptionSetting: XShift=340"
*XShift 360/360: "%% FoomaticRIPOptionSetting: XShift=360"
*XShift 380/380: "%% FoomaticRIPOptionSetting: XShift=380"
*XShift 400/400: "%% FoomaticRIPOptionSetting: XShift=400"
*XShift 420/420: "%% FoomaticRIPOptionSetting: XShift=420"
*XShift 440/440: "%% FoomaticRIPOptionSetting: XShift=440"
*XShift 460/460: "%% FoomaticRIPOptionSetting: XShift=460"
*XShift 480/480: "%% FoomaticRIPOptionSetting: XShift=480"
*XShift 500/500: "%% FoomaticRIPOptionSetting: XShift=500"
*XShift 520/520: "%% FoomaticRIPOptionSetting: XShift=520"
*XShift 540/540: "%% FoomaticRIPOptionSetting: XShift=540"
*XShift 560/560: "%% FoomaticRIPOptionSetting: XShift=560"
*XShift 580/580: "%% FoomaticRIPOptionSetting: XShift=580"
*XShift 600/600: "%% FoomaticRIPOptionSetting: XShift=600"
*CloseUI: *XShift

*OpenUI *YShift/Vertical (Y-)Shift (in dots): PickOne
*FoomaticRIPOption YShift: int CmdLine C
*FoomaticRIPOptionPrototype YShift: " -yshift %s"
*FoomaticRIPOptionRange YShift: -600 600
*OrderDependency: 460 AnySetup *YShift
*DefaultYShift: 0
*FoomaticRIPDefaultYShift: 0
*YShift -600/-600: "%% FoomaticRIPOptionSetting: YShift=-600"
*YShift -580/-580: "%% FoomaticRIPOptionSetting: YShift=-580"
*YShift -560/-560: "%% FoomaticRIPOptionSetting: YShift=-560"
*YShift -540/-540: "%% FoomaticRIPOptionSetting: YShift=-540"
*YShift -520/-520: "%% FoomaticRIPOptionSetting: YShift=-520"
*YShift -500/-500: "%% FoomaticRIPOptionSetting: YShift=-500"
*YShift -480/-480: "%% FoomaticRIPOptionSetting: YShift=-480"
*YShift -460/-460: "%% FoomaticRIPOptionSetting: YShift=-460"
*YShift -440/-440: "%% FoomaticRIPOptionSetting: YShift=-440"
*YShift -420/-420: "%% FoomaticRIPOptionSetting: YShift=-420"
*YShift -400/-400: "%% FoomaticRIPOptionSetting: YShift=-400"
*YShift -380/-380: "%% FoomaticRIPOptionSetting: YShift=-380"
*YShift -360/-360: "%% FoomaticRIPOptionSetting: YShift=-360"
*YShift -340/-340: "%% FoomaticRIPOptionSetting: YShift=-340"
*YShift -320/-320: "%% FoomaticRIPOptionSetting: YShift=-320"
*YShift -300/-300: "%% FoomaticRIPOptionSetting: YShift=-300"
*YShift -280/-280: "%% FoomaticRIPOptionSetting: YShift=-280"
*YShift -260/-260: "%% FoomaticRIPOptionSetting: YShift=-260"
*YShift -240/-240: "%% FoomaticRIPOptionSetting: YShift=-240"
*YShift -220/-220: "%% FoomaticRIPOptionSetting: YShift=-220"
*YShift -200/-200: "%% FoomaticRIPOptionSetting: YShift=-200"
*YShift -180/-180: "%% FoomaticRIPOptionSetting: YShift=-180"
*YShift -160/-160: "%% FoomaticRIPOptionSetting: YShift=-160"
*YShift -140/-140: "%% FoomaticRIPOptionSetting: YShift=-140"
*YShift -120/-120: "%% FoomaticRIPOptionSetting: YShift=-120"
*YShift -100/-100: "%% FoomaticRIPOptionSetting: YShift=-100"
*YShift -80/-80: "%% FoomaticRIPOptionSetting: YShift=-80"
*YShift -60/-60: "%% FoomaticRIPOptionSetting: YShift=-60"
*YShift -40/-40: "%% FoomaticRIPOptionSetting: YShift=-40"
*YShift -20/-20: "%% FoomaticRIPOptionSetting: YShift=-20"
*YShift 0/0: "%% FoomaticRIPOptionSetting: YShift=0"
*YShift 20/20: "%% FoomaticRIPOptionSetting: YShift=20"
*YShift 40/40: "%% FoomaticRIPOptionSetting: YShift=40"
*YShift 60/60: "%% FoomaticRIPOptionSetting: YShift=60"
*YShift 80/80: "%% FoomaticRIPOptionSetting: YShift=80"
*YShift 100/100: "%% FoomaticRIPOptionSetting: YShift=100"
*YShift 120/120: "%% FoomaticRIPOptionSetting: YShift=120"
*YShift 140/140: "%% FoomaticRIPOptionSetting: YShift=140"
*YShift 160/160: "%% FoomaticRIPOptionSetting: YShift=160"
*YShift 180/180: "%% FoomaticRIPOptionSetting: YShift=180"
*YShift 200/200: "%% FoomaticRIPOptionSetting: YShift=200"
*YShift 220/220: "%% FoomaticRIPOptionSetting: YShift=220"
*YShift 240/240: "%% FoomaticRIPOptionSetting: YShift=240"
*YShift 260/260: "%% FoomaticRIPOptionSetting: YShift=260"
*YShift 280/280: "%% FoomaticRIPOptionSetting: YShift=280"
*YShift 300/300: "%% FoomaticRIPOptionSetting: YShift=300"
*YShift 320/320: "%% FoomaticRIPOptionSetting: YShift=320"
*YShift 340/340: "%% FoomaticRIPOptionSetting: YShift=340"
*YShift 360/360: "%% FoomaticRIPOptionSetting: YShift=360"
*YShift 380/380: "%% FoomaticRIPOptionSetting: YShift=380"
*YShift 400/400: "%% FoomaticRIPOptionSetting: YShift=400"
*YShift 420/420: "%% FoomaticRIPOptionSetting: YShift=420"
*YShift 440/440: "%% FoomaticRIPOptionSetting: YShift=440"
*YShift 460/460: "%% FoomaticRIPOptionSetting: YShift=460"
*YShift 480/480: "%% FoomaticRIPOptionSetting: YShift=480"
*YShift 500/500: "%% FoomaticRIPOptionSetting: YShift=500"
*YShift 520/520: "%% FoomaticRIPOptionSetting: YShift=520"
*YShift 540/540: "%% FoomaticRIPOptionSetting: YShift=540"
*YShift 560/560: "%% FoomaticRIPOptionSetting: YShift=560"
*YShift 580/580: "%% FoomaticRIPOptionSetting: YShift=580"
*YShift 600/600: "%% FoomaticRIPOptionSetting: YShift=600"
*CloseUI: *YShift

*CloseGroup: Adjustment


*% Generic boilerplate PPD stuff as standard PostScript fonts and so on



*DefaultFont: Courier
*Font AvantGarde-Book: Standard "(001.006S)" Standard ROM
*Font AvantGarde-BookOblique: Standard "(001.006S)" Standard ROM
*Font AvantGarde-Demi: Standard "(001.007S)" Standard ROM
*Font AvantGarde-DemiOblique: Standard "(001.007S)" Standard ROM
*Font Bookman-Demi: Standard "(001.004S)" Standard ROM
*Font Bookman-DemiItalic: Standard "(001.004S)" Standard ROM
*Font Bookman-Light: Standard "(001.004S)" Standard ROM
*Font Bookman-LightItalic: Standard "(001.004S)" Standard ROM
*Font Courier: Standard "(002.004S)" Standard ROM
*Font Courier-Bold: Standard "(002.004S)" Standard ROM
*Font Courier-BoldOblique: Standard "(002.004S)" Standard ROM
*Font Courier-Oblique: Standard "(002.004S)" Standard ROM
*Font Helvetica: Standard "(001.006S)" Standard ROM
*Font Helvetica-Bold: Standard "(001.007S)" Standard ROM
*Font Helvetica-BoldOblique: Standard "(001.007S)" Standard ROM
*Font Helvetica-Narrow: Standard "(001.006S)" Standard ROM
*Font Helvetica-Narrow-Bold: Standard "(001.007S)" Standard ROM
*Font Helvetica-Narrow-BoldOblique: Standard "(001.007S)" Standard ROM
*Font Helvetica-Narrow-Oblique: Standard "(001.006S)" Standard ROM
*Font Helvetica-Oblique: Standard "(001.006S)" Standard ROM
*Font NewCenturySchlbk-Bold: Standard "(001.009S)" Standard ROM
*Font NewCenturySchlbk-BoldItalic: Standard "(001.007S)" Standard ROM
*Font NewCenturySchlbk-Italic: Standard "(001.006S)" Standard ROM
*Font NewCenturySchlbk-Roman: Standard "(001.007S)" Standard ROM
*Font Palatino-Bold: Standard "(001.005S)" Standard ROM
*Font Palatino-BoldItalic: Standard "(001.005S)" Standard ROM
*Font Palatino-Italic: Standard "(001.005S)" Standard ROM
*Font Palatino-Roman: Standard "(001.005S)" Standard ROM
*Font Symbol: Special "(001.007S)" Special ROM
*Font Times-Bold: Standard "(001.007S)" Standard ROM
*Font Times-BoldItalic: Standard "(001.009S)" Standard ROM
*Font Times-Italic: Standard "(001.007S)" Standard ROM
*Font Times-Roman: Standard "(001.007S)" Standard ROM
*Font ZapfChancery-MediumItalic: Standard "(001.007S)" Standard ROM
*Font ZapfDingbats: Special "(001.004S)" Standard ROM
----------------------------------------------------------------------------

Foomatic keywords
-----------------

*FoomaticIDs: <printer> <driver>
    <printer>: The printer ID in the Foomatic database
    <driver>: The driver name/ID in the Foomatic database

*FoomaticRIPPostPipe: "<code>"
    <code>: A shell command line into which the output of foomatic-rip
            is piped. Only used with LPRng, LPD, GNUlpr, spooler-less

*FoomaticRIPCammandLine: "<code>"
    <code>: The command line prototype, with spots to insert option
            settings ("%A", "%B", ...).

*FoomaticNoPageAccounting: <boolean value>
    <value>: If True, no accounting code will be inserted into the
             PostScript data stream.

*FoomaticRIPOption <name>: <type> <style> <spot> [<order>]
    <name>: Option name; <type>: enum, bool, int, float;
    <style>: CmdLine, JCL, PS, Composite;
    <spot>: Insert this at "%<spot>" in the "*FoomaticRIPCammandLine";
    <order>: order number (1-choice options only)

*FoomaticRIPOptionSetting <name>=<choice>: "<code>"
    <name>: Option name; <choice>: choice name;
    <code>: Code to insert for Cmdline and JCL options,
            Settings of member options for Composite
            options (see below)

*FoomaticRIPOptionPrototype <name>: "<code>"
    (keyword only for numerical and string/password options)
    <name>: Option name;
    <code>: Code to insert for Cmdline, JCL, and
            PS options. With "%s" for the number/string
            set by the user.

*FoomaticRIPOptionRange <name>: <min> <max>
    (keyword only for numerical options)
    <name>: Option name;
    <min>, <max>: allowed range for the number.

*FoomaticRIPOptionMaxLength <name>: <length>
    (keyword only for string/password options)
    <name>: Option name;
    <length>: maximum allowed length for the string.

*FoomaticRIPOptionAllowedChars <name>: "<code>"
    (keyword only for string options)
    <name>: Option name;
    <code>: List of allowed characters in the string
            (checked by a '/^[...]*$/', see above).

*FoomaticRIPOptionAllowedRegExp <name>: "<code>"
    (keyword only for string options)
    <name>: Option name;
    <code>: Perl regular expression which the string must fulfill
            (checked by a '/.../', see above).

*FoomaticRIPDefault<name>: <value>
    (keyword only for numerical options)
    <name>: Option name;
    <value>: default value, only needs to be in
            the allowed range, does not need to be
	    one of the enumerated choices.

All strings in quotes (Foomatic command line, snippets to insert in
command line, "<code>" in the keyword descriptions above) are encoded
with the "htmlify()" function of DB.pm, so they contain no forbidden
characters ("<", ">", "\"") any more. In addition they are broken up
into short lines. The filter (foomatic-rip) will put them together
at first and then replace the HTML/XML entities by the original
characters. If a string is split up, an "*End" line follows, as
required by the Adobe specification.

All Foomatic-relevant info is stored with keywords beginning with 
"*Foomatic...", not in comment lines. So if some program strips the 
comments off the PPD file, the file still works. The data is stored 
in a way compliant to the Adobe specification.

The "*Foomatic..." lines are located in the option entries, so that all 
info which is related is located close to each other. This makes the 
file more easily readable. The lines also contain only the information 
which is not provided by the standard PPD lines. So redundancy is low 
and the PPD can more easily be edited and customized.

"*Foomatic..." lines are given to all non-PostScript options and to
numerical or string/password PostScript options. Usual "Boolean" and
"PickOne" PostScript options do not need them. Numerical and
string/password options are "PickOne" for most frontends, but with the
"*Foomatic..." lines the server (the foomatic-rip filter script)
identifies them as numerical or string/password options (and so
accepts values which are not listed) and, second, frontends could also
read the "*Foomatic..." lines and so show the options as numerical or
string (with input field, slider, combo box) or even as password
(input field which shows asterisks instead of the actually typed
characters), as KDE Print and XPP now do by reading the Perl
structure.

Non-PostScript options with only one choice consist only of
"*Foomatic..." lines. So the one choice is stored in the PPD file but
frontends will not show a widget for these options. An example is the
"Model" option in the shown file.

With the replacement of the Perl structure by the "*Foomatic..." lines a 
lot of unnecessary information is removed from the PPDs and the way how 
the Foomatic-specific stuff is stored is much simpler. So one can easier 
read and edit it and one can more easily parse it, especially with 
non-Perl programs. In addition, the PPD file is shorter.

Also composite options can be described more easily:

----------------------------------------------------------------------------

*OpenUI *PrintoutMode/Printout Mode: PickOne
*FoomaticRIPOption PrintoutMode: enum Composite C
*OrderDependency: 20 AnySetup *PrintoutMode
*DefaultPrintoutMode: Normal
*PrintoutMode Draft/Draft (Economy): "%% FoomaticRIPOptionSetting: 
PrintoutMode=Draft"
*FoomaticRIPOptionSetting PrintoutMode=Draft: "Resolution=300 &&
MediaType=Normal Dither=VeryFast"
*End
*PrintoutMode Normal/Normal: "%% FoomaticRIPOptionSetting: 
PrintoutMode=Normal"
*FoomaticRIPOptionSetting PrintoutMode=Normal: "Resolution=600 &&
MediaType=Normal Dither=AdaptiveHybrid"
*End
*PrintoutMode High/High Quality: "%% 
FoomaticRIPOptionSetting: PrintoutMode=High"
*FoomaticRIPOptionSetting PrintoutMode=High: "Resolution=1200 &&
MediaType=Inkjet Dither=AdaptiveHybrid"
*End
*PrintoutMode Photo/Photo: "%% FoomaticRIPOptionSetting: PrintoutMode=Photo"
*FoomaticRIPOptionSetting PrintoutMode=Photo: "Resolution=1200 &&
MediaType=GlossyPhoto Dither=EvenTone"
*End
*CloseUI: *PrintoutMode

----------------------------------------------------------------------------

Remark to the "*FoomaticRIPDefault<name>: <value>" entries for
numerical options:

Adobe's PPD specs do not support numerical options. Therefore the
numerical options are mapped to enumerated options in the PPD file and
their characteristics as a numerical option are stored in
"*Foomatic..."  keywords. Especially a value between the enumerated
fixed values can be used as the default value. Then this value must be
given by a "*FoomaticRIPDefault<option>: <value>" line in the PPD
file. But this value is only valid, if the "official" default given by
a "*Default<option>: <value>" line (it must be one of the enumerated
values) points to the enumerated value which is closest to this
value. This way a user can select a default value with a tool only
supporting PPD files but not Foomatic extensions.  This tool only
modifies the "*Default<option>: <value>" line and if the
"*FoomaticRIPDefault<option>: <value>" had always priority, the user's
change in "*Default<option>: <value>" had no effect.