You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Stephen Gallagher (JIRA)" <ji...@apache.org> on 2010/06/14 17:04:14 UTC

[jira] Created: (PDFBOX-749) Image colours going wrong when I encrypt an existing pdf

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.


[jira] Updated: (PDFBOX-749) Image colours going wrong when I encrypt an existing pdf

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-749?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting updated PDFBOX-749:
---------------------------------

    Fix Version/s:     (was: 1.3.0)

> 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
>            Assignee: Adam Nichols
>
> 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.


[jira] Commented: (PDFBOX-749) Image colours going wrong when I encrypt an existing pdf

Posted by "Adam Nichols (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12879012#action_12879012 ] 

Adam Nichols commented on PDFBOX-749:
-------------------------------------

Is this a duplicate of https://issues.apache.org/jira/browse/PDFBOX-99?

> 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.


[jira] Resolved: (PDFBOX-749) Image colours going wrong when I encrypt an existing pdf

Posted by "Adam Nichols (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-749?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adam Nichols resolved PDFBOX-749.
---------------------------------

       Resolution: Duplicate
    Fix Version/s: 1.3.0
         Assignee: Adam Nichols

This looks like it is a duplicate of PDFBOX-99.  Since there's no file attached, there's no way for us to confirm or deny this.

> 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
>            Assignee: Adam Nichols
>             Fix For: 1.3.0
>
>
> 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.