[reportlab-users] When it is safe to use PDFZCompress in reportlab code

Robin Becker reportlab-users@reportlab.com
Thu, 23 May 2002 19:52:21 +0100

In article <20020523171815.GA2423@codeworks.lt>, Marius Gedminas
<marius@codeworks.lt> writes
>And according to utils.py, reportlab should be able to cope with zlib being
>unavailable, so I can't just unconditionally use PDFZCompress.
that's less of a problem nowadays, but I'm not sure if zlib is built as
a module by default for Unix or if you have to turn on the shared
>I think I'll add setCompression method to PDFDocument, similair to the
>one in PDFPage/PDFFormXObject.  Canvas.setPageCompression will set
>PDFDocument's compression, and font objects will check it.
>Is that OK?  (I still want my TTF support merged with ReportLab, so I'd
>like to know the opinion of the maintainers.)
>Marius Gedminas
I suppose the Canvas pageCompression ought to be passed to its document
as a default. It would seem odd to have compression on for the canvas
and off for the underlying document.
Robin Becker