[cups] Portrait and Landscape - pdf/postscript

Helge Blischke helgeblischke at web.de
Wed Feb 11 07:25:06 PST 2015


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.
> Am 11.02.2015 um 12:57 schrieb Gustavo - Emar <suporte at emar.com.br>:
> 
> Hi Helge, some packages are different and after the wrong server update it begun to occur 
> 
> the wrong server:
> 
> libgnomecups-0.2.3-9.el6.x86_64
> cups-pdf-2.6.1-4.el6.x86_64
> cups-1.4.2-67.el6.x86_64
> cups-libs-1.4.2-67.el6.x86_64
> cups-pagelog-analyzer-1.2-1.el6.rf.noarch
> cups-pk-helper-0.0.4-12.el6.x86_64
> gutenprint-cups-5.2.5-2.el6.x86_64
> 
> ghostscript-8.70-19.el6.x86_64
> ghostscript-fonts-5.50-23.2.el6.noarch
> 
> foomatic-4.0.4-3.el6.x86_64
> foomatic-db-filesystem-4.0-7.20091126.el6.noarch
> foomatic-db-ppds-4.0-7.20091126.el6.noarch
> foomatic-db-4.0-7.20091126.el6.noarch
> 
> 
> the right server:
> 
> libgnomecups-0.2.3-9.el6.x86_64
> cups-pdf-2.6.1-4.el6.x86_64
> cups-1.4.2-52.el6_5.2.x86_64
> cups-libs-1.4.2-52.el6_5.2.x86_64
> cups-pagelog-analyzer-1.2-1.el6.rf.noarch
> cups-pk-helper-0.0.4-12.el6.x86_64
> gutenprint-cups-5.2.5-2.el6.x86_64
> 
> ghostscript-8.70-19.el6.x86_64
> ghostscript-fonts-5.50-23.1.el6.noarch
> 
> foomatic-4.0.4-3.el6.x86_64
> foomatic-db-filesystem-4.0-7.20091126.el6.noarch
> foomatic-db-ppds-4.0-7.20091126.el6.noarch
> foomatic-db-4.0-7.20091126.el6.noarch
> 
> files attached are about the right server, and a ppd file from local machine !
> 
> I notice the difference:
> 
> the right server sent:
> File of type application/postscript queued by "lgsm"
> 
> and the wrong server sent:
> File of type application/pdf queued by "lgsm".
> 
> I'd like to know who defines sending a job like application/postscript or application/pdf
> 
> Is there a specific configuration file ?
> 
> thanks
> 
> 
> 
> 
> 
> 
> 
> On 10-02-2015 18:44, Helge Blischke wrote:
>> As far as I could see from your files (and feeding the second file through Ghostscript),
>> the resulting PS job indeed is landscape.
>> What I’m not able to test now is the behavior of the foo2xqx filter and its wrapper script.
>> Is it possible that your 2 boxes have different versions of this software?
>> And what version is your Ghostscript?
> 
> -- 
>  <http://www.emar.com.br/><emar.png> <http://www.emar.com.br/>          www.emar.com.br <http://www.emar.com.br/>	<barra.png>	
> Luiz Gustavo
>  
> (17) 3269-9990
> 
> O emitente desta mensagem é plenamente responsável por sua utilização e conteúdo, que pode não representar a opinião da empresa. Este ambiente está sujeito a monitoramento.
> 
> <error_log220.txt><foomatic-vQWKpj.pdf><c00220><d00220-001.ps><gugao.ppd>




More information about the cups mailing list