With the following pdf file I created by js.
http://www.dnpi.com.hk/errorfile.pdf
I am able to open with Chrome/Mobile perfectly.
But got Error message "Expected a Dict Object" on Adobe Acrobat DC.
Following with the image of the file openned with Chrome.
Anyone got any idea how this happens?
enter image description here
CodePudding user response:
This PDF file produces errors in xpdf:
$ xpdf ~/git/david-cv/errorfile.pdf
Syntax Error (174): Dictionary key must be a name object
Syntax Error (176): Dictionary key must be a name object
Syntax Error (180): Dictionary key must be a name object
Syntax Error (182): Dictionary key must be a name object
Syntax Error (191): Dictionary key must be a name object
Syntax Error: Kid object (page 1) is wrong type (stream)
It seems to be objecting to the page 1
object.
Opening, this PDF in a text editor, there is a problem with the page 1 object:
3 0 obj
<</Type /Page
/Parent 1 0 R
/Resources 2 0 R
/MediaBox [0 0 595.28 841.89]
/Contents 4 0 R
endobj
It's missing a closing >>
for the Page dictionary object.
The PDF file is incorrect, although Chrome/Mobile seems to be able to recover it.