How do I deal with “Compressed object is corrupt” when processing password protected PDF?

57 views
Skip to first unread message

Support

unread,
Apr 23, 2014, 5:10:33 PM4/23/14
to pdfne...@googlegroups.com
Q:

While attempting to convert to XOD some PDF documents which are password protected the function is returning the following message.

 

“Compressed object is corrupt”

 

Perhaps this message could indicate that the file is password protected if possible or it could be that I have done something in error.

------------
A:

This is most likely the case. You can detect password protected files with pdfdoc.InitSecurityHandler(), which will return false if the file needs password.


You can provide password with pdfdoc.InitStdSecurityHandler(“pass”) as shown in EncTest sample project (snippet #2).

   http://www.pdftron.com/pdfnet/samplecode.html#EncTest


Reply all
Reply to author
Forward
0 new messages