Not really a programming question but I'm running out of ideas.
I generate this PDF file: http://www.o2sol.com/download/Sample_ObjectCompression_CryptBad.pdf
I can open the PDF file with any PDF viewer I tried (Chrome, Edge, Foxit, SumatraPDF, Xodo, etc) but Adobe Acrobat cannot open it, the error is "The file is damaged and it cannot be repaired."
Can somebody give me a hint what is wrong with the file?
Disclaimer: the PDF file is generated with the PDF4NET, the library I work on.
Update:
I fixed the offset for object 10 but the file still cannot be opened with Acrobat.
I created 2 updated files:
http://www.o2sol.com/download/Sample_ObjectCompression_CryptBad2.pdf - the file is just encrypted with RC4, no compression on the object stream or xref stream
http://www.o2sol.com/download/Sample_ObjectCompression_NoCrypt2.pdf - the file is not encrypted, no compression on the object stream or xref stream. The encrypt object has been replaced by document information to keep the same object numbers and offsets.
Both files have the same xref stream and object stream. CryptBad2 still cannot be opened by Acrobat so I suspect it's an encryption problem, although if I encrypt the file but drop the object compression, the file is opened without problems with Acrobat.