Source: poppler
Version: 0.16.7-3
Severity: minor

I tried to use the xmpincl LaTeX package to include XMP metadata in a PDF file. Unfortunately, such PDFs make Poppler spew "Illegal character <XY> in hex string" warnings:

| $ pdflatex -interaction batchmode test1.tex
| This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2012/dev/Debian)
|  restricted \write18 enabled.
| entering extended mode
|
| $ pdftotext test1.pdf
| Error (87): Illegal character <3f> in hex string
| Error (88): Illegal character <78> in hex string
| Error (89): Illegal character <70> in hex string
| Error (92): Illegal character <6b> in hex string
| Error (94): Illegal character <74> in hex string
| Error (98): Illegal character <67> in hex string
| Error (99): Illegal character <69> in hex string
| Error (100): Illegal character <6e> in hex string
| Error (101): Illegal character <3d> in hex string
| Error (102): Illegal character <27> in hex string
| Error (103): Illegal character <27> in hex string
| Error (105): Illegal character <69> in hex string
| Error (107): Illegal character <3d> in hex string
| Error (108): Illegal character <27> in hex string
| Error (109): Illegal character <57> in hex string
| Error (111): Illegal character <4d> in hex string
| Error (113): Illegal character <4d> in hex string
| Error (114): Illegal character <70> in hex string
| Error (117): Illegal character <68> in hex string
| Error (118): Illegal character <69> in hex string
| Error (119): Illegal character <48> in hex string
| Error (120): Illegal character <7a> in hex string
| Error (121): Illegal character <72> in hex string
| Error (123): Illegal character <53> in hex string
| Error (124): Illegal character <7a> in hex string
| Error (125): Illegal character <4e> in hex string
| Error (126): Illegal character <54> in hex string
| Error (128): Illegal character <7a> in hex string
| Error (129): Illegal character <6b> in hex string
| Error (133): Illegal character <27> in hex string
| Error (134): Illegal character <3f> in hex string

I believe this is because Poppler is somehow confused with the fact the the very first object in such PDF is a stream starting with "<" character. Indeed, adding a dummy object to the PDF fixes the problem:

| $ pdflatex -interaction batchmode test2.tex
| This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2012/dev/Debian)
|  restricted \write18 enabled.
| entering extended mode
|
| $ pdftotext test2.pdf
[no output]

--
Jakub Wilk
<x:xmpmeta xmlns:x="adobe:ns:meta/">
  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";>
    <rdf:Description rdf:about=""/>
  </rdf:RDF>
</x:xmpmeta>
\documentclass{report}
\usepackage{xmpincl}
\includexmp{test}
\begin{document}
Hello, world!
\end{document}
\documentclass{report}
\usepackage{xmpincl}
\immediate\pdfobj stream {}
\includexmp{test}
\begin{document}
Hello, world!
\end{document}

Attachment: test1.pdf
Description: Adobe PDF document

Attachment: test2.pdf
Description: Adobe PDF document

Reply via email to