[cairo] Cairo PDF

William Temperley willtemperley at gmail.com
Thu Jun 16 04:40:02 PDT 2011


Dear all,

I've been embedding PNG images into PDFs using Cairo for a while via
the Java-Gnome bindings (and getting some great results, thanks!).

After upgrading from Cairo 1.8.10 to 1.10.2, embedded PNGs appear
blurry in both Acrobat reader and Evince. (I'm now using Java-Gnome
4.0.19 - before I was on 4.0.14).  The Java-Gnome developers say
nothing has changed WRT to image embedding from their side, so it is
likely this is down to a change in Cairo.

This is best illustrated with maps produced the different libraries:

With Cairo 1.8.10 (Java-Gnome 4.0.14):
http://www.map.ox.ac.uk/media/temp/DJI_Pf_PR.pdf

With Cairo 1.10.2 (Java-Gnome 4.0.19):
http://www.map.ox.ac.uk/media/temp/DJI_cairo_1-10-2.pdf

It seems the underlying information is there as before - if I open a
PDF in Adobe Illustrator the image is unadulterated. Also if I
rasterize using e.g. pdftoppm the rasterization looks no different.

Is there a way to get Cairo to embed PNGs in a way that this blurring
doesn't happen?

Thanks and regards,

Will Temperley


More information about the cairo mailing list