Re: NullPointer in StandardSecurityHandler

2015-04-22 Thread Tilman Hausherr
Hi, Fixed. The difference is that you now get an exception telling you what to do. Tilman Am 22.04.2015 um 08:00 schrieb Tilman Hausherr: https://issues.apache.org/jira/browse/PDFBOX-2769 created. In the meantime, either follow the instructions at https://pdfbox.apache.org/1.8/cookbook/enc

Re: NullPointer in StandardSecurityHandler

2015-04-21 Thread Tilman Hausherr
https://issues.apache.org/jira/browse/PDFBOX-2769 created. In the meantime, either follow the instructions at https://pdfbox.apache.org/1.8/cookbook/encryption.html , or call setAllSecurityToBeRemoved(true) before saving your doc. And yes, your doc is encrypted, but with an empty user psw. Ti

Re: NullPointer in StandardSecurityHandler

2015-04-21 Thread Andrew Munn
...and I'm running latest 2.0.0 snapshot On Tue, 21 Apr 2015, Andrew Munn wrote: > On Wed, 22 Apr 2015, Tilman Hausherr wrote: > > > I think I remember seeing this before... happens when calling save with some > > incomplete encryption settings. Could you please post the shortest possible > > co

Re: NullPointer in StandardSecurityHandler

2015-04-21 Thread Andrew Munn
On Wed, 22 Apr 2015, Tilman Hausherr wrote: > I think I remember seeing this before... happens when calling save with some > incomplete encryption settings. Could you please post the shortest possible > code that reproduces the error, the version you are using, and upload the PDF > you are using (

Re: NullPointer in StandardSecurityHandler

2015-04-21 Thread Tilman Hausherr
I think I remember seeing this before... happens when calling save with some incomplete encryption settings. Could you please post the shortest possible code that reproduces the error, the version you are using, and upload the PDF you are using (if applicable) somewhere. But if my memory is co

NullPointer in StandardSecurityHandler

2015-04-21 Thread Andrew Munn
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()