2

I'm trying to control the ID field in PDFs produced by ConTeXt.

When I run ConTeXt twice on the same input file, the resulting PDF files have different IDs, which can be checked e.g. by running grep -a "R/ID".

For pdf/xe/lua-LaTeX, this ID depends on the current time and the pathname of the PDF. The "current time" can be fixed using the environment variable SOURCE_DATE_EPOCH.

Since ConTeXt uses luatex as its engine (or optionally pdftex / xetex), I would have expected that the same method applies here, but it doesn't work.

How do I force ConTeXt to produce PDFs with identical ID if given identical input?

A. Donda
  • 674
  • 1
    I deleted my answer because it failed by fatal error: kpse library is accessed (key: set_program_name) as Henri said. Was my previous test illusion? – Akira Kakuto Dec 07 '19 at 15:16
  • I would have expected that context --nodates file works, but I still get a date in the pdf so I would suggest to ask on the context mailing list. – Ulrike Fischer Dec 07 '19 at 21:46
  • @UlrikeFischer Thanks! I don't really care about the date fields in the PDF, only the ID. Background: a PDF viewer I use stores settings incl. scroll position based on the ID. – A. Donda Dec 07 '19 at 23:57
  • But --nodates doesn't control the PDF ID either. – A. Donda Dec 08 '19 at 22:15
  • @A. Donda: If you need only fixed ID, see \pdfvariable trailerid near line 722 in doc/luatex/base/luatex-modifications.tex – Akira Kakuto Dec 09 '19 at 06:16

0 Answers0