[cairo] [PATCH] PS/PDF improve efficiency of text output

Baz brian.ewins at gmail.com
Wed Jan 24 15:51:17 PST 2007


On 24/01/07, Carl Worth <cworth at cworth.org> wrote:
> Actually, I think I was the first person to get annoyed by it. I don't
> think I had looked closely at any cairo PDF output in months, but
> within a few minutes of pushing out the patch that added the
> compression, someone pointed out to me that cairo's PDF output
> included excess, redundant, and otherwise unnecessary M commands, and
> blam, I got annoyed by this inscrutable, compressed output.

Some time ago I had a need to parse the contents of compressed streams
of pdfs, I wrote some hacky code to do it:
http://dunck.us/collab/PdfPublicTransportMaps

It's perl code, its just using Compress::Zlib to pull out the bits I
need.  Anyway it suggested to me that there'd be other, better tools
out there for decompressing pdfs... and there is:
http://www.pdfhacks.com/pdftk/

eg
pdftk mydoc.pdf output mydoc.clear.pdf uncompress

pdftk is available as a Debian package. Might be an alternative to
adding debug code?

Cheers,
Brian


More information about the cairo mailing list