0

When I compile a .tex file in latex and I get the corresponding .pdf, I can obtain information concerning the file. Thus, for example, I can find out what is the title (which can be set with pdftitle={...}), who is the author (which can be set with pdftitle={...}), etc.

Here there is the question: how can I obtain empty output on all these metadata with hyperref? I am thinking in particular about creation date and modification date, since it seems to me that they produce an output (a date) no matter what.

Thanks in advance for any feedback!


Here there is a MWE:

\documentclass{article} 

\usepackage{hyperref}

\hypersetup{%
  pdfcreator={},
  pdftitle={Hello world!},%
  pdfauthor={Somebody},%
  pdfsubject={},%
  pdfproducer={},%
  pdfcreationdate={Bla}%
}

\begin{document}

Hello world!

\end{document}

If I check the metadata for example with Preview, I get that there is no creation date. Interestingly enough, this is the case if I write something between the relevant brackets (if I leave that empty, then the creation date corresponds to when I actually created the pdf).

Thus, here two questions:

  1. why the above described behavior in the creation date option?

  2. How to get empty output on modification date as well?

7
  • Indeed, I am sorry. I just realized this while you were writing and I tried to improve my question. The idea is to get the result by using hyperref with pdflatex.
    – Kolmin
    Oct 13, 2021 at 13:39
  • For example, in the above mentioned setting, I can get empty output regarding the creation date by setting pdfcreationdate={}, but I cannot see how to do it for the modification date.
    – Kolmin
    Oct 13, 2021 at 13:41
  • I added a MWE example that shows the problem (and the doubts) that I am facing. Really thanks a lot for any feedback!
    – Kolmin
    Oct 13, 2021 at 13:56
  • Ah. On "Preview" that does not show up (a bit disappointing, really). Ok, so the questions remain: how to get empty output on creation and modification date with hyperref
    – Kolmin
    Oct 13, 2021 at 14:02
  • you can set the date with eg SOURCE_DATE_EPOCH=0 pdflatex file but I'm not sure you can set it to empty Oct 13, 2021 at 14:06

1 Answer 1

2
  • List item
\documentclass{article} 

\usepackage{hyperref}

\hypersetup{%
  pdfcreator={},
  pdftitle={Hello world!},%
  pdfauthor={Somebody},%
  pdfsubject={},%
  pdfproducer={},%
  pdfcreationdate={Bla}%
}
\pdfinfoomitdate=1
\begin{document}

Hello world!

\end{document}

causes the date info to be omittted:


    Title:          Hello world!
    Subject:        
    Keywords:       
    Author:         Somebody
    Creator:        
    Producer:       
    CreationDate:   Bla
    Tagged:         no
    UserProperties: no
    Suspects:       no
    Form:           none
    JavaScript:     no
    Pages:          1
    Encrypted:      no
    Page size:      612 x 792 pts (letter)
    Page rot:       0
    File size:      12994 bytes
    Optimized:      no
    PDF version:    1.5

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .