[reportlab-users] Reportlab under Zope 3
Andy Robinson
andy at reportlab.com
Wed Sep 26 15:55:47 EDT 2007
On 26/09/2007, Stephan Richter <srichter at cosmos.phy.tufts.edu> wrote:
>
> Hi Andy,
>
> you should know about one. I told you that I wrote one for z3c.rml.
Sorry, I never got as far as running your code or studying the test suite
and had forgotten this detail. Since I have RML2PDF(tm), I don't
actively use z3c.rml ;-)
> All my
> generated PDF files are tested against an expected set using conversion from
> PDF to PNG files. First I thought this would be brittle, but as long as you
> use the same tool to generate the PNG, it works remarkably well.
Which tool do you use to turn PDF into bitmaps?
Recently we've found Ghostscript works well and is available on all
the platforms we care about. It wasn't so good 4 years ago - each
renderer we looked at had problems . But our rendering code is
reasonably correct and we haven't changed it since then.
If we did a rewrite, we'd probably produce our own Python renderer and
I would certainly do these tests as we went.
But I think those of us writing graphics-rendering primitives are a
fairly special case. In the 150+ projects we've delivered to clients
in the last 7 years, it's more commonplace to want to check you are
putting the right content in the document in the right order under
certain input conditions, and individual words are changing all the
time. So simple assertions about what text appears where in generated
PDFs are quicker to code, only need Python, and tend to better define
the "invariants" of that application.
- Andy
More information about the reportlab-users
mailing list