ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Reproducible PDF output
@ 2017-11-11  7:39 N. Raghavendra
  2017-11-11 13:37 ` Pablo Rodriguez
  0 siblings, 1 reply; 7+ messages in thread
From: N. Raghavendra @ 2017-11-11  7:39 UTC (permalink / raw)
  To: ntg-context

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?

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 <raghu@hri.res.in>, 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-11-12 16:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-11  7:39 Reproducible PDF output N. Raghavendra
2017-11-11 13:37 ` Pablo Rodriguez
2017-11-11 19:08   ` N. Raghavendra
2017-11-11 20:06     ` Pablo Rodriguez
2017-11-12  3:00       ` N. Raghavendra
2017-11-12  8:37       ` Henning Hraban Ramm
2017-11-12 16:11         ` Alan Braslau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).