Hi Michael

On 12/20/2015 02:48 PM, Michael Clerx wrote:

I have a bunch of figures that I export to EPS and PDF using a script.
Each time I regenerate the figures, git indicates they have changed.
Inspecting the EPS files shows the only change is a comment about the
creation date. Inspecting the PDF is more troublesome, as git treats it
as a binary file, but I'm assuming the same thing happens.

Is there any way to disable creation time information in the export so
that the figures only differ when the actual contents have changed?

The PS and PDF output is created by Qt's QPrinter code. Unfortunately it doesn't look like it's possible to program it to disable the creation date in its output.

It might be possible to delete the date in the postscript file by modifying it (Veusz has to do this to make the page size correct, so it could be stripped out). For PDF it's trickier, as you say it's a binary file. There are some tools available which will let you dump the decoded

There's a page here which suggests that it might be possible to add a filter to git to do the stripping:

http://stackoverflow.com/questions/16058187/make-git-ignore-the-date-in-pdf-files

Jeremy

_______________________________________________
Veusz-discuss mailing list
Veusz-discuss@gna.org
https://mail.gna.org/listinfo/veusz-discuss

Répondre à