[reportlab-users] A riddle...

Jerome Alet reportlab-users@reportlab.com
Fri, 19 Sep 2003 17:19:01 +0200


On Fri, Sep 19, 2003 at 02:30:01PM +0100, Andy Robinson wrote:
> > 
> > Another interesting test setup would be to take some RL code creating
> > a PDF document and compare output using different versions of the RL
> > toolkit. And, of course, there is the obvious test of comparing the
> > output for more than one version of your own code, which is something
> > like the trivial application of this.
> 
> Here we are working on something very important.  Currently,
> if you run the same test script multiple times, you get
> different PDFs.  This is because PDF is supposed to contain
> unique document IDs, and we escape these so that 16 effectively
> random bytes in the ID can be a varying length escaped string.
> Also, you get different output between Python versions and
> expecially between CPython/Jython, because we have used
> things like objects' addresses i memory as comments and
> because we use str() to format numbers in the PDF file.

You could also import the Canvas class from pycanvas.py
and tell it to regenerate the original source code
for your program, then compare resulting commented 
python source files !

Platypus doesn't seem to be well supported however...

Jerome Alet

-- 
"A non-free program is a predatory social system that keeps people 
in a state of domination and division, and uses the spoils to 
dominate more." - RMS