foomatic-db-engine
4.0-20221101
About: Foomatic DB Engine generates PPD files from the data in Foomatic’s XML database Current version.
![]() ![]() |
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 Lars Uebernickel larsuebernickel@gmx.de
This README contains mainly info for developers. See the file USAGE if you want to know how to use Foomatic.
This package and also the other Foomatic packages needed to run this are under the GPL. See http://www.gnu.org/.
If you spot a data error or any other bug, please report it on the OpenPrinting bug tracking system:
http://bugs.linux-foundation.org/
Choose "OpenPrinting" as the product and "foomatic-db-engine" as the component.
This is the stable version of Foomatic. This version is also the base of our database web interface on
Added in 4.0.0:
Support for the PDF-based printing workflow. foomatic-rip now understands both PostScript and PDF as input. PPDs are generated with two "*cupsFilter" lines now, so that CUPS knows that also PDF can get fed in. By the cost factors PDF is made the preferred input format.
foomatic-rip is rewritten in C, so that libraries can be used without needing Perl bindings.
Support for CUPS custom options. If a printer/driver combo has numerical, string, or password options, appropriate keywords are added to the PPD so that these options are also recognized as CUPS custom options (see http://www.cups.org/documentation.php/doc-1.4/spec-ppd.html for the CUPS PPD extension for custom options).
PJL/JCL options in PPD files are now generated in the standard way as defined by the PPD specs. Foomatic keywords are only used if really necessary.
Generated PPDs have now an additional "*cupsFilter:" line to tell CUPS that foomatic-rip understands PDF input (output of the "pdftopdf" CUPS filter).
Driver XML files can now have a new "<prototype_pdf>" tag
in the "
Margins in generated PPDs now default to safer values and not to zero if no margins are specified in the XML files.
CUPS page accounting can be suppressed on a per-driver basis now,
via the tag "
Added new "foomatic-ppd-to-xml" utility to generate Foomatic XML files corresponding to a given PPD file.
Printer/driver relations now can be defined by the "
Added find_printer() method, to search for printers in the database. This method is especially used by the web query API for automatic driver/PPD downloads from the OpenPrinting web site. It can also be used in a local installation with the new "foomatic-searchprinter" utility.
Added support for more detailed driver information, like license, whether it is free, whether it comes from the printer's manufacturer, support contacts, short description, by-task ratings. This gives more information to decide on downloading and installing a driver for both driver auto download and browsing the OpenPrinting web site. The information can also be used by printer setup tools using a locally installed Foomatic database. The information is available in the driver XML files (there one enters it), the PPD files, and also in the device ID strings, defined in the PPDs (so that the information goes into the output of "lpinfo -l -m" of CUPS).
Added after 3.0.2:
Added 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).
Added 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.
Added 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:
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
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.
Ideas for future releases:
(Soon) Add support for all PPD extensions for the Commom Printing Dialog: http://www.linuxfoundation.org/en/OpenPrinting/CommonPrintingDialog, http://www.linuxfoundation.org/en/OpenPrinting/PPDExtensions
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.
The XML database is fully internationalizable, For all human-readable strings translations into different languages can be added and the web query API allows localized requests with answers in the requested language. The OpenPrinting web site appears only in English currently. Not only translations can be done but there can be also different entries for the same printer driver for different regions, so that localized driver packages can get offered for automatic download.
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 a 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.
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.
The program foomatic-searchprinter finds printers in the local database, based on manufacturer/model search terms or the printer's device ID. This allows to make scripts which find the printer ID and suitable drivers automatically.
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.
The PPD files serve also for PPD-aware applications as Open Office, the GIMP (Gutenprint plug-in and printers not directly 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.
Note: The scripts appear as ".in" files in the source tree and BZR repository, because the path for the Perl interpreter/the bourne shell is inserted by the "configure" script.
configure.ac
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. This script serves also as on-the-fly PPD generator for CUPS 1.2.x and newer. "make install" creates a symlink named /usr/lib/cups/driver/foomatic to this script and so CUPS makes all PPDs of the local database available without the PPDs needing to exist physically. CUPS automatically calls foomatic-ppdfile if one of the PPDs is requested. This way in most printer setup tools (all which fully support CUPS 1.2.x and newer) all Foomatic PPDs are available, without explicit Foomatic support by the printer setup tool.
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:
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 GUI tools) 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/
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-searchprinter
With this tool it is easy to find the desired printer in the database. You do not need to know the exact manufacturer and model name and how it is written in the database. foomatic-searchprinter matches what is closest to your search term. You can even use the IEEE-1284 device ID read from your printer as search term. This tool together with foomatic-configure allows to write printer setup tools for fully automatic print queue setup. Results are shown sorted by relevance and the threshold for accepting results and the amount of results to be shown is adjustable. See "foomatic-searchprinter -h" for available options.
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: HP-LaserJet_4050), hostname printer6, port 9100:
rm -f grep -li "pjl" db/source/opt/*.xml
rm -f foomatic-db/opt/pjl-HP-LaserJet_4050-*
foomatic-getpjloptions printer6 9100 | foomatic-addpjloptions -p HP-LaserJet_4050
foomatic-kitload -k foomatic-db/
foomatic-configure -n LaserJet4050 -c socket://printer6:9100/
-d pxlmono -p HP-LaserJet_4050
Instead of using "foomatic-configure" you can also generate the PPD file:
./foomatic-ppdfile -d pxlmono -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
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-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 many 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, 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. 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 not need the many non-standard Perl XML libraries which would make the installation of Foomatic very awkward. Now 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.
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 non-standard 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.
foomatic-ppd-to-xml
Generates a printer XML file from a given PPD file. This is for example used to make database entries for printers for which there is a manufacturer-supplied PPD file.
foomatic-printermap-to-gutenprint-xml
Updates the driver XML file for the Gutenprint driver to the state of the foomatic-printermap file in the Gutenprint source tree. Used to update the driver XML file for Gutenprint in the OpenPrinting database.
foomatic-ppd-options
Lists the options in a PPD file one the screen.
To be able to print with the PPD files and queues made with the stuff in this package, you need only 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 or PDF 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 or PDF, a pre-filter ("a2ps", "enscript", "mpage", ...) is added.
The database is provided by the "foomatic-db" package, additional database entries are in "foomatic-db-nonfree", drivers can also supply Foomatic XML files. "foomatic-db" is required for using the programs provided by this package.
There is a $libdir, somewhere (usually /usr/share/foomatic/). 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 and for printer IDs which go changed
db/kitload.log - list of third-party "kit" files, logged by
foomatic-kitload db/source/ - "source" data, provided by humans, etc
db/source/printer/
You can edit the files whenever you want and regenerate the affected printer queues with foomatic-configure, there is no on-disk cache, the data is always directly derived from the source files. So your changes will be taken into account without any special steps.
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 normalizename
These are used for sorts to sort printer model names properly and also to do searches for printer models/IDs. normalize makes the input string all lower-case, turns a '+' tp 'plus', and removes all non-alphanumeric characters. normalizename turns all groups of digits to a zero-padded fixed-length number, so that printers with the same product line name (like "LaserJet") and different model numbers appear in correct numerical order. In addition, normalizename also applies normalize.
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.
find_printer
This function returns Foomatic printer IDs to match a given search term. The search term can be manufacturer and model, separated by a space or a '|', an IEEE-1284 device ID of a printer, manufacturer, model, Foomatic printer ID, or parts of any of the mentioned items.
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.
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 their components get auto-detected during the build of this package.
"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
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.
The versions 1.8.17 and 2.4.19 of libxml are tested, 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 the BZR repository.
See the USAGE file for compilation details.
There are three main source datafiles (printers, drivers, and options; annotated examples:
<laser />
<!--not "color"-->
<resolution>
<dpi>
<x>1200</x>
<y>1200</y>
</dpi>
</resolution>
<consumables>
<comments>
<en>toner</en>
</comments>
<!--one or more "partno" elements.-->
</consumables>
lpinfo -l -m
$ like this:
<!--no known parport probe information-->
, <a
<i>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 "Mostly"<p></i><p>
Do the following:<p>
Set the resolution on the front panel to "Prores 1200", not
to "Fastres 1200". When you use CUPS with HPs PPD file, turn
off "Fastres 1200" in the printer configuration
options.<p>
Try the generic PostScript PPD file which comes with KUPS 1.0 or newer.
</en>
The driver files contain information about drivers. There are a few things, but the two biggies are the prototype and the printers list
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:
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:
.Gray Grayscale printing on a color printer .Mono Monochrome printing (no grayscales, black or white)
Examples:
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:
The shown option is only an example, it is neither in the BZR repository 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 option, 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 '
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 option 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 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=-
where
<</PageSize[
where
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:
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.
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 "(?
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:
< --> <
--> > " --> " ' --> ' & --> &
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):
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 regular 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 "<" 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):
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.
CUPS defines several extensions to the PPD specifications to support the functionality of modern printers:
http://www.cups.org/documentation.php/doc-1.4/spec-ppd.html
There are extensions for so-called "Custom Options" where instead of given enumerated choices freely choosable custom values can be supplied. As Foomatic's numerical, string, and password options can be implemented as CUPS custom options in the PPDs as well, the PPD generator does both implementations in the PPDs. There are the "*Foomatic..." keywords generated, as before, but also the CUPS PPD extension, consisting of the keywords "*Custom
foomatic-rip understands also PPD files now which describe custom options only by the CUPS extension and not with "*Foomatic..." keywords.
Allowed characters and regular expressions for string and password options cannot be described by CUPS PPD extensions. So CUPS-aware GUIs will allow input of strings which do not match these restrictions, but foomatic-rip will let the option fall back to the default value in such a case. This way the security is assured.
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.
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 application programs to know about these margins PPD files 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 generate these lines one can use the following XML structure in the Foomatic database entries:
This structure is allowed in printer entries in the "
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 ("
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 "
The "
"hpijs" driver, default resolution for HP DeskJet 350. For this
driver the default resolution depends on the printer class. Therefore
the appropriate "
"pnm2ppa" driver: This driver has no "Resolution" option, and all
printers print in 600 dpi with it. So we put the "
Note that leading spaces are removed from the lines between the
"
The lines are added at the end of the PPD file header, right after the lines for the basic hardware capabilities of the printer.
Below is an example PPD file, the PPD file for the HP Color LaserJet 4550 used with the "pxlcolor" driver. It was generated with the command line
./foomatic-ppdfile -p HP-Color_LaserJet_4550 -d pxlcolor
The structure is completely Adobe-compliant and no relevant 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.
Independent whether there is auto-detection information, there is an additional "DRV:" field in the "*1284DeviceID:" which contains driver properties. These properties are put here, so that they appear in CUPS' PPD/driver overview listings ("lpinfo -l -m"). This way a printer setup tool can show the driver properties in a driver overview without needing to generate and read the PPD files. The following properties are available (comma-separated):
D: Driver name R: Driver Recommended for this printer (0, 1)? M: Driver supplied by the Manufacturer (0, 1)? O: Driver marked Obsolete in the OpenPrinting database (0, 1)? F: Driver is Free software (0, 1)? P: Driver has Patent issues (0, 1)? S: Support contacts (c: commercial, v: voluntary, u: unknown, more than one possible) T: Driver Type: G: Ghostscript built-in, C: CUPS-Raster, I: IJS, O: OpenPrinting Vector, F: Filter, U: Ghostscript Uniprint, P: PostScript X: Maximum X resolution of the driver in dpi Y: Maximum Y resolution of the driver in dpi C: Does the driver support Color printing (0, 1)? t: Rating for Text document printing with this driver (0 ... 100) l: Rating for Line art document printing with this driver (0 ... 100) g: Rating for Graphics document printing with this driver (0 ... 100) p: Rating for Photo document printing with this driver (0 ... 100) d: Rating for system loaD caused when printing with this driver (0 ... 100) s: Rating for processing Speed of this driver (0 ... 100)
The "DRV:" field in a device ID looks like this:
*1284DeviceID: "MFG:Hewlett-Packard;MDL:HP LaserJet 4050 Series;CMD:PJL,MLC,PCL, PCLXL,POSTSCRIPT;DES:Hewlett-Packard LaserJet 4050 Series;DRV:Dljet4,R0,M0,F1,Sv,TG,X600,Y600,C0,t90,l90,g60,p30,s90;"
If there is no device ID for a printer, the "*1284DeviceID" will contain only the "DRV:" field.
The PPDs contain the driver properties also in clear text, like this:
*driverName ljet4/ljet4 - Built-in Ghostscript driver for PCL 5e laser printers: "" *driverType G/Ghostscript built-in: "" *driverUrl: "http://www.ghostscript.com/" *driverObsolete: False *driverRecommendedReplacement: hpijs (only if driver is obsolete) *driverSupplier: "GPL Ghostscript" *driverManufacturerSupplied: False *driverLicense: "GPL" *driverFreeSoftware: True *driverSupportContactVoluntary: "http://forums.openprinting.org/ OpenPrinting forums" *driverSupportContactCommercial: "http://... ..." *driverSupportContactUnknown: "http://... ..." *driverMaxResolution: 600 600 *driverColor: False *driverTextSupport: 90 *driverLineartSupport: 90 *driverGraphicsSupport: 60 *driverPhotoSupport: 30 *driverSystemmLoad: 90 *driverRenderingSpeed: 90
*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 (4.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 4.0.0 or newer. This *% file and "foomatic-rip" work together to support PPD-controlled printer *% driver option access with all supported 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 'HP-Color_LaserJet_4550-pxlcolor.ppd' *% *% *FormatVersion: "4.3" *FileVersion: "1.1" *LanguageVersion: English *LanguageEncoding: ISOLatin1 *PCFileName: "PXLCOLOR.PPD" *Manufacturer: "HP" *Product: "(HP Color LaserJet 4550)" *cupsVersion: 1.0 *cupsManualCopies: True *cupsModelNumber: 2 *cupsFilter: "application/vnd.cups-postscript 100 foomatic-rip" *cupsFilter: "application/vnd.cups-pdf 0 foomatic-rip" *%pprRIP: foomatic-rip other *ModelName: "HP Color LaserJet 4550" *ShortNickName: "HP Color LaserJet 4550 pxlcolor" *NickName: "HP Color LaserJet 4550 Foomatic/pxlcolor" *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" *PSVersion: "(3010.000) 815" *PSVersion: "(3010.000) 850" *PSVersion: "(3010.000) 860" *PSVersion: "(3010.000) 861" *PSVersion: "(3010.000) 862" *PSVersion: "(3010.000) 863" *LanguageLevel: "3" *ColorDevice: True *DefaultColorSpace: RGB *FileSystem: False *Throughput: "1" *LandscapeOrientation: Plus90 *TTRasterizer: Type42 *1284DeviceID: "MFG:Hewlett-Packard;MDL:HP Color LaserJet 4550;CMD:PJL,MLC,PCL,POSTSCRIPT,PCLXL,PJL;DES:Hewlett-Packard Color LaserJet 4550;DRV:Dpxlcolor,R0,M0,TG;"
*driverName pxlcolor/pxlcolor: "" *driverType G/Ghostscript built-in: "" *driverUrl: "http://www.ghostscript.com/" *driverObsolete: False
*DefaultResolution: 1200dpi
*VariablePaperSize: False
*FoomaticIDs: HP-Color_LaserJet_4550 pxlcolor *FoomaticRIPCommandLine: "gs -q -dBATCH -dPARANOIDSAFER -dNOPAUSE%B%A%&& Z -sOutputFile=- - | perl -p -e 'if (! $did) { s/\xc0.\xf8\x26/\x&& c0%E\xf8\x26/ && $did++; }'" *End
*OpenGroup: General/General
*OpenUI *PrintoutMode/Printout Mode: PickOne *FoomaticRIPOption PrintoutMode: enum Composite A *OrderDependency: 10 AnySetup *PrintoutMode *DefaultPrintoutMode: Normal *PrintoutMode Draft/Draft: "%% FoomaticRIPOptionSetting: PrintoutMode=Draft" *FoomaticRIPOptionSetting PrintoutMode=Draft: "PrinterResolution=300x3&& 00dpi ColorModel=Color Economode=On FastRes=Off" *End *PrintoutMode Draft.Gray/Draft Grayscale: "%% FoomaticRIPOptionSetting: PrintoutMode=Draft.Gray" *FoomaticRIPOptionSetting PrintoutMode=Draft.Gray: "PrinterResolution=&& 300x300dpi ColorModel=Grayscale Economode=On FastRes=Off" *End *PrintoutMode Normal/Normal: "%% FoomaticRIPOptionSetting: PrintoutMode=Normal" *FoomaticRIPOptionSetting PrintoutMode=Normal: "PrinterResolution=600x&& 600dpi ColorModel=Color Economode=Off FastRes=On" *End *PrintoutMode Normal.Gray/Normal Grayscale: "%% FoomaticRIPOptionSetting: PrintoutMode=Normal.Gray" *FoomaticRIPOptionSetting PrintoutMode=Normal.Gray: "PrinterResolution&& =600x600dpi ColorModel=Grayscale Economode=Off FastRes=On" *End *PrintoutMode High/High Quality: "%% FoomaticRIPOptionSetting: PrintoutMode=High" *FoomaticRIPOptionSetting PrintoutMode=High: "PrinterResolution=1200x1&& 200dpi ColorModel=Color Economode=Off FastRes=Off" *End *PrintoutMode High.Gray/High Quality Grayscale: "%% FoomaticRIPOptionSetting: PrintoutMode=High.Gray" *FoomaticRIPOptionSetting PrintoutMode=High.Gray: "PrinterResolution=1&& 200x1200dpi ColorModel=Grayscale Economode=Off FastRes=Off" *End *CloseUI: *PrintoutMode
*OpenUI *PageSize/Page Size: PickOne *FoomaticRIPOption PageSize: enum CmdLine A *OrderDependency: 100 AnySetup *PageSize *DefaultPageSize: Letter *PageSize Letter/US Letter: "%% FoomaticRIPOptionSetting: PageSize=Letter" *FoomaticRIPOptionSetting PageSize=Letter: " -dDEVICEWIDTHPOINTS=612 -&& dDEVICEHEIGHTPOINTS=792" *End *PageSize A4/A4: "%% FoomaticRIPOptionSetting: PageSize=A4" *FoomaticRIPOptionSetting PageSize=A4: " -dDEVICEWIDTHPOINTS=595 -dDEV&& ICEHEIGHTPOINTS=842" *End *PageSize 11x17/11x17: "%% FoomaticRIPOptionSetting: PageSize=11x17" *FoomaticRIPOptionSetting PageSize=11x17: " -dDEVICEWIDTHPOINTS=792 -d&& DEVICEHEIGHTPOINTS=1224" *End *PageSize A3/A3: "%% FoomaticRIPOptionSetting: PageSize=A3" *FoomaticRIPOptionSetting PageSize=A3: " -dDEVICEWIDTHPOINTS=842 -dDEV&& ICEHEIGHTPOINTS=1191" *End *PageSize A5/A5: "%% FoomaticRIPOptionSetting: PageSize=A5" *FoomaticRIPOptionSetting PageSize=A5: " -dDEVICEWIDTHPOINTS=421 -dDEV&& ICEHEIGHTPOINTS=595" *End *PageSize B5/B5 (JIS): "%% FoomaticRIPOptionSetting: PageSize=B5" *FoomaticRIPOptionSetting PageSize=B5: " -dDEVICEWIDTHPOINTS=516 -dDEV&& ICEHEIGHTPOINTS=729" *End *PageSize Env10/Envelope #10: "%% FoomaticRIPOptionSetting: PageSize=Env10" *FoomaticRIPOptionSetting PageSize=Env10: " -dDEVICEWIDTHPOINTS=297 -d&& DEVICEHEIGHTPOINTS=684" *End *PageSize EnvC5/Envelope C5: "%% FoomaticRIPOptionSetting: PageSize=EnvC5" *FoomaticRIPOptionSetting PageSize=EnvC5: " -dDEVICEWIDTHPOINTS=459 -d&& DEVICEHEIGHTPOINTS=649" *End *PageSize EnvDL/Envelope DL: "%% FoomaticRIPOptionSetting: PageSize=EnvDL" *FoomaticRIPOptionSetting PageSize=EnvDL: " -dDEVICEWIDTHPOINTS=312 -d&& DEVICEHEIGHTPOINTS=624" *End *PageSize EnvISOB5/Envelope B5: "%% FoomaticRIPOptionSetting: PageSize=EnvISOB5" *FoomaticRIPOptionSetting PageSize=EnvISOB5: " -dDEVICEWIDTHPOINTS=499&& -dDEVICEHEIGHTPOINTS=709" *End *PageSize EnvMonarch/Envelope Monarch: "%% FoomaticRIPOptionSetting: PageSize=EnvMonarch" *FoomaticRIPOptionSetting PageSize=EnvMonarch: " -dDEVICEWIDTHPOINTS=2&& 79 -dDEVICEHEIGHTPOINTS=540" *End *PageSize Executive/Executive: "%% FoomaticRIPOptionSetting: PageSize=Executive" *FoomaticRIPOptionSetting PageSize=Executive: " -dDEVICEWIDTHPOINTS=52&& 2 -dDEVICEHEIGHTPOINTS=756" *End *PageSize Legal/US Legal: "%% FoomaticRIPOptionSetting: PageSize=Legal" *FoomaticRIPOptionSetting PageSize=Legal: " -dDEVICEWIDTHPOINTS=612 -d&& DEVICEHEIGHTPOINTS=1008" *End *CloseUI: *PageSize
*OpenUI *PageRegion: PickOne *OrderDependency: 100 AnySetup *PageRegion *DefaultPageRegion: Letter *PageRegion Letter/US Letter: "%% FoomaticRIPOptionSetting: PageSize=Letter" *PageRegion A4/A4: "%% FoomaticRIPOptionSetting: PageSize=A4" *PageRegion 11x17/11x17: "%% FoomaticRIPOptionSetting: PageSize=11x17" *PageRegion A3/A3: "%% FoomaticRIPOptionSetting: PageSize=A3" *PageRegion A5/A5: "%% FoomaticRIPOptionSetting: PageSize=A5" *PageRegion B5/B5 (JIS): "%% FoomaticRIPOptionSetting: PageSize=B5" *PageRegion Env10/Envelope #10: "%% FoomaticRIPOptionSetting: PageSize=Env10" *PageRegion EnvC5/Envelope C5: "%% FoomaticRIPOptionSetting: PageSize=EnvC5" *PageRegion EnvDL/Envelope DL: "%% FoomaticRIPOptionSetting: PageSize=EnvDL" *PageRegion EnvISOB5/Envelope B5: "%% FoomaticRIPOptionSetting: PageSize=EnvISOB5" *PageRegion EnvMonarch/Envelope Monarch: "%% FoomaticRIPOptionSetting: PageSize=EnvMonarch" *PageRegion Executive/Executive: "%% FoomaticRIPOptionSetting: PageSize=Executive" *PageRegion Legal/US Legal: "%% FoomaticRIPOptionSetting: PageSize=Legal" *CloseUI: *PageRegion
*DefaultImageableArea: Letter *ImageableArea Letter/US Letter: "18 36 594 756" *ImageableArea A4/A4: "18 36 577 806" *ImageableArea 11x17/11x17: "18 36 774 1188" *ImageableArea A3/A3: "18 36 824 1155" *ImageableArea A5/A5: "18 36 403 559" *ImageableArea B5/B5 (JIS): "18 36 498 693" *ImageableArea Env10/Envelope #10: "18 36 279 648" *ImageableArea EnvC5/Envelope C5: "18 36 441 613" *ImageableArea EnvDL/Envelope DL: "18 36 294 588" *ImageableArea EnvISOB5/Envelope B5: "18 36 481 673" *ImageableArea EnvMonarch/Envelope Monarch: "18 36 261 504" *ImageableArea Executive/Executive: "18 36 504 720" *ImageableArea Legal/US Legal: "18 36 594 972"
*DefaultPaperDimension: Letter *PaperDimension Letter/US Letter: "612 792" *PaperDimension A4/A4: "595 842" *PaperDimension 11x17/11x17: "792 1224" *PaperDimension A3/A3: "842 1191" *PaperDimension A5/A5: "421 595" *PaperDimension B5/B5 (JIS): "516 729" *PaperDimension Env10/Envelope #10: "297 684" *PaperDimension EnvC5/Envelope C5: "459 649" *PaperDimension EnvDL/Envelope DL: "312 624" *PaperDimension EnvISOB5/Envelope B5: "499 709" *PaperDimension EnvMonarch/Envelope Monarch: "279 540" *PaperDimension Executive/Executive: "522 756" *PaperDimension Legal/US Legal: "612 1008"
*OpenUI *InputSlot/Media Source: PickOne *FoomaticRIPOption InputSlot: enum CmdLine E *OrderDependency: 100 AnySetup *InputSlot *DefaultInputSlot: Default *InputSlot Default/Printer default: "%% FoomaticRIPOptionSetting: InputSlot=Default" *FoomaticRIPOptionSetting InputSlot=Default: "\x01" *InputSlot Tray1/Tray 1: "%% FoomaticRIPOptionSetting: InputSlot=Tray1" *FoomaticRIPOptionSetting InputSlot=Tray1: "\x03" *InputSlot Tray2/Tray 2: "%% FoomaticRIPOptionSetting: InputSlot=Tray2" *FoomaticRIPOptionSetting InputSlot=Tray2: "\x04" *InputSlot Tray3/Tray 3: "%% FoomaticRIPOptionSetting: InputSlot=Tray3" *FoomaticRIPOptionSetting InputSlot=Tray3: "\x05" *InputSlot Tray4/Tray 4: "%% FoomaticRIPOptionSetting: InputSlot=Tray4" *FoomaticRIPOptionSetting InputSlot=Tray4: "\x06" *InputSlot Tray5/Tray 5: "%% FoomaticRIPOptionSetting: InputSlot=Tray5" *FoomaticRIPOptionSetting InputSlot=Tray5: "\x07" *InputSlot Tray6/Tray 6: "%% FoomaticRIPOptionSetting: InputSlot=Tray6" *FoomaticRIPOptionSetting InputSlot=Tray6: "\x08" *InputSlot Tray7/Tray 7: "%% FoomaticRIPOptionSetting: InputSlot=Tray7" *FoomaticRIPOptionSetting InputSlot=Tray7: "\x09" *InputSlot Manual/Manual Feeder: "%% FoomaticRIPOptionSetting: InputSlot=Manual" *FoomaticRIPOptionSetting InputSlot=Manual: "\x02" *CloseUI: *InputSlot
*JCLOpenUI *Manualfeed/Manual Feed of Paper: PickOne *OrderDependency: 100 JCLSetup *Manualfeed *DefaultManualfeed: Off *Manualfeed Off/Off: "@PJL SET MANUALFEED=OFF<0A>" *Manualfeed On/On: "@PJL SET MANUALFEED=ON<0A>" *JCLCloseUI: *Manualfeed
*OpenUI *Duplex/Double-Sided printing: PickOne *FoomaticRIPOption Duplex: enum CmdLine A *OrderDependency: 100 AnySetup *Duplex *DefaultDuplex: None *Duplex DuplexNoTumble/On (Flip on Long Edge): "%% FoomaticRIPOptionSetting: Duplex=DuplexNoTumble" *FoomaticRIPOptionSetting Duplex=DuplexNoTumble: " -dDuplex" *Duplex DuplexTumble/On (Flip on Short Edge): "%% FoomaticRIPOptionSetting: Duplex=DuplexTumble" *FoomaticRIPOptionSetting Duplex=DuplexTumble: " -dDuplex -dTumble" *Duplex None/Off: "%% FoomaticRIPOptionSetting: Duplex=None" *FoomaticRIPOptionSetting Duplex=None: "" *CloseUI: *Duplex
*JCLOpenUI *Copies/Number of Copies: PickOne *FoomaticRIPOption Copies: int JCL A *FoomaticRIPOptionPrototype Copies: "SET COPIES=%s" *FoomaticRIPOptionRange Copies: 1 100 *OrderDependency: 100 JCLSetup *Copies *DefaultCopies: 1 *FoomaticRIPDefaultCopies: 1 *Copies 1/1: "@PJL SET COPIES=1<0A>" *Copies 2/2: "@PJL SET COPIES=2<0A>" *Copies 3/3: "@PJL SET COPIES=3<0A>" *Copies 4/4: "@PJL SET COPIES=4<0A>" *Copies 5/5: "@PJL SET COPIES=5<0A>" *Copies 6/6: "@PJL SET COPIES=6<0A>" *Copies 7/7: "@PJL SET COPIES=7<0A>" *Copies 8/8: "@PJL SET COPIES=8<0A>" *Copies 9/9: "@PJL SET COPIES=9<0A>" *Copies 10/10: "@PJL SET COPIES=10<0A>" *Copies 11/11: "@PJL SET COPIES=11<0A>" *Copies 12/12: "@PJL SET COPIES=12<0A>" *Copies 13/13: "@PJL SET COPIES=13<0A>" *Copies 14/14: "@PJL SET COPIES=14<0A>" *Copies 15/15: "@PJL SET COPIES=15<0A>" *Copies 16/16: "@PJL SET COPIES=16<0A>" *Copies 17/17: "@PJL SET COPIES=17<0A>" *Copies 18/18: "@PJL SET COPIES=18<0A>" *Copies 19/19: "@PJL SET COPIES=19<0A>" *Copies 20/20: "@PJL SET COPIES=20<0A>" *Copies 21/21: "@PJL SET COPIES=21<0A>" *Copies 22/22: "@PJL SET COPIES=22<0A>" *Copies 23/23: "@PJL SET COPIES=23<0A>" *Copies 24/24: "@PJL SET COPIES=24<0A>" *Copies 25/25: "@PJL SET COPIES=25<0A>" *Copies 26/26: "@PJL SET COPIES=26<0A>" *Copies 27/27: "@PJL SET COPIES=27<0A>" *Copies 28/28: "@PJL SET COPIES=28<0A>" *Copies 29/29: "@PJL SET COPIES=29<0A>" *Copies 30/30: "@PJL SET COPIES=30<0A>" *Copies 31/31: "@PJL SET COPIES=31<0A>" *Copies 32/32: "@PJL SET COPIES=32<0A>" *Copies 33/33: "@PJL SET COPIES=33<0A>" *Copies 34/34: "@PJL SET COPIES=34<0A>" *Copies 35/35: "@PJL SET COPIES=35<0A>" *Copies 36/36: "@PJL SET COPIES=36<0A>" *Copies 37/37: "@PJL SET COPIES=37<0A>" *Copies 38/38: "@PJL SET COPIES=38<0A>" *Copies 39/39: "@PJL SET COPIES=39<0A>" *Copies 40/40: "@PJL SET COPIES=40<0A>" *Copies 41/41: "@PJL SET COPIES=41<0A>" *Copies 42/42: "@PJL SET COPIES=42<0A>" *Copies 43/43: "@PJL SET COPIES=43<0A>" *Copies 44/44: "@PJL SET COPIES=44<0A>" *Copies 45/45: "@PJL SET COPIES=45<0A>" *Copies 46/46: "@PJL SET COPIES=46<0A>" *Copies 47/47: "@PJL SET COPIES=47<0A>" *Copies 48/48: "@PJL SET COPIES=48<0A>" *Copies 49/49: "@PJL SET COPIES=49<0A>" *Copies 50/50: "@PJL SET COPIES=50<0A>" *Copies 51/51: "@PJL SET COPIES=51<0A>" *Copies 52/52: "@PJL SET COPIES=52<0A>" *Copies 53/53: "@PJL SET COPIES=53<0A>" *Copies 54/54: "@PJL SET COPIES=54<0A>" *Copies 55/55: "@PJL SET COPIES=55<0A>" *Copies 56/56: "@PJL SET COPIES=56<0A>" *Copies 57/57: "@PJL SET COPIES=57<0A>" *Copies 58/58: "@PJL SET COPIES=58<0A>" *Copies 59/59: "@PJL SET COPIES=59<0A>" *Copies 60/60: "@PJL SET COPIES=60<0A>" *Copies 61/61: "@PJL SET COPIES=61<0A>" *Copies 62/62: "@PJL SET COPIES=62<0A>" *Copies 63/63: "@PJL SET COPIES=63<0A>" *Copies 64/64: "@PJL SET COPIES=64<0A>" *Copies 65/65: "@PJL SET COPIES=65<0A>" *Copies 66/66: "@PJL SET COPIES=66<0A>" *Copies 67/67: "@PJL SET COPIES=67<0A>" *Copies 68/68: "@PJL SET COPIES=68<0A>" *Copies 69/69: "@PJL SET COPIES=69<0A>" *Copies 70/70: "@PJL SET COPIES=70<0A>" *Copies 71/71: "@PJL SET COPIES=71<0A>" *Copies 72/72: "@PJL SET COPIES=72<0A>" *Copies 73/73: "@PJL SET COPIES=73<0A>" *Copies 74/74: "@PJL SET COPIES=74<0A>" *Copies 75/75: "@PJL SET COPIES=75<0A>" *Copies 76/76: "@PJL SET COPIES=76<0A>" *Copies 77/77: "@PJL SET COPIES=77<0A>" *Copies 78/78: "@PJL SET COPIES=78<0A>" *Copies 79/79: "@PJL SET COPIES=79<0A>" *Copies 80/80: "@PJL SET COPIES=80<0A>" *Copies 81/81: "@PJL SET COPIES=81<0A>" *Copies 82/82: "@PJL SET COPIES=82<0A>" *Copies 83/83: "@PJL SET COPIES=83<0A>" *Copies 84/84: "@PJL SET COPIES=84<0A>" *Copies 85/85: "@PJL SET COPIES=85<0A>" *Copies 86/86: "@PJL SET COPIES=86<0A>" *Copies 87/87: "@PJL SET COPIES=87<0A>" *Copies 88/88: "@PJL SET COPIES=88<0A>" *Copies 89/89: "@PJL SET COPIES=89<0A>" *Copies 90/90: "@PJL SET COPIES=90<0A>" *Copies 91/91: "@PJL SET COPIES=91<0A>" *Copies 92/92: "@PJL SET COPIES=92<0A>" *Copies 93/93: "@PJL SET COPIES=93<0A>" *Copies 94/94: "@PJL SET COPIES=94<0A>" *Copies 95/95: "@PJL SET COPIES=95<0A>" *Copies 96/96: "@PJL SET COPIES=96<0A>" *Copies 97/97: "@PJL SET COPIES=97<0A>" *Copies 98/98: "@PJL SET COPIES=98<0A>" *Copies 99/99: "@PJL SET COPIES=99<0A>" *Copies 100/100: "@PJL SET COPIES=100<0A>" *JCLCloseUI: *Copies
*CustomJCLCopies True: "@PJL SET COPIES=\1<0A>" *ParamCustomJCLCopies Copies/Number of Copies: 1 int 1 100
*CloseGroup: General
*OpenGroup: Adjustment/Adjustment
*JCLOpenUI *REt/REt Setting: PickOne *OrderDependency: 100 JCLSetup *REt *DefaultREt: Medium *REt Dark/Dark: "@PJL SET RET=DARK<0A>" *REt Light/Light: "@PJL SET RET=LIGHT<0A>" *REt Medium/Medium: "@PJL SET RET=MEDIUM<0A>" *REt Off/Off: "@PJL SET RET=OFF<0A>" *JCLCloseUI: *REt
*JCLOpenUI *TonerDensity/Toner Density: PickOne *OrderDependency: 100 JCLSetup *TonerDensity *DefaultTonerDensity: 3 *TonerDensity 1/1: "@PJL SET DENSITY=1<0A>" *TonerDensity 2/2: "@PJL SET DENSITY=2<0A>" *TonerDensity 3/3: "@PJL SET DENSITY=3<0A>" *TonerDensity 4/4: "@PJL SET DENSITY=4<0A>" *TonerDensity 5/5: "@PJL SET DENSITY=5<0A>" *JCLCloseUI: *TonerDensity
*FoomaticRIPOption GSResolution: enum CmdLine A 100 *FoomaticRIPOptionSetting GSResolution=FromPrinterResolution: "" *FoomaticRIPOptionSetting GSResolution=300x300dpi: " -r300x300" *FoomaticRIPOptionSetting GSResolution=600x600dpi: " -r600x600" *FoomaticRIPOptionSetting GSResolution=1200x600dpi: " -r1200x600" *FoomaticRIPOptionSetting GSResolution=1200x1200dpi: " -r1200x1200"
*FoomaticRIPOption JCLResolution: enum JCL A 100 *FoomaticRIPOptionSetting JCLResolution=FromPrinterResolution: "" *FoomaticRIPOptionSetting JCLResolution=300x300dpi: "SET RESOLUTION=30&& 0" *End *FoomaticRIPOptionSetting JCLResolution=600x600dpi: "SET RESOLUTION=60&& 0" *End *FoomaticRIPOptionSetting JCLResolution=1200x600dpi: "SET RESOLUTION=1&& 200x600" *End *FoomaticRIPOptionSetting JCLResolution=1200x1200dpi: "SET RESOLUTION=&& 1200" *End
*CloseGroup: Adjustment
*OpenGroup: PrintoutMode/Printout Mode
*OpenUI *FastRes/Fast Res.: PickOne *OrderDependency: 100 AnySetup *FastRes *DefaultFastRes: FromPrintoutMode *FastRes FromPrintoutMode/Controlled by 'Printout Mode': "%% FoomaticRIPOptionSetting: FastRes=@PrintoutMode" *FastRes Off/Off: "@PJL SET BITSPERPIXEL=1<0A>" *FastRes On/On: "@PJL SET BITSPERPIXEL=2<0A>" *CloseUI: *FastRes
*OpenUI *Economode/Toner Saving: PickOne *OrderDependency: 100 AnySetup *Economode *DefaultEconomode: FromPrintoutMode *Economode FromPrintoutMode/Controlled by 'Printout Mode': "%% FoomaticRIPOptionSetting: Economode=@PrintoutMode" *Economode Off/Off: "@PJL SET ECONOMODE=OFF<0A>" *Economode On/On: "@PJL SET ECONOMODE=ON<0A>" *CloseUI: *Economode
*OpenUI *ColorModel/Color Mode: PickOne *FoomaticRIPOption ColorModel: enum CmdLine B *OrderDependency: 100 AnySetup *ColorModel *DefaultColorModel: FromPrintoutMode *ColorModel FromPrintoutMode/Controlled by 'Printout Mode': "%% FoomaticRIPOptionSetting: ColorModel=@PrintoutMode" *ColorModel Color/Color: "%% FoomaticRIPOptionSetting: ColorModel=Color" *FoomaticRIPOptionSetting ColorModel=Color: " -sDEVICE=pxlcolor" *ColorModel Grayscale/Grayscale: "%% FoomaticRIPOptionSetting: ColorModel=Grayscale" *FoomaticRIPOptionSetting ColorModel=Grayscale: " -sDEVICE=pxlmono" *CloseUI: *ColorModel
*OpenUI *PrinterResolution/Resolution: PickOne *FoomaticRIPOption PrinterResolution: enum Composite A *OrderDependency: 99 AnySetup *PrinterResolution *DefaultPrinterResolution: FromPrintoutMode *PrinterResolution FromPrintoutMode/Controlled by 'Printout Mode': "%% FoomaticRIPOptionSetting: PrinterResolution=FromPrintoutMode" *FoomaticRIPOptionSetting PrinterResolution=FromPrintoutMode: "" *PrinterResolution 300x300dpi/300 DPI: "%% FoomaticRIPOptionSetting: PrinterResolution=300x300dpi" *FoomaticRIPOptionSetting PrinterResolution=300x300dpi: "JCLResolution&& =300x300dpi GSResolution=300x300dpi" *End *PrinterResolution 600x600dpi/600 DPI: "%% FoomaticRIPOptionSetting: PrinterResolution=600x600dpi" *FoomaticRIPOptionSetting PrinterResolution=600x600dpi: "JCLResolution&& =600x600dpi GSResolution=600x600dpi" *End *CloseUI: *PrinterResolution
*CloseGroup: PrintoutMode
*% Generic boilerplate PPD stuff as standard PostScript fonts and so on
*FoomaticIDs:
*FoomaticRIPPostPipe: ""
: A shell command line into
which the output of foomatic-rip is piped. Only used with LPRng, LPD,
GNUlpr, spooler-less
*FoomaticRIPCammandLine: ""
: The general command line
prototype, with spots to insert option settings ("%A", "%B", ...).
*FoomaticRIPCammandLinePDF: ""
: The command line
prototype for PDF input if it is different to the one for PostScript
input, with spots to insert option settings ("%A", "%B", ...).
*FoomaticRIPNoPageAccounting:
*FoomaticRIPOption