You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2015/04/22 20:40:59 UTC

[jira] [Resolved] (PDFBOX-2769) NPE when saving encrypted file

     [ https://issues.apache.org/jira/browse/PDFBOX-2769?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tilman Hausherr resolved PDFBOX-2769.
-------------------------------------
    Resolution: Fixed
      Assignee: Tilman Hausherr

> NPE when saving encrypted file
> ------------------------------
>
>                 Key: PDFBOX-2769
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2769
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Writing
>    Affects Versions: 2.0.0
>            Reporter: Tilman Hausherr
>            Assignee: Tilman Hausherr
>             Fix For: 2.0.0
>
>         Attachments: PDFBOX-2769.pdf
>
>
> Mailing list user gets this when loading and then saving an encrypted file (of which he didn't know it was encrypted):
> {code}
> java.lang.NullPointerException
>     at org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.computeRevisionNumber(StandardSecurityHandler.java:129)
>     at org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.prepareDocumentForEncryption(StandardSecurityHandler.java:332)
>     at org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1254)
>     at org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1215)
>     at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:958)
>     at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:930) 
> {code}
> At the very least, we should bring an IllegalStateException with a useful message telling what to do.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org