Rank: Newbie Groups: Member
Joined: 7/26/2014 Posts: 1
|
I need to form fill documents, but EO.Pdf is not able to open any secured document. None of the documents require a password to view in Acrobat, they are only secured for modification. The EO.Pdf.PdfDocument constructor fails.
The file version of the EO.Pdf.dll is 5.0.69.2
My code is simply: EO.Pdf.PdfDocument pdf = new EO.Pdf.PdfDocument("c:\\path\\to\\doc.pdf");
The first exception thrown, which is caught internally by EO.Pdf, is: A first chance exception of type 'EO.Pdf.Internal.o' occurred in EO.Pdf.dll Additional information: Header checksum illegal Stack trace: EO.Pdf.dll!EO.Pdf.Internal.ad.e() + 0x2af bytes EO.Pdf.dll!EO.Pdf.Internal.ad.a() + 0x71e bytes EO.Pdf.dll!EO.Pdf.Internal.ad.a(byte[] A_0, int A_1, int A_2) + 0x391 bytes EO.Pdf.dll!EO.Pdf.Internal.ll.c(byte[] A_0, int A_1, int A_2) + 0x165 bytes EO.Pdf.dll!EO.Pdf.Internal.jy.b(byte[] A_0) + 0x17f bytes EO.Pdf.dll!EO.Pdf.Internal.jy.b(byte[] A_0, System.IO.Stream A_1, EO.Pdf.Internal.ai A_2, int A_3) + 0x35e bytes EO.Pdf.dll!EO.Pdf.Internal.h4.b(byte[] A_0, string A_1, EO.Pdf.Internal.ai A_2, int A_3) + 0x89 bytes EO.Pdf.dll!EO.Pdf.Internal.h4.d() + 0x1a5 bytes EO.Pdf.dll!EO.Pdf.Internal.h4.a(EO.Pdf.Internal.h4[] A_0) + 0xdb bytes EO.Pdf.dll!EO.Pdf.Internal.h4.e() + 0x6b bytes EO.Pdf.dll!EO.Pdf.Internal.g4.a(EO.Pdf.Internal.hi A_0, EO.Pdf.Internal.h4 A_1) + 0x160 bytes EO.Pdf.dll!EO.Pdf.Internal.g4.a(EO.Pdf.PdfDocumentSecurity A_0) + 0x89f bytes EO.Pdf.dll!EO.Pdf.Internal.g4.a(bool A_0, EO.Pdf.PdfDocumentSecurity A_1) + 0x9a bytes EO.Pdf.dll!EO.Pdf.Internal.hi.a(System.IO.Stream A_0, bool A_1) + 0xb9 bytes EO.Pdf.dll!EO.Pdf.Internal.hi.a(string A_0) + 0x7f bytes EO.Pdf.dll!EO.Pdf.Internal.hi.hi(string A_0, EO.Pdf.PdfDocumentSecurity A_1) + 0x160 bytes EO.Pdf.dll!EO.Pdf.PdfDocument.PdfDocument(string fileName) + 0x3a bytes
EO then appears to have either handled or ignored the above exception, because the one actually thrown back to me is: A first chance exception of type 'System.IO.InvalidDataException' occurred in System.dll Additional information: Block length does not match with its complement. Stack trace: System.dll!System.IO.Compression.Inflater.DecodeUncompressedBlock(out bool end_of_block) + 0x184 bytes System.dll!System.IO.Compression.Inflater.Decode() + 0x268 bytes System.dll!System.IO.Compression.Inflater.Inflate(byte[] bytes, int offset, int length) + 0x97 bytes System.dll!System.IO.Compression.DeflateStream.Read(byte[] array, int offset, int count) + 0x41 bytes EO.Pdf.dll!EO.Pdf.Internal.jy.a(byte[] A_0) + 0x18a bytes EO.Pdf.dll!EO.Pdf.Internal.jy.b(byte[] A_0, System.IO.Stream A_1, EO.Pdf.Internal.ai A_2, int A_3) + 0x387 bytes EO.Pdf.dll!EO.Pdf.Internal.h4.b(byte[] A_0, string A_1, EO.Pdf.Internal.ai A_2, int A_3) + 0x89 bytes EO.Pdf.dll!EO.Pdf.Internal.h4.d() + 0x1a5 bytes EO.Pdf.dll!EO.Pdf.Internal.h4.a(EO.Pdf.Internal.h4[] A_0) + 0xdb bytes EO.Pdf.dll!EO.Pdf.Internal.h4.e() + 0x6b bytes EO.Pdf.dll!EO.Pdf.Internal.g4.a(EO.Pdf.Internal.hi A_0, EO.Pdf.Internal.h4 A_1) + 0x160 bytes EO.Pdf.dll!EO.Pdf.Internal.g4.a(EO.Pdf.PdfDocumentSecurity A_0) + 0x89f bytes EO.Pdf.dll!EO.Pdf.Internal.g4.a(bool A_0, EO.Pdf.PdfDocumentSecurity A_1) + 0x9a bytes EO.Pdf.dll!EO.Pdf.Internal.hi.a(System.IO.Stream A_0, bool A_1) + 0xb9 bytes EO.Pdf.dll!EO.Pdf.Internal.hi.a(string A_0) + 0x7f bytes EO.Pdf.dll!EO.Pdf.Internal.hi.hi(string A_0, EO.Pdf.PdfDocumentSecurity A_1) + 0x160 bytes EO.Pdf.dll!EO.Pdf.PdfDocument.PdfDocument(string fileName) + 0x3a bytes
If you need the PDF file, let me know how to provide it.
Again, I'm not expecting to modify the PDF content (we won't have the owner password), I just need it to open so I can form fill.
Many thanks.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi, I think you still need to use the password in order to open the file. Whether to allow you to modify the file is enforced by the program/your code to read/modify the file, it's not by the file itself. See here for how to open the file with a password: http://www.essentialobjects.com/doc/4/advanced/encryption.aspxThanks!
|