Common print options

Michael Kaply mkaplynospam at nospamusnospamibm.com
Wed Jul 14 05:57:41 PDT 2004


Michael Sweet wrote:
> 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

On Mozilla, we do things a little strange - orientation is in our Page 
Setup dialog, but is printer specific. Page Range and Copies is on our 
main print dialog.

So it looks like the main things our subdialog needs is page size, 
duplexing, resolution, and possibly orientation again, since that seems 
to be what most platforms have.

> 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.

This is one of the things I've been trying to learn about CUPS - how to 
query and set values from the printer...

> 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...

That would be awesome. We'd love to see printing on Linux get improved 
in Mozilla.

> 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.

This is really great news. It would be nice to finally have a common 
print API for Linux.

Mike Kaply




More information about the cups-devel mailing list