1

I want to create reproducible PDFs with lualatex, so if no code to the change took place, two compilation runs should yield the same identical PDF. I was able to set the CreationDate and ModDate using hyperref, overwriting the ID however has no effect.

\documentclass{standalone}

\usepackage{hyperref} \hypersetup{ pdfinfo={ Author={Just me}, Title={My title}, CreationDate={D:20222145000000}, ModDate={D:20222145000000}, ID = {6D2C23D7481FB94ACFBDA10EA47F3CB9}, } }

\begin{document}

Hallo

\end{document}

Uwe Ziegenhagen
  • 13,168
  • 5
  • 53
  • 93

1 Answers1

4

With the new pdfmanagement you can use

\pdfmeta_set_regression_data:. That is the command we are using in the pdf tests.

\DocumentMetadata{uncompress}
\ExplSyntaxOn
\pdfmeta_set_regression_data:
\ExplSyntaxOff
\documentclass{standalone}

\usepackage{hyperref}

\begin{document}

Hallo

\end{document}

Without it you can add

   \tex_pdfvariable:D trailerid
     {[~
       <2350CAD05F8A7AF0AA4058486855344F>~
       <2350CAD05F8A7AF0AA4058486855344F>~
     ]}

to set the trailerid.

Ulrike Fischer
  • 327,261