[pdftex] pdftex deterministic?

Matteo Centonza matteo at metatype.it
Wed Apr 4 10:54:27 CEST 2007


On Tue, 2007-04-03 at 22:19 +0200, Reinhard Kotucha wrote: 
> >>>>> "Matteo" == Matteo Centonza <matteo at metatype.it> writes:
> 
>   > Using checksums is the cheapest way of comparing two files (even
>   > cheaper than a byte comparison) and give you absolute confidence
>   > on the result.
> 
> Yes, but a PDF file contains a time stamp.  Hence you cannot produce
> two PDF files which have the same checksum.
> 
> Even if you could force pdftex to create two files with the same
> timestamp, you'll get different checksums if you compare the output of
> pdftex 1.30 and pdftex 1.40, while what you see on screen is absolutely
> the same.

hi Reinhard,

probably you missed some bits:

http://www.tug.org/pipermail/pdftex/2007-April/007131.html

In my case i'm comparing PDFs generated by the same binary application,
and maybe what you see on screen is not "absolutely" the same, it is
indeed, under your requirements.

> I assume that the only way to compare PDF files is to compare bitmaps.
> 
> Of course, you can compare files with a resolution of one scaled point
> unless you are running MS-DOS or something derived from it.  Even with
> a finite amount of memory.  You don't have to to create bitmaps of the
> whole page.  You can run two processes at the same time which convert
> the PDF files to bitmaps and compare them line-by-line where the
> height of each line is one scaled point.

well, that's just one way of doing the comparison. Under different
conditions, you can find different algorithms.
 
> I don't see any problems here though I fear that such a program will
> not provide a result within a few seconds.  You have to be very patient.

i'm generally a patient guy ;)

But not when i'd like to provide a networked production system
with timings in the magnitude of a latex compile.

Thanks for your response,

-m


More information about the pdftex mailing list