Although there are many advantages of printed papers, electronic ones should have three important advantages – they are more tree-friendly, they are easily shared and searchable. This post describes how to add some metadata to documents typeset using LaTeX and shared as PDF files.
One of the most useful packages for PDFs shared on the Internet is hyperref. Unless special options are used, it will make all references to pages and sections clickable hyperlinks (very useful when reading technical texts on screen, especially if page numbers are different then in the file). The links are the main use of this package, but it also supports specifying useful metadata about the document.
The following options of hyperref specify PDF metadata (Section 3.6 of hyperref manual, the explanations are based on PDF Reference 1.7 page 844):
pdftitlepdfauthor- title and author of the document in the common meaning of these words
pdfsubjectpdfkeywords- just subject and keywords of the document
pdfcreator- the program which made the original document, the default is appropriate
pdfproducer- the program which converted the document to PDF, also has appropriate default
pdflang- the language of the document in the format of RFC 3066 (according to the PDF Reference different languages may be specified for parts of documents, I’m not sure if any
babel-like package supports this)
When these cannot be specified as package options, pass them to the \hypersetup macro in the same format.
Values of all of the above options are plain text, Unicode may be used in it (in my UTF-8 encoded document Unicode works in the argument of \hypersetup, but not in package’s options). In some cases the command \texorpdfstring{TeX string}{PDF string} may be useful in macros used both in these metadata and in typeset text.
