0

i noticed that i am not able to add metadata to my pdf.. any clues? Here is a minimal working example. The produced pdf has no author or title metadata. I am using miktex and texworks.

% !TeX program = xelatex
\documentclass[a4paper,10pt,draft]{report}

\usepackage[xetex]{hyperref}
%Provides some compatiblity with latex and
%Loads the fixltx2e, metalogo, xunicode, fontspec packages
\usepackage{xltxtra} 
\usepackage{xgreek} %Set greek hypenation and support in general


\usepackage{graphicx} %Extends the \includegraphics command
\usepackage{amsmath}  %Improoved math support e.g scalable brackets
\usepackage{array}  %Extends the array command
\usepackage{subfigure}
\usepackage{rotating}
\usepackage{alltt}
\usepackage{float}
\usepackage{multirow}
\usepackage{pdfpages}
\usepackage{listings}
\usepackage{unicode-math}
\usepackage{tikz} %pgf-tikz pakcage

\usetikzlibrary{intersections}
\usetikzlibrary{calc}
\usetikzlibrary{through}



\setmainfont{XITS}
\setmathfont{XITS Math}


\hypersetup{
    colorlinks=true,linkcolor=blue,linktocpage,bookmarksopen=true,
    pdfauthor=Name,
    pdftitle={Title}
}


\begin{document}
    Hello world
\end{document}
msmechanized
  • 1,203
  • 1
    You should still load hyperref later on in the preamble. It is usually one of the last packages you load, if not the last one. – jon Jul 10 '12 at 00:55
  • @jon care to explain why? Don't get me wrong, i just want to learn. – msmechanized Jul 10 '12 at 08:44
  • 1
    @msmechanized load hyperref last because hyperref patches all sorts of things; for example, subfigure defines new sorts of caption, but doesn't make them hyperref-aware if that might be needed. (note, this doesn't answer your original question...) – wasteofspace Jul 10 '12 at 09:18
  • @msmechanized -- Sure; see here – jon Jul 10 '12 at 09:42

1 Answers1

1

I forgot the draft directive in the document class. If i remove it, title and author are displayed correctly.

msmechanized
  • 1,203