Skip to content

Instantly share code, notes, and snippets.

@gettalong
Last active June 10, 2019 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gettalong/7602fe9e9b0b71fd094e9f6b815fafbd to your computer and use it in GitHub Desktop.
Save gettalong/7602fe9e9b0b71fd094e9f6b815fafbd to your computer and use it in GitHub Desktop.
PDFs not opening in Adobe Acrobat Reader but working fine in all other tested PDF viewers

Edit: I think I found the problem: Acrobat needs the Catalog dictionary to be an indirect reference that is not in an object streams.

  • good3.pdf: PDF encrypted with (A)RC4 using V=4, PDF version 1.5, cross-reference and object streams, Catalog dictionary not in the object stream.

These files were generated with HexaPDF and work fine in all viewers except Adobe Acrobat Reader. They seem to be valid PDFs but Acrobat doesn't like them...

All files use the password 'test'.

  • good1.pdf: PDF encrypted with (A)RC4 using V=2, PDF version 1.5, cross-reference and no object streams.

  • good2.pdf: PDF encrypted with (A)RC4 using V=4, PDF version 1.5, cross-reference and no object streams.

  • qpdf-good1.pdf: Using qpdf instead of HexaPDF, PDF encrypted with (A)RC4 using V=2, PDF version 1.5, cross-reference and object streams.

  • bad1.pdf: PDF encrypted with (A)RC4 using V=2, PDF version 1.5, cross-reference and object streams.

  • bad2.pdf: PDF encrypted with (A)RC4 using V=4, PDF version 1.5, cross-reference and object streams.

Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment