Common print options
Michael Sweet
mike at easysw.com
Tue Jul 13 19:30:43 PDT 2004
Michael Kaply wrote:
> I'm looking at adding some CUPS support into Mozilla.
>
> Currently I've just done it by enumerating the printers using CUPS and
> using our existing postscript code to pass the PS file to the printer
> given to us by CUPS.
>
> I'd also like to make the printer properties button do something
> interesting - right now it allows selection of six hardcoded form types,
> an explicit lpr command, color/grayscale, and the margin.
>
> My question is, if I were to create a "common" printer properties
> dialog, what should it have on it?
>
> And how do I know what options are "common" between different printers,
> such that I could put them onto this dialog?
The usual common options are:
Page Size
Duplexing
Orientation
Resolution
Copies
Page Range
You can get the supported values via IPP and/or HTTP requests,
and they can be defaulted pretty easily when printing without
CUPS. Also, CUPS supports embedded "job tickets" in PS files like:
%!PS-Adobe-3.0
%cupsJobTicket: media=a4 sides=two-sided-long-edge
%cupsJobTicket: resolution=600dpi
so you can pass the options that way if you like and use a
common print command path.
I'd be happy to work with you on this, provide sample code, etc.
My flPhoto software (http://www.easysw.com/~mike/flPhoto/) does
some of this to provide printing with and without CUPS...
Also, there is a print API being defined by the Free Standards
Group called PAPI which supports CUPS, Berkeley LPR/LPRng, and
System V LP which would allow you to use a common API to get a
list of available destinations and their common options, and submit
jobs.
--
______________________________________________________________________
Michael Sweet, Easy Software Products mike at easysw dot com
Printing Software for UNIX http://www.easysw.com
More information about the cups
mailing list