[cups.development] Filters and rotation

Helge Blischke h.blischke at acm.org
Thu Mar 31 13:36:22 PDT 2011


Michael Sweet wrote:

> 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.
As of the PLRM, 2nd ed., a PostScript interpreter conforming to language 
level 2 *must* be capable of doing this transformation (section 4.11, page 
233).
But I admit that level 1 PostScript - which CUPS still claims to support - 
is an other thing.
> 
> 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

Helge





More information about the cups mailing list