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

Tilman Hausherr commented on PDFBOX-2861:
-----------------------------------------

Could you please attach the PDFs?

> PDChoiceField values being lost when decrypting an encrypted PDF
> ----------------------------------------------------------------
>
>                 Key: PDFBOX-2861
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2861
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 1.8.9
>         Environment: Java 1.7, Mac OSX 10.10.2
>            Reporter: Andrew Crowe
>
> I load a PDDocument from a byte stream as follows,
>               byte[] body = BASE64EncoderDecoder.decodeBuffer(BASE64body);
>               ByteArrayInputStream bis = new ByteArrayInputStream(body);
>               pdfDocument = PDDocument.load(bis);
>               
>               // Unlock it if needed
>               if (pdfDocument.isEncrypted())
>               {
>                       StandardDecryptionMaterial sdm = new 
> StandardDecryptionMaterial(password);
>                       pdfDocument.openProtection(sdm);
>               }
> If there is no encryption then all is fine.  However, as soon as I put a 
> password on the PDF the values of the 'PDChoiceField' type loose their values 
> <null>.  All other field types come out correctly.
> getSelectedOptions brings back null, and 'getValue()' also returns null with 
> the encrypted PDF, but work fine when not encrypted.
> Many thanks



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to