How to get media size of current job?

Helge Blischke h.blischke at acm.org
Fri Dec 11 07:19:17 PST 2009


Lu binbin wrote:

> Hi,
> I need to get the media or paper size of current print job in my work.
> In RFC 2911, I found there is a media attribute in Job Template Attribute.
> So I use pkipplib parse some control file (/var/spool/cups/cxxxxx),there
> are only Operation attributes and Job attributes.
> 
> How can i get media size of current job? Thanks!

The media is specified by the media attribute, the first (or single) 
component of which is the name denoting the media, e.g. A4, or 
custom.WIDTHxLENGTH (possibly followed by in, cm, or mm if not printer's 
points). In case of the names, you need to know what A4 means, e.g.

Helge





More information about the cups mailing list