Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.6.0
-
None
-
9ba9308a997bac90c30b766a48f44451e86e14d9
Description
The code that writes out the title of a PDF file is located in QPdfEnginePrivate::writeInfo() and looks like the following:
xprintf("<<\n"
"/Title (%1)", title.toUtf8().constData());
However that's wrong according to PDF spec. In '14.3.3 Document Information Dictionary' it is stated that the Title field must be of type 'text string'. In '7.9.2.2 Text String Type' it is defined that a string of this type must be encoded either by UTF-16BE or PDFDocEncoding. UTF-8 seems to be completely wrong here and results in the bug that Okular and Acrobat show gibberish in the window title or document information if the title contains non-latin1 characters.
A bug report for KDE with an example document can be found at https://bugs.kde.org/show_bug.cgi?id=207749