![](https://secure.gravatar.com/avatar/c0d984e1e510cf689790a5442c079a68.jpg?s=120&d=mm&r=g)
Martin Schröder
On 2006-03-15 14:07:16 +0100, Frank Küster wrote:
we (i.e. a couple of Debian developers, taking up old ideas of each individual and the tests in http://tug.org/svn/texlive/trunk/Master/support/tests/) are trying to implement some automated testing of pdf and dvi creation by pdftex. Possible applications are regression tests for the binary, for distributions (changed font setup etc.), or for package authors ("does the new version still cooperate with hyperref?").
Good idea.
For this, it would be great if it were possible to create identical pdf files in subsequent runs of pdfTeX. With
This will only get you so far. If you want to compare PDFs, you should not test for identical files, but for identical output: Render the PDF to a bitmap (e.g. with ghostscript) and compare the generated bitmaps. Otherwise your test will fail whenever the output of pdfTeX is changed in any way.
That's a point; on the other hand, all I get then is glyphs on a page, but the information about the internal structure is lost: hyperlinks, character information (will a search for "fl" find the fl ligature, or will "ü" be pasted correctly?), etc.
Even then your tests will fail when we improve the typesetting of pdfTeX. :-}
I don't expect those tests, or rather the known-good documents, to be carved in stone. There will be chances on occasion which require manual checking of the new document. I guess it's best to have both kinds of test: Comparing the bitmaps gives information about the actual typesetting (and about the differences you wouldn't spot when checking by eye), comparing the pdf files gives additional information about the document structure.
A start would be setting the system date -- this would seed /ID and /CreationDate. Note that /ID also includes the filename.
The system date? You need to be root to do that, or is there a way to fake the system date in the local environment?
Is it possible to achieve identical pdf files directly, by adding the proper commands, or would it be possible to add this feature?
Currently it's impossible (and that's a feature :). Adding the feature can't be that hard, though.
I would very much appreciate this. Regards, Frank -- Frank Küster Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich Debian Developer (teTeX)