Image colours going wrong when I encrypt an existing pdf
--------------------------------------------------------

                 Key: PDFBOX-749
                 URL: https://issues.apache.org/jira/browse/PDFBOX-749
             Project: PDFBox
          Issue Type: Bug
    Affects Versions: 1.2.0
            Reporter: Stephen Gallagher


Hi, I am using pdfbox to open an existing pdf file with embedded images (png, 
gif etc). I am then using the security features to encrypt the pdf and generate 
a new pdf.

In the new pdf the images have lost their original colours and have completely 
different colours. I thought 1.2 would fix this as I saw a bug report on it but 
it still occurs for me.

Here is the code I am using:

PDDocument document = null;

                document = PDDocument.load(infile);

                AccessPermission ap = new AccessPermission();

                int keyLength = 128;

                StandardProtectionPolicy spp = new 
StandardProtectionPolicy(ownerPassword, userPassword, ap);
                spp.setEncryptionKeyLength(keyLength);
                document.protect(spp);

                document.save(outfile);

                document.close();

Steve

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to