CUPS determine page orientation
Helge Blischke
h.blischke at acm.org
Mon Feb 15 04:13:58 PST 2010
kaede wrote:
>> 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
>>
>
> Hi Helge,
>
> I am fairly new to Setting up CUPS. What is a CTM? Do you know of a
> rountine that can currently do that?
>
> I am trying to insert heading & footing. Currently, I use a perl script
> that uses hard coded value to moveto to show the text. I would like to
> avoid the hardcode value, and a way to determine the orientation.
>
> When printing via firefox, there %%orientation tag is not present.
>
> Thanks,
> Kaede
Well, the CTM is the "Current Transformation Matrix" which describes the
current transformation of the logical coordinate system to the device
coordinate system.
I do not have a PostScript routine out of the box to accomplish what you
want - it is not an easy task to develop one.
Helge
More information about the cups
mailing list