Adding metadata
Standard PDFs contain concealed fields for descriptive information, such as the author’s name and the document title. These fields serve archival purposes and are utilized by internet search engines, so it’s advisable to use them. This recipe will demonstrate how to edit this metadata.
How to do it...
We will use the hyperref package interface. Let’s again use our examples from Chapter 1, Exploring Various Document Classes:
- Open the book example from the first chapter in your editor.
- At the end of the preamble, load the hyperref package:
\usepackage{hyperref}
- Set up metadata information. Here, we use some dummy text:
\hypersetup{pdfauthor = The Author, pdftitle = The Book, pdfsubject = Draft version, ...