[reportlab-users] Visual Diff Tool

Robin Becker robin at reportlab.com
Thu Nov 13 12:01:51 EST 2008

Dirk Holtwick wrote:

> Hi,


> while working on xhtml2pdf <http://www.xhtml2pdf.com/> I have the

> general problem that writing test cases is quite difficult. The normal

> way is to create some test PDF and then have a look at them if they are

> looking fine. But that is a source of human errors. Therefore I am

> looking for a automatic solution.


> My idea is to automatically do a visual compare of a reference PDF that

> was already rendered fine once and the recent PDF. Technically I am

> found out that it would work fine if I use ImageMagic to first create

> images from PDF and if they differ I can show them in TortoiseIDiff.


> I started writing such a visual diff tool, but maybe there already

> exists something similar and I can use this instead of wasting my time

> on writing the reinvention of the wheel ;)


> So my question: has anyone seen a tool like this around? If so, please

> let me know where to find it. Otherwise I would write the visual diff

> tool and maybe Reportlab also likes to use visual test cases for their

> toolkit?


We have been using ghostscript in one of our server based tools. I tried the
pdftoppm route, but couldn't get a working version from source on freebsd.

Ghostscript works pretty well, we use commands like

-sOutputFile=rl_hello-page%04d.jpg \
-sDEVICE=jpeg -r144x144 -f rl_hello.pdf

Robin Becker

More information about the reportlab-users mailing list