# hyperref and beamer: Meta Data | 'pdftitle' not Working

• I want to generate a beamer presentation and I want some meta data in the PDF document.
• I therefore use a basic template but the pdftitle tag is not recognized (not shown in the PDF properties, see the German "Titel" in the screenshot).
• This seems simple enough - I am afraid, that I do not see the obvious.

\documentclass{beamer}

\usepackage{hyperref}
\hypersetup{
pdftitle = {pdftitle}, % <-- Missing in PDF
pdfauthor = {pdfauthor},
pdfsubject = {pdfsubject},
pdfkeywords = {keyword1 keyword2},
}

\begin{document}

\begin{frame}
\frametitle{Test}
Test
\end{frame}

\end{document}


• Try the beamer option usepdftitle=false. – moewe Mar 8 '19 at 8:09
• @moewe Awesome. Provide an answer (just the comment) and I accept. My Google-Fu was not good this time :(. – Dr. Manuel Kuehner Mar 8 '19 at 8:11
• You could also give a \title: \title{PDFtitle} – moewe Mar 8 '19 at 8:11

By default beamer tries to figure out the pdftitle automatically from the \title command (similarly the pdfauthor is set from the \author command). In the example there is no \title and \author.

The automatic is implemented in a way that pdftitle is always overwritten with the information (or absence of information) from \title at \begin{document}. If \title has not been set at that point, the pdftitle will be empty. In particular that means that \title needs to be set before \begin{document} to have any influence on the metadata. If it is issued later, the metadata does not change. The implementation for pdfauthor is slightly different, it is overwritten at the point where \author is executed. In particular the pdfauthor is not overwritten if there is no \author command.

Option 1 Provide \title and \author information before \begin{document}.

\title{pdftitle}
\author{pdfauthor}
% before \begin{document}!


Option 2 Disable the automatic generation of PDF metadata from \title and \author by setting the class option

usepdftitle=false


• Addition: If I place \title{pdftitle} after \begin{document} then the tag is not visible in the PDF properties anymore. – Dr. Manuel Kuehner Mar 8 '19 at 8:41
• @Dr.ManuelKuehner Indeed, the pdftitle is set in the command \beamer@firstminutepatches at or shortly before \begin{document}. If you issue \title after \begin{document} it is too late. pdfauthor is different. It is really set at the moment you execute \author. – moewe Mar 8 '19 at 8:44