Hello,

I am using podofo to read a pdf file generated by adobe acrobat with permission 
password on it with 128-bit AES encryption level, using the following code:

        try {
                PdfMemDocument pdfDocument;
                pdfDocument.Load([[[NSBundle mainBundle] 
pathForResource:@"sample" ofType:@"pdf"] UTF8String]);
        }
        catch( PdfError & e ) {
                e.PrintErrorMsg();
        }


but I get the following error:

        PoDoFo encounter an error. Error: 8 ePdfError_InternalLogic Error 
Description: An internal error occurred. Callstack: #0 Error Source: 
/Users/khalid_jumaa/Documents/podofo93_build/podofo-0.9.3/src/base/PdfParser.cpp:226
 Information: Unable to load objects from file. #1 Error Source: 
/Users/khalid_jumaa/Documents/podofo93_build/podofo-0.9.3/src/base/PdfParserObject.cpp:404
 Information: Unable to parse the stream for object 2 0 obj . #2 Error Source: 
/Users/khalid_jumaa/Documents/podofo93_build/podofo-0.9.3/src/base/PdfEncrypt.cpp:356
 Information: Error AES-decryption data padding

Another observation is that when I read a plain pdf ( non-secure ) using 
podofo, and then export it to a file, reading it back and trying to modify one 
of the pages’ content results with the following error

Flate Decoding Error from ZLib: -3


PoDoFo encounter an error. Error: 40 ePdfError_Flate
        Error Description: ZLib returned an error.
        Callstack:
        #0 Error Source: 
/Users/khalid_jumaa/Documents/podofo93_build/podofo-0.9.3/src/base/PdfFiltersPrivate.cpp:574


PdfPainter::~PdfPainter(): FinishPage() has to be called after a page is 
completed!Assertion failed: (!m_pCanvas), function ~PdfPainter, file 
/Users/khalid_jumaa/Documents/podofo93_build/podofo-0.9.3/src/doc/PdfPainter.cpp,
 line 149.

All of the above does not appear and the process of reading-exporting-reading 
back using podofo as well as reading adobe-acrobat-exported secure pdfs works 
correctly when the encryption algorithm is RC4

Khalid Jumaa
------------------------------------------------------------------------------
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to