pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Munn <and...@nmedia.net>
Subject NullPointer in StandardSecurityHandler
Date Tue, 21 Apr 2015 22:38:08 GMT

It looks like the StandardProtectionPolicy policy == null here:

 private int computeRevisionNumber() {
        return this.version < 2 && 
!this.policy.getPermissions().hasAnyRevision3PermissionSet()?2:(this.version 
== 5?6:(this.version != 2 && this.version != 3 && 
!this.policy.getPermissions().hasAnyRevision3PermissionSet()?4:3));
    }

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)

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


Mime
View raw message