Menu

Commit [fc429e]  Maximize  Restore  History

Make ModDate and CreationDate in PDF reproducible

Ghostscript ignores the date in the preamble and uses the current
time instead. This notably breaks the SOURCE_DATE_EPOCH support
for reproducible builds.

Passing the creation time as DOCINFO pdfmark forces gs to use the
specified date/time. Although ghostscript still adds the unreproducible
DocumentUUID and trailer ID, it is sufficient when including the PDF
figure with pdflatex.

Reuse the SOURCE_DATE_EPOCH code from creation_date for determining
the wanted timestamp, and return the formatted time via the new
`creation_date_pdfmark` function.

Stefan Brüns Stefan Brüns 2023-03-09

Thomas Loimer Thomas Loimer 2023-03-12

changed fig2dev/creationdate.c
changed fig2dev/creationdate.h
changed fig2dev/dev/genps.c
fig2dev/creationdate.c Diff Switch to side-by-side view
Loading...
fig2dev/creationdate.h Diff Switch to side-by-side view
Loading...
fig2dev/dev/genps.c Diff Switch to side-by-side view
Loading...