# Metadata in PDF with XeLaTeX: Title doesn't change and hyperref gives warning

I would like to define a title which will show in the pdf instead of the file name. My code is as follows. But when I compile it, it doesn't change the title, and on top of that I get the warning Package hyperref Warning: XeTeX driver only supports unicode. Is there a way to fix it (without any warning in the end) or is there another way to define metadata?

\documentclass[12pt,a4paper,twoside,openright]{report}

%Schriftart Arial - ACHTUNG: Compile with XeLaTeX (not PDFLaTeX)!
\usepackage{fontspec}
\defaultfontfeatures{Scale = MatchLowercase}
\setmainfont{Arial}[Scale = 1.0]

%Seitenlayout
\usepackage[top=2.5cm, bottom=2.5cm, left=2.5cm, right=2.5cm]{geometry} %showframe

%Deutsche Umlaute, Englisch
\usepackage[main=ngerman, english]{babel}

\usepackage[bookmarks       = true,
bookmarksopen   = true,
pdfauthor={Name},
pdftitle={Title}
]{hyperref}

\begin{document}
\tableofcontents

\chapter{Test}

\end{document}
• What do you mean by you don't get the title? Where do you expect the title to appear? – Ulrike Fischer Jun 11 '19 at 21:01
• @KJO You are right, it changes the metadata in the pdf in the file details, I didn't see that - I have to specfiy that I would also like to see the title in the tab. – TeXlearner Jun 11 '19 at 21:13
• Thanks to everyone! :) – TeXlearner Jun 11 '19 at 21:15

You can suppress the warning by adding the unicode option (before the pdfauthor). You can set the title in the viewer window with pdfdisplaydoctitle:

\documentclass[12pt,a4paper,twoside,openright]{report}

%Schriftart Arial - ACHTUNG: Compile with XeLaTeX (not PDFLaTeX)!
\usepackage{fontspec}
\defaultfontfeatures{Scale = MatchLowercase}
\setmainfont{Arial}[Scale = 1.0]

%Seitenlayout
\usepackage[top=2.5cm, bottom=2.5cm, left=2.5cm, right=2.5cm]{geometry} %showframe

%Deutsche Umlaute, Englisch
\usepackage[main=ngerman, english]{babel}

\usepackage[bookmarks       = true,
bookmarksopen   = true,
unicode,
pdfauthor={Name},
pdftitle={Title},
pdfdisplaydoctitle
]{hyperref}
\begin{document}
\tableofcontents

\chapter{Test}

\end{document}

• Thank you very much - also for the hint with the order of the options! This is exactly what I wanted to obtain. – TeXlearner Jun 11 '19 at 21:17