[NTG-pdftex] Creating identical PDF files with different pdfTeX runs

Martin Schröder martin at oneiros.de
Wed Mar 15 15:49:59 CET 2006

On 2006-03-15 15:06:43 +0100, Frank Küster wrote:
> Martin Schröder <martin at oneiros.de> wrote:
> > 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.

How far will you get with the logfile with a suitable combination
of \tracingoutput 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?

I don't know. What you would probably need is a way to dump und
set all run-specific settings of pdfTeX (seeds for various random
numbers, date etc).

> >> 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.

File a feature request, please. :-)


More information about the ntg-pdftex mailing list