On 11/11/2017 08:39 AM, N. Raghavendra wrote:
I would like to have reproducible PDF output from ConTeXt documents. I tried the suggestions at https://tex.stackexchange.com/a/313605/146025 but they did not work. The PDF output has information like "ConTeXt.Time", "CreateDate", etc., which depend on the time the source was processed at. How do I suppress such temporal information, that is not supplied by the author, from the PDF output?
Hi Raghu, "contextjit --nodates" is your friend here. No \pdf* commands are required. I hope it helps, Pablo
Here are my two attempts:
---------------------------------------------------------------------- $ cat example.tex
\pdfinfoomitdate=1 \pdftrailerid{}
\starttext
Hello, world!
\stoptext
$ ( context example.tex && cp example.pdf a && sleep 1 && \ context example.tex && cp example.pdf b ) > /dev/null && \ md5sum a b
6a4ac7122bb502062e7ea87be52df166 a cac1ab3160003526e49da135d77e4eda b ----------------------------------------------------------------------
---------------------------------------------------------------------- $ cat example.tex
\pdfvariable suppressoptionalinfo \numexpr 0 + 1 % PTEX.FullBanner + 2 % PTEX.FileName + 4 % PTEX.PageNumber + 8 % PTEX.InfoDict + 16 % Creator + 32 % CreationDate + 64 % ModDate + 128 % Producer + 256 % Trapped + 512 % ID \relax
\starttext
Hello, world!
\stoptext
$ ( context example.tex && cp example.pdf a && sleep 1 && \ context example.tex && cp example.pdf b ) > /dev/null && \ md5sum a b
2116aeec2b5bed2bfd02d16332700758 a 3204a1a127f139da8d960037a8ba0690 b ----------------------------------------------------------------------
Here is the reason I want reproducible builds. I keep the source of my ConTeXt documents under version control. I also keep their PDF output under version control because I often find, several years after a document was written, that I don't have the supporting files needed to process it; in such a case, until I get the missing supporting files, I can at least view the PDF output. Now, even when the source has not changed, if I run context on it, the PDF output changes, and the version control system reports the PDF file as modified. In such a situation, I have to register the change in the version control system, or revert the PDF file to its version. I would like to avoid this extra work.
Thanks and regards, Raghu.
-- N. Raghavendra
, http://www.retrotexts.net/ Harish-Chandra Research Institute, http://www.hri.res.in/ ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________