Paulo,
that's also an interesting solution, and something that had occurred to
me previously. It has the advantage of providing a very strict
comparison (1 pixel out of place and the test would fail), but like you
pointed out that's also a disadvantage because you're dependent on the
reliability of the bitmap generator. It might be something worth looking
at further down the line.
For the time being though, something like jpdfunit might just fill that
gap in my unit tests. All I currently need is to know high-level info.
i.e. if there's some text in a particular format and if a table contains
the right number of cells, and data, etc. It's not perfect, but sounds
like a step in the right direction.
Anyhow, I will report back my experiences with jpdfunit when I integrate
it into h2pe.
Regards
Daniel
Paulo Soares wrote:
I have my doubts on the success of jpdfunit to compare PDFs. The only
way to do it is to render the PDF page to some bitmap format and sort of
XOR it with the original. If you get a white page the two PDFs are the
same; if you get black dots there are differences. Of course, even this
can go wrong. It's essentially impossible to compare PDFs, just see the
result in Acrobat.
Paulo
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions