[reportlab-users] How hard would this be?

Andy Robinson andy at reportlab.com
Wed Jan 31 16:56:21 EST 2007


Michael Hipp wrote:

> How hard would it be to take the "high level" features of Reportlab (e.g.

> Flowables, Tables, canvas) and replace the low level drawing primitives with

> something else?

>

> Specifically, I love the power, quality of output, and ease of use of

> Reportlab. But the fact that it produces PDFs is both it's best and worst

> feature (too too hard to print; too dependent on a fat pretentious app like

> Adobe Reader, necessity to save them as files rather than work in-memory,

> etc.). I'm thinking of replacing the "bottom layer" part that draws on a pdf

> with the print framework from wxPython* that draws on a print device context.

> wxPython has a powerful print framework, but compared to Reportlab it's a lot

> like using Assembly language.)

>

> So how hard would it be to insert a different layer underneath Reportlab?


You would need to implement a replacement for the Canvas class.
You'd get a long way fairly quickly for everyday use, but you'd hit a
dead end with all of the more advanced graphics operations. PDF,
Postscript and SVG support a 'high end' model allowing arbitrary
rotation, transformation, skewing etc of the graphical space. Most GUIs
don't.

The predecessor to reportlab, Piddle (now renamed Sping) had backends
for wx and Tkinter, but it was a lowest-common-denominator API.

The graphics renderer we use for charts, renderPM, could do it if we
reorganised our code, but it needs a major version change and code
breakage. If we manage to make the leap to 'version 3.0' this will be a
key goal, so you can generate any page of a doc to a bitmap (and we can
do automated tests that no longer need eyeballs). But I can't promise
if it will be this year or next.

- Andy


More information about the reportlab-users mailing list