[ 
https://issues.apache.org/jira/browse/PDFBOX-2471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14192363#comment-14192363
 ] 

Stephen Hendrix commented on PDFBOX-2471:
-----------------------------------------

Using pdf.save as follows:

{code}
AccessPermission ap = new AccessPermission();
StandardProtectionPolicy policy = new StandardProtectionPolicy(password, 
password, ap);

policy.setEncryptionKeyLength(256)
pdf.protect(policy);
pdf.save(outputStream)
{code}

> AES encryption failing to write Acroform field names and values
> ---------------------------------------------------------------
>
>                 Key: PDFBOX-2471
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2471
>             Project: PDFBox
>          Issue Type: Bug
>          Components: AcroForm, Writing
>    Affects Versions: 2.0.0
>            Reporter: Stephen Hendrix
>
> When writing a PDF using AES 256 bit encryption, the field names / values 
> from the Acroform are not being persisted correctly. If I encrypt using RC4 
> 128 bit, they are persisted correctly. I am using snapshot 
> pdfbox:2.0.0-20141023.180319-636.
> I dug into this, and it looks to me the problem is with 
> COSWriter.visitFromString, which invokes  SecurityHandler.decryptString 
> (there is no SecurityHandler.encryptString).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to