[NTG-pdftex] Deterministic PDFs (switch to disable addition of timestamps and random ID nonces)

Hans Hagen pragma at wxs.nl
Fri Jun 26 11:16:12 CEST 2015


On 6/26/2015 3:40 AM, Heiko Oberdiek wrote:
> Hello,
>
> Correction for the time settings in the information dictionary
> --------------------------------------------------------------
>
> On 25.06.2015 16:25, Hans Hagen wrote:
>>      \pdfinfo{/CreationDate/null}
>>      \pdfinfo{/ModDate/null}
>
> A typo, "/null" is a name object with name "null".

indeed

> Very likely the null object was intended. The null
> object as value in a dictionary means that the key
> is not present; pdfTeX scans for "/CreationDate"
> and "/ModDate" and suppresses its own versions,
> if they are found. (The full list is "/Creator",
> "/Producer", "/CreationDate", "/ModDate", and "/Trapped".)
>
> Correct version:
>
>    \pdfinfo{/CreationDate null}
>    \pdfinfo{/ModDate null}
>
> Alternatively deterministic date values can be set there
> in PDF date format, e.g.: \pdfinfo{/ModDate (D:20150626031503+02'00')}
>
>>      \pdfinfo{/ID/null}
>
> This line was likely intended to remove the "/ID"
> entry. The /ID key is in the trailer dictionary.
> But \pdftrailer{/ID null} will not work either,
> because pdfTeX sets its own /ID values regardless, what
> the user might have provided in \pdftrailer.

maybe \pdftrailer should also scan for /ID being set

> pdfTeX calculates the non-deterministic ID values in "utils.c", function
> "printID". It uses the MD5 sum of the following
> data for the ID values:
> * the current time by calling function "time" (resolution is second),
> * the current working directory by calling "getcwd" and
> * the output file name.
>
> The workaround is to overwrite the two hexadecimal string
> of the two ID values with a deterministic hex string of the
> same length. The ID key can be found at the end of the PDF
> file and, the dictionary is uncompressed (trailer without
> object compression of PDF 1.5 or the dictionary of type XRef
> in case of object compression.

that's indeed what i'd do as it's easy to script

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-pdftex mailing list