[cairo] generation of inefficient postscript?

Adam Goode adam at spicenitz.org
Wed Dec 5 08:13:18 PST 2007


Hi,

I'm observing a bad behavior when printing from a newer Evince.
Specifically, PDF files with images usually crash the printer. This does
not happen with xpdf, acroread, etc. The printer is a midrange HP
LaserJet 1320. I am using the native PostScript mode of the printer.

It looks like xpdf and acroread are pretty straightforward about how
they convert images from PDF to PS. Often the image data is passed
through basically unchanged, and the PS image operator is used. This is
good, since my printer seems to efficiently implement the image operator.

cairo (as used by Evince for printing) seems to take a more generic
route, converting images (and other things) into patterns. This makes
sense, as cairo is somewhat removed from the PDF reading. Unfortunately,
my HP printer chokes on large patterns. (Small patterns will work, but
extremely slowly.) I have to powercycle to recover.

A 1-bit image at 420x300 (as an example) will crash the printer when
printed as a pattern by cairo (which also converts it to RGB color?).
When printed with xpdf, there is no problem.

I guess the correct solution is to have cairo do some analysis and use
the image operator when it can. It seems a little tragic since the PDF
file has that information already but cairo cannot take advantage of it.

I'm attaching a sample PDF and corresponding PS outputs for reference.

Any ideas?


Thanks,

Adam

-------------- next part --------------
A non-text attachment was scrubbed...
Name: shape.pdf
Type: application/pdf
Size: 2009 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20071205/61ba93b1/attachment-0001.pdf 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shape-evince.ps
Type: application/postscript
Size: 5339 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20071205/61ba93b1/attachment-0002.ps 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shape-xpdf.ps
Type: application/postscript
Size: 11836 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20071205/61ba93b1/attachment-0003.ps 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
Url : http://lists.cairographics.org/archives/cairo/attachments/20071205/61ba93b1/attachment-0001.pgp 


More information about the cairo mailing list