PDFs have meta document information which usually can be read and modified using standard PDF viewers such as Acrobat Reader or Preview (Mac). In Acrobat Reader search for “Properties” in the file-menu. When creating a document using LaTeX, the hyperref package helps setting some of these information, including:
- Title
- Author
- Subject
- Creator
- Producer
- Keywords
- and many other display and information options (see section 3.6 of the documentation)
Here is how:
While loading the package, the meta information is set by specifying key-value pairs in the optional arguments field, i.e.:
\usepackage[key1=value1, key2=value2]{hyperref}
A complete code example:
\documentclass[11pt]{article} \usepackage[english]{babel} \usepackage{blindtext} \usepackage[pdftex, pdfauthor=Tom, pdftitle={PDF meta information}, pdfsubject={Sample document with blind text}, pdfkeywords={hyperref, PDF meta information}, pdfproducer=TeXShop, pdfcreator=pdflatex]{hyperref} \begin{document} \blindtext \end{document}
Using the Acrobat Reader, the meta information can be read and changed through the menu item “file -> properties” (or similar):
A comprehensive list of options is provided in section 3.6 of the hyperref package documentation.
Adrien Barbaresi
Your meta information may be easier to edit if you use the \hypersetup command in the head of the document, as reported here (with all the options) :
https://en.wikibooks.org/wiki/LaTeX/Hyperlinks#Customization
This way its content does not optically mingle with the other packages.
tom
Adrien, thanks for pointing this out. Appreciate it. Tom.
doncherry
The hyperref option pdfusetitle might be worth mentioning, it tries to determine author and title automatically from the \author and \title macros. It needs to be called with \usepackage{hyperref}; it doesn’t work within \hypersetup.
The pdftex option isn’t really necessary since hyperref can detect this driver automatically (see. section 3.3 of the manual).
Frits
Thanks for writing this down, I might link to it if that’s okay. Also note that the authors of hyperref made a document containing brief explanations on the package options (find it here: http://archive.cs.uu.nl/mirror/CTAN/macros/latex/contrib/hyperref/doc/options.pdf)
tom
Hi Frits,
Sure, please go ahead and link to the post. Also, thanks for the document link.
Best, Tom.
Minustar
Regarding the keywords, they should be specified in the following way: pdfkeywords={kw1}, {keyword2}, {etc.}
tom
Hello there! Thanks for pointing this out. Unfortunately, the hyperref package documentation has no example. However, I saw that wikibooks has an example that is similar to what you proposed (without commas). However, the output generated by the wikibooks code compared to mine are slightly different. The keywords are separated by a space only, whereas using the code from in post they are separated by a comma and with quotes (see post above).
Best, Tom.