Home
News
Database
Printer Listings
Driver Listings
Suggested Printers
Foomatic
CUPS QuickStart
PPD Docs
LPD Docs
PDQ Docs
PPR Docs
No Spooler Docs
Forums
Tutorial
CUPS Help!
Other Docs
FAQ's
Vendor Info
Articles
Projects
Mac OS X
About this site
Contributing
Grant Taylor
Till Kamppeter
|
We support PDQ through the PPD-O-Matic PPD generator and companion
foomatic-rip filter script. What
follows is quick-start information on setting up your printer with
this pair, followed by some details on how it all works.
Note: PDQ computes the entire job before sending it to the printer.
This means that large and/or computationally intensive jobs may
involve a long delay before printing. This will mostly be of concern
to color inkjet owners. For large format printers (A3/13x18inch and
bigger) PDQ is not recommended, if you do not want to use one of the
usual spoolers (CUPS, LPRng, PPR, ...) for them, consider direct spooler-less printing.
Quick Start
This system should work with PDQ version 2.1.2 or newer. Check that
you have this installed; see the PDQ website for details.
The foomatic-rip system does not only allow printing of PostScript
files, but also printing of plain text, PDF, images, TeX/LaTeX, DVI,
and perhaps other file formats. For plain text you must have one of
the converters "a2ps", "enscript", or
"mpage" installed
on your machine, for the other formats both "a2ps" (to
detect the format) and ImageMagick (for images), GhostScript 6.51 or
newer (for PDF) and/or TeX and LaTeX (for TeX, LaTeX, and DVI) must be
installed. Most distributions provide these programs, but not
necessarily all of them are installed by default. foomatic-rip will
auto-detect the installed converters and automatically choose the best
one.
If you have a Postscript printer, you can make use of the PPD file
provided by the printer's manufacturer. You can use also these PPDs
with foomatic-rip, simply use them instead of the PPD-O-Matic PPD from
this site. See the "Postscript" driver page
and the instructions on how to use PPD
files for more information.
More detailed instructions with examples and screenshots you will find
in the tutorial chapter "Foomatic
from the User's Point of View: Installing a Printer" (PDF). Note
that the instructions in the tutorial are for the former Foomatic
2.0.x.
- If your printer is not a native PostScript printer, you will need the
driver that you wish to use installed
(foomatic-rip and the PPD file only provide a way to connect PDQ
to your driver). There are several styles of driver; the ones
suitable for your printer will be referenced from your printer's
page in the database:
- Ghostscript
- Most Ghostscript drivers are included in typical
distributions of Ghostscript, but some are not. You can
see the available Ghostscript drivers on your system with
'gs -h'. If the driver you need is not listed;
you will need to obtain a new Ghostscript package with the
driver included, or compile Ghostscript yourself. Here
ESP
GhostScript is highly recommended, as
since version 7.05.4 it contains all GhostScript drivers
listed on this site. For
many third-party drivers, the driver authors distribute
special Ghostscript packages including the needed driver;
give that a shot first.
- Uniprint
- Some Ghostscript drivers are Uniprint drivers. These
consist simply of a upp file containing various parameters;
most are included with Ghostscript. Others you will need
to obtain and place in your ghostscript library directory
(one of the directories listed under "Search path:" in the
end of the "gs -h" output).
- Filter
- Some drivers are separate programs which run together with
Ghostscript or are a plug-in for it. You will need to
obtain and install the separate program, as well as
Ghostscript.
- You will need a PPD file for your printer/driver, in case of a
PostScript printer the one which came with the printer, for other
printers running with a free software printer driver you should
get one from the linuxprinting.org database. To do this, you need
to look up your printer's page in the database. When you want to
use the driver which is recommended for your printer, click on
the "download PPD" link in the summary box at the top of the
page. For other drivers and some info about the drivers, go to
the driver list at the bottom of the page. If a driver has no
"download PPD" link, there is no info to generate a PPD in this
driver entry, see the text of the driver entry, sometimes these
drivers are covered by the PPD of another driver.
- Save the PPD file somewhere reasonable (create an
/etc/foomatic/pdq/ directory for your PPD files
for example).
Do not save it in a directory which PDQ searches
for configuration files. PDQ would assume that the PPD
is a PDQ configuration file and stops with an error
message. Make sure the PPD file is
world-readable with 'chmod a+r <file>'.
- You will need the foomatic-rip
Perl script installed. Save the script as the file
/usr/bin/foomatic-rip, or in some other location which
is in your search path for executables ("$PATH" environment
variable, do "echo $PATH" to see it), so that PDQ can find it.
Be sure to mark the script as
world-executable/readable with 'chmod 755 foomatic-rip',
and be sure that your Perl interpreter is in /usr/bin (if not,
edit the first line of foomatic-rip).
- You may want (or need!) to install the foomatic-gswrapper companion
script.
- If you do not have a text(and other files)-to-PostScript converter
installed (see above), install one. This is used to print option
documentation for your printer or non-PostScript files, so it's nice
to have it right. If you have more than one converter installed and the
one automatically chosen by foomatic-rip is not the desired one, edit
the "my $enscriptcommand = "";" line in the beginning of the
foomatic-rip script inserting the name of one of the supported
converters ("a2ps", "enscript", "mpage")
between the quotes. To modify the command lines of the converters or
to add support for another converter, edit the lines following the
"my @enscriptcommands =" line.
- Generate the PDQ driver description file with
foomatic-rip --ppd /path/to/your/ppdfile --genpdq myprinter.pdq
Move the PDQ driver file into one of the subdirectories of
/usr/lib/pdq/drivers/ (Can be also
/usr/local/lib/pdq/drivers/, check also the
"try_include" lines in /etc/pdq/printrc for
suitable directories). You
could name the file after the PPD file from which you have it
generated (example: HP-LaserJet_2200-pxlmono.ppd -->
HP-LaserJet_2200-pxlmono.pdq). Make sure that the
file is world-readable ("chmod a+r <file>")
- Run the printer setup wizard in xpdq, either as root to define a
system-wide printer, or as a normal user to define a printer in
your personal ~/.printrc.
- To get your printouts well-centered and to be able to make use of the
full
imageable area (the area of the page where the printer can print, most
printers cannot print up to the borders of the paper) of your printer,
you should adjust the printout. With a driver made especially for your
printer this is usually not necessary, but som printers, as for example
PCL laser printers from other manufacturers than HP since need this
adjustment since the GhostScript PCL drivers are mainly tested on HP
printers.
Download the alignment page
align.ps (when
you click on the link, the page will be displayed,
please choose "File"|"Save As..." in your browser's menues to write
the file to your disk) and print it. Follow the instructions on the
page to do the adjustment.
- If you want to print out of PPD-aware applications as Star Office, Open
Office, GIMP, ... or from a client (Windows, MacOS), use the same PPD
file as you already have used for setting up your printer queue and
follow the appropriate instructions.
Printing with PDQ-O-Matic
To actually use this now that you've set it up, you use the
pdq(1) command. For example the command line
$ pdq -P foo1 -oPageSize_Letter -aGamma=1.4 file.ps
would print the file on letter paper with a gmma correction of 1.4.
With some printer/driver combos it is also possible to use arbitrary,
custom page sizes (as long as they fit into the printer). Then you
have a "-oPageSize_Custom" option which you can use as follows:
$ pdq -P foo1 -oPageSize_Custom -aPageWidth=20 -aPageHeight=30
-oPageSizeUnit_cm file.ps
You give always the width with "-aPageWidth=XX", the height
with "-aPageHeight=YY", and also the unit with
"-oPageSizeUnit_ZZ", where "ZZ" can be "pt"
(PostScript points, 1/72 inch), "in" (inches), "cm"
(centimeters), or "mm" (millimeters). If you leave out the
unit, "pt" will be used as default. The numbers do not need
to be integers, something like "-aPageWidth=25.5" is
allowed.
To get a list of the available options for your setup, either issue
the command
$ pdq -P foo1 -h
to see the options for the printer "foo1" on the screen or
$ pdq -P foo1 -odocs ~/.bashrc
to get a printed option overview page. Note that the file
~/.bashrc is not actually printed, the "-odocs"
option makes the help page being printes instead of the sent
document.
You can also print with the "Print" commands in the "File" menu of
"xpdq". Use the "Driver Options" button then to adjust
the option settings and to save default settings.
For more information on using PDQ and defining printers, consult
the PDQ webpage or the
Printing HOWTO
If it doesn't work, click on the entry of the failed job in "xpdq"
to mark it, then click with the right button and choose "Show details" to
see what happened. And feel free to contact us for help.
How does it work?
There are four parts to the Foomatic scheme:
- The Database
- The database contains a number of tables which detail exactly how
to execute a given printer driver. There are two front-ends
which use these tables: the human-readable one generates the
information shown on all "Execution Details" pages, the PPD-O-Matic
PPD generator computes an Adobe-compliant PPD file which you need
to configure your print queue and PPD-aware applications/clients.
- The PPD File
- The PPD file generated by the database contains all inforation
about important printer capabilities, available options and how
to build the renderer's (usually GhostScript's) command line
depending on the user's choices for the options. foomatic-rip
reads it to know how to execute the print job. GUI frontends read it
to build dialog boxes in which the user can adjust the options.
Besides the usual stuff the PPD file contains
various extra lines beginning with "*Foomatic...". These contain
details of the driver command line, the information whether an
option accepts arbitrary numbers and not only the choices listed in
the PPD file, and more. frontends and application programs ignore
these extra lines.
- The backend filter
- The filter script 'foomatic-rip' is called by PDQ
with various inputs, including both the PPD filename and the
various options selected by the user. foomatic-rip opens the PPD,
extracts all options and their possible settings and also the
command line to execute GhostScript with the appropriate driver.
It parses the PostScript input for option settings which were stuffed
in by PPR or by application programs and it also stuffs in PostScript
code by itself, if needed. It also
massages the standard PPR option types into the more generic
printer/driver-specific format used by the database.
- The PDQ driver declaration
- The PDQ file generated by 'foomatic-rip' contains
option declarations for the various options supported by the
driver (or the PostScript printer PPD file), and it contains a bit
of Bourne shell code to generate and execute the proper
'foomatic-rip' command line.
PDQ supports all the option types defined in the database.
Boolean values are somewhat awkwardly handled as a choice rather than
a single checkbox, but they work fine.
|