CUPS determine page orientation

Helge Blischke h.blischke at acm.org
Sun Feb 14 04:08:16 PST 2010


kaede wrote:

> Hi all,
> 
> I am trying to write a pre-filter to insert heading & footing to the
> postscript file.
> 
> How do I determine whether the page is landscape or portrait?
> 
> Thanks,
> Kaedekai

Run it through a PostScript interpreter (e. g. Ghostscript) prepended with a 
PostScript routine which interprets the CTM and how it changes to determine 
the orientation. 
Note: the "%%Orientation: ..." and related comments seem not always to be 
reliable.

Helge





More information about the cups mailing list