I'm trying to make pdflatex display non-ascii (cyrillic) characters in PDF metadata using hyperref's pdftitle and pdfauthor options. Here is my document:
\documentclass{article}
\usepackage[russian]{babel}
\usepackage[utf8]{inputenc}
% \usepackage[T2A]{fontenc} % if uncomment, pdf search stops working
\usepackage{longtable}
\usepackage{fancyhdr, doc, textcomp}
\usepackage{ifpdf}
\usepackage{cmap} % to activate pdf search
\usepackage{hyperref}
\hypersetup {
pdftitle={Название документа},
pdfauthor={Автор документа},
}
\begin{document}
Hello, world! Привет, мир!
\end{document}
This does not work, cyrillic characters are just omitted. If I replace \usepackage{hyperref} to \usepackage[unicode]{hyperref}, it starts working as expected. But what surprised me is that if I set unicode=true option in \hypersetup (and remove unicode from \usepackage[unicode]{hyperref}), it does not work. Is it a bug or am I missing something?
hyperrefoptions only have effect in the\usepackagecommand, see thehyperrefmanual. Could this be the case? – Andrey Vihrov Oct 31 '12 at 20:04pdfencoding=pdfdocas option tohyperrefso all my files have it. Much to my surprise through testing I discover tonight that it is not necessary after all for latin1 encode input to say anything to hyperref, so indeed I wonder why one would have to for utf8. – Oct 31 '12 at 20:31hyperrefin the package loading solved the problem. Indeed it is surprising that cyrillic letters disappear whereas letters such as éèù, etc.. make their way (without any need for an option - much to my surprise!) into the info fields of the pdf. – Oct 31 '12 at 20:58