[cups] Portrait and Landscape - pdf/postscript

Helge Blischke helgeblischke at web.de
Thu Feb 12 10:20:19 PST 2015


Gustavo, 
as you reported that my supposed fix does not work, further analysis of both
how foomatic-rip and the foo2xqx stuff work (by testing and digging into the sources),
I found that a fix would require a modification of either filter, which isn’t simple and bears
the risk to be overwritten by updates to your system(s).
As the issue obviously hits other non-PS/PDF printer as well, the fix should be made in
foomatic-rip.

I therefore filed a bug (Bug 1259) to bugs.linuxfoundation.org <http://bugs.linuxfoundation.org/> in the hope that they settle
the issue in reasonable time.

If you badly need a „private“ solution, contact me off the list so that we can negotiate
the conditions concerning this job.

Helge
> Am 11.02.2015 um 16:25 schrieb Helge Blischke <HelgeBlischke at web.de>:
> 
> I think I found the cause of the issue – it is quite queer:
> 
> Firefox (and probably other applications as well), when launching a print job,
> reads the printer’s PPD to provide the PPD options to the user. Moreover, it seems
> to interprete the „*cupsFilter: …“ lines and then outputs the print job in the
> format that has the lowest cost.
> If firefox is using PostScript as document format, it realizes landscape by inserting
> the appropriate rotate and translate statements into the PostScript stream; the actual
> printing then is in fact portrait.
> If firefox is outputting an PDF job, it instead exchanges the width and height values
> of the page’s media box (i.e. [0 0 842 595] instead of [0 0 595 842] for A4 landscape).
> This leaves the rotation and translation matching the physical media either to the
> printer (in case the printer natively speaks PS or PDF) or to a final filter that
> converts PS or PDF to the printer’s native data format.
> 
> Now then, the HP M1005(MFP) printer does not speak PS or PDF but a proprietary
> format. Therefore it uses a final filter chain (called by foomatic-rip in this case):
> ghostscript (pbmraw output) -> foo2xqx (printer’s data format).
> 
> In the case of PDF print jobs, as mentioned above, the resulting pbm pages reflect
> the PDF’s MediaBox, i.e. the width os greater than the height in landscape case. 
> Bur the foo2xqx filter does not the necessary transformations (driver from looking
> into the sources).
> 
> To settle the issue, I’d suggest to delete the line
> *cupsFilter: "application/vnd.cups-pdf 0 foomatic-rip“
> (or change it into a comment by replacing the "*“ by "*%“ ).
> Bear inn mind that the line
> *cupsFilter: "application/vnd.cups-postscript 100 foomatic-rip“ is present
> (the cost value 100 is arbitrary; it may even be 0 then).
> 
> If this approach does not work, it would be necessary to insert a special filter
> that does the transformation on an intermediate PostScript stream, but that would
> be a considerable effort.
> 
> _______________________________________________
> cups mailing list
> cups at cups.org
> https://www.cups.org/mailman/listinfo/cups




More information about the cups mailing list