PatrickF
PatrickF

Reputation: 642

PDF cannot be read

I programmatically created a PDF with object streams and encryption, but while several PDF viewers can read it, some fail.

PDF readers, which can read it:

PDF readers, which cannot read it:

Currently i am blind to see, what the problem inside the PDF is. Can anyone help? The PDF can be downloaded at https://www.doxisafe.me/#!/retrieve/ivqkli

The PDF is encrypted with an owner password "owner" and no user password.

Upvotes: 1

Views: 345

Answers (1)

PatrickF
PatrickF

Reputation: 642

Today i found a solution, that Adobe just requires the Catalog dictionary not to be in an object stream, when the file is encrypted. This is not following the pdf spec, which claims, that only the following objects shouldn't be inside the object stream:

  • Stream objects
  • Objects with a generation number other than zero
  • A document’s encryption dictionary (see 7.6, "Encryption")
  • An object representing the value of the Length entry in an object stream dictionary
  • In linearized files (see Annex F), the document catalog, the linearization dictionary, and page objects shall not appear in an object stream.

My file is not linearized, so the last condition shall not apply.

Upvotes: 5

Related Questions