Results 1 to 3 of 3

Thread: pdflatex does not produce identical output

  1. #1
    Join Date
    Oct 2006
    Location
    New York
    Beans
    1,118
    Distro
    Xubuntu 12.10 Quantal Quetzal

    pdflatex does not produce identical output

    I've noticed that running pdflatex on the same file twice produces two files which differ in terms of md5sum, does anyone happen to know why this is the case? or better yet if there is a way to get it to produce the same output each time?
    xubuntu minimal, extensive experience, lshw: http://goo.gl/qCCtn
    blog: http://goo.gl/yLg78
    Linux viruses: http://goo.gl/6OCKA

  2. #2
    Join Date
    Aug 2011
    Location
    52.5° N 6.4° E
    Beans
    6,822
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: pdflatex does not produce identical output

    The creation time and date are hidden somewhere in the pdf. The visible contents are the same.

    Code:
    $ cat hello.tex
    \documentclass{article}
    \begin{document}
    Hello world!
    \end{document}
    $ pdflatex hello
    ...
    $ mv hello.pdf hello2.pdf
    $ pdflatex hello
    ...
    $ diff -a hello.pdf hello2.pdf 
    109,110c109,110
    < /CreationDate (D:20130418191554Z)
    < /ModDate (D:20130418191554Z)
    ---
    > /CreationDate (D:20130418191530Z)
    > /ModDate (D:20130418191530Z)
    131c131
    < /ID [<7042DC44D58E605583690E5A59B90A01> <7042DC44D58E605583690E5A59B90A01>] >>
    ---
    > /ID [<BEE687CFFEE88AC23B4208BC614483FB> <BEE687CFFEE88AC23B4208BC614483FB>] >>
    Last edited by Impavidus; April 18th, 2013 at 08:17 PM.

  3. #3
    Join Date
    Oct 2006
    Location
    New York
    Beans
    1,118
    Distro
    Xubuntu 12.10 Quantal Quetzal

    Re: pdflatex does not produce identical output

    Quote Originally Posted by Impavidus View Post
    The creation time and date are hidden somewhere in the pdf. The visible contents are the same.
    Thanks, a simple:
    Code:
    	perl -pi -e "s/.*?ModDate.*/\/ModDate (D:20130418152511-04'00')/" $(BASENAME).pdf
    	perl -pi -e "s/.*?CreationDate.*/\/CreationDate (D:20130418152541-04'00')/" $(BASENAME).pdf
    	perl -pi -e "s/.*?\/ID.*/\/ID [<0535B734E397B655F1D0DD37FD8A8CF9> <0535B734E397B655F1D0DD37FD8A8CF9>]/" $(BASENAME).pdf
    added to my makefile is enough to ensure that identical input produces identical output.
    xubuntu minimal, extensive experience, lshw: http://goo.gl/qCCtn
    blog: http://goo.gl/yLg78
    Linux viruses: http://goo.gl/6OCKA

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •