[cups.development] Filters and rotation

Michael Sweet msweet at apple.com
Thu Mar 31 10:21:30 PDT 2011


On Mar 31, 2011, at 2:50 AM, Tim Waugh wrote:
> Note that I'm not asking so much for help with a specific problem, but
> asking for some clarification about how these filters are supposed to
> work in general.
> 
> Should pstoraster have to do its own rotation, or should it already be
> in the right orientation for rasterizing already?


pstoraster normally should get things in the right orientation. If we see a landscape PageSize when the PPD defines a portrait orientation for that size, we should be rotating the bitmap so that it is portrait again (and I'm pretty sure that code is "in there").

What normally is the problem is that pdftops emits a landscape setpagedevice command in the PostScript output, and then pstops applies the corresponding portrait paper size command, leading to the wrong orientation in the output.

Unfortunately, since pdftops is no longer part of CUPS, we basically have no control over what it does... And since the poppler folks do not want to expose the C++ classes from Xpdf we have no way to override the implementation of the PS device class.

The alternative is to make pdftops handle all of the CUPS options (number-up, orientation-requested, fit-to-page, page-label, etc.) along with the printer-specific commands such that it is producing application/vnd.cups-postscript and not application/postscript (which goes through pstops...)

________________________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair





More information about the cups mailing list