Hello,

I using podofo to read a pdf file, add to it a modification password ( owner 
password ), and then export it to a file as following:

        PdfMemDocument pdfDocument; 
        pdfDocument.Load([[[NSBundle mainBundle] pathForResource:@"sample" 
ofType:@"pdf"] UTF8String]);

        PdfEncrypt *encrypt = PdfEncrypt::CreatePdfEncrypt(“", “password", 
PdfEncrypt::ePdfPermissions_EditNotes,
                                                           
PdfEncrypt::ePdfEncryptAlgorithm_RC4V2,
                                                           
PdfEncrypt::ePdfKeyLength_128);
    
        pdfDocument.setEncrypted(*encrypt);
    
        PdfRefCountedBuffer pdfCountedBuffer;
        PdfOutputDevice pdfBuffer(&pdfCountedBuffer);
        pdfDocument.Write(&pdfBuffer);

        NSData *pdf = [NSData dataWithBytes:pdfCountedBuffer.GetBuffer() 
length:pdfCountedBuffer.GetSize()];
        [pdf writeToFile:path atomically:YES];

The problem is that the generated pdf and using the iOS or MAC rendering engine 
for pdfs, many of the images embedded int the pdf are not rendered, with the 
following error reported:

invalid `Indexed' color space: invalid lookup entry.
invalid image `ColorSpace' value.

A attached is a sample document with which the problem appears.
------------------------------------------------------------------------------
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to