[cairo] Size of PDF with lots of images

Simon Sapin simon.sapin at exyr.org
Thu Jan 16 07:56:38 PST 2014


On 16/01/2014 13:54, Simon Sapin wrote:
> Even though PNG also uses deflate, PDF’s encoding is not PNG so the
> images are decompressed and re-compressed. I’m not too surprised to see
> the size increase. You could try a build of cairo that uses zlib’s
> maximum compression level and see what happens. Of course, this is a
> compromise with compression speed. Maybe it’s worth adding API to change
> this level.

The PDF spec also talks about "predictors" that can help with 
compression. As far as I understand from a quick reading of the code, 
cairo does not use those. This could be something else to explore to 
reduce the size of PDF files with images.

Cheers,
-- 
Simon Sapin


More information about the cairo mailing list