Adding metadata
The PDF standard contains a field for hidden descriptive data, such as the name of the author and the title of a document. This is useful for archiving purposes. Internet search engines also inspect metadata information. In this recipe, we will edit it.
How to do it...
We will use the interface of the hyperref
package. Let's again use our examples from Chapter 1, The Variety of Document Types. Let's take a look at the following steps:
Open the
book
example from Chapter 1, The Variety of Document Types, in your editor.At the end of the preamble, load the
hyperref
package:\usepackage{hyperref}
Set up the metadata information. Here, we use some dummy text:
\hypersetup{pdfauthor = The Author, pdftitle = The Book, pdfsubject = Draft version, pdfkeywords = {book, draft}, pdfproducer = TeX version, pdfcreator = LaTeX editor}
Compile your document.
Take a PDF viewer, such as the Adobe Reader, and inspect the document properties...