[pdftex] Please make the CreationDate, ModDate and ID field deterministic
nicolas at debian.org
Mon Jul 13 16:08:51 CEST 2015
As the original submitter, I would have liked an opportunity to
discuss the choices, or else a word of explanation about them, or at
least an alert about the commit, as I did mention that I was not
reading the list .
I understand that upstream authors of a widely used software need to
discuss privately before announcing changes, but now that you are at
the coding stage, please consider answering a few questions about the
The CreationDate and ModDate are optional. Why set them, unless
\pdfinfo asks for that?
If you set them by default, and we do not find a work-around like ,
everyone concerned with reproducible builds will need to insert
into every TeX source during each build, or patch pdftex for its own
use. What concrete need does \pdfinfoomitdate answer?
The ID field is optional. Why set it, unless \pdftrailerid or similar
asks for that?
If you set it by default, the following suggestion may help doing so
without a new \pdftrailerid macro.
As I understand section 10.3 of the PDF specification , a md5 sum
of the time, directory and base name is only a very vague
implementation suggestion. Any randomly generated string, or
non-cryptographic hash sum of the PDF file would satisfy the purpose
better, with the latter being reproducible.
For example, would you consider defining the ID as an 8 characters
hexadecimal represention of a 32 bits XOR sum of all contents written
to the output file so far? The performance impact and collision risk
would both be very small.
Is there any benefit in keeping the current implementation by default?
In the current implementation, what is the benefit of taking gmtime()
into acount for the md5 sum, instead of CreationDate?
More information about the pdftex