[cups.general] Print dialog boxes in applications (Linux)

Kurt Pfeifle k1pfeifle at gmx.net
Thu Sep 6 14:04:13 PDT 2007


John Jason Jordan wrote:

> I have numerous laser printers installed on my Ubuntu Feisty amd64
> computers. My most recent acquisition is a Xerox Phaser 7400DN, and it
> is also the source of problems.
> 
> One thing that would help in figuring things out is if I could
> understand how applications get the options to display in their print
> dialog boxes. In the case of the 7400DN, the specific problem is media
> sizes. I have attached a small PDF showing a chart I made for which
> paper sizes are displayed in the print dialog boxes for various
> applications when printing to the 7400DN. The first one, "CUPS," is
> what is listed in the printer options in the CUPS web interface. But
> note that Firefox displays only a small number of the total. Scribus,
> on the other hand, displays two additional ones, GermanFanfoldLegal and
> Custom. And in Scribus the names are somewhat different, e.g., "#10
> Commercial Envelope" appears as "#10Env." 
> 
> So where do applications get the list of options for a printer? Why are
> they different from one application to the next?

CUPS gets all options available for a printer (including PageSize, to
which one option you limit your question) from the PPD file (short for
PostScript Printer Description).

The PPD file format was defined and specified originally by Adobe for
PostScript printers. CUPS uses the same format, but also extends it
(without hurting other PPD-consuming software that doesn't understand
these extensions) to non-PostScript printing, by adding lines which
determine what format conversion filters to use when the PostScript
is processed by the spooler for a non-PS target device.

The PPD holds all the PageSizes the target device is capable to use,
and CUPS builds its list of available values from that file. All PPDs
installed for your printers in CUPS you can find in /etc/cups/ppd/,
and their names match exactly the respective printernames.

KPDF (as well as all other KDE applications) uses KDEPrint, which
also does also read the CUPS PPD; there should be now difference to
what CUPS does.

OOo's most recent versions do the same. (Former versions did use
their own private PPDs, and you might have seen very big deviations
there too.)

Scribus' most recent releases (or is it only development releases?)
also use the CUPS PPD. In addition, they may have a few "own" media
sizes defined that show up (them being a DTP app, they may need to
export to PDF and have lots of sizes pre-defined internally, while
not requiring to have a real printer around all the time -- so their
additional media sizes may pollute into the print dialog too).

Firefox I don't want to comment much about. It's printing capabilities
on Linux are... very, very limited. That is a shame for such a rich
organization as the Mozilla Foundation is. Firefox's printing is simply
cr#p.

BTW, CUPS can also use "Custom" page sizes from the command line (it
just doesn't display them in the web interface);

http://openprinting.blogspot.com/2007/09/how-to-set-custom-page-sizes-with-cups.html


-- 
Kurt Pfeifle
System & Network Printing Consultant ---- Linux/Unix/Windows/Samba/CUPS
Infotec Deutschland GmbH  .....................  Hedelfinger Strasse 58
A RICOH Company  ...........................  D-70327 Stuttgart/Germany




More information about the cups mailing list