[cups.development] Filters and rotation

Michael Sweet msweet at apple.com
Thu Mar 31 10:28:14 PDT 2011


On Mar 31, 2011, at 4:59 AM, Tim Waugh wrote:
> On Thu, 2011-03-31 at 04:45 -0700, Helge Blischke wrote:
>> The pstoraster filter already does it's own rotation (although only in a 
>> direction hardwired into the code).
>> For a - in my opinion - more general solution look into the gstoraster 
>> filter (see the links on the CUPS website) which in addition honours the 
>> *LandscapeOrientation PPD keyword.
> 
> Yes, I know that pstoraster does its own rotation.  My question is
> whether *any* filter handling application/vnd.cups-postscript is
> expected to perform its own rotation.

PostScript requires it.

Adobe (unfortunately) decided that it was OK for a file to contain:

    <</PageSize[792 612]>>setpagedevice

when the printer really only supports:

    <</PageSize[612 792]>>setpagedevice

Thus, any PostScript interpreting code needs to be able to handle doing landscape rotation when they see the page size is the wrong orientation.

Of course, things get more complicated when a printer supports both orientations, in which case you can get the wrong output.

We generally try to stick to the orientations specified in the PPD file. pdftops does not.

________________________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair





More information about the cups mailing list