pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: Setting document restrictions and security
Date Fri, 10 Jul 2015 22:25:58 GMT
Am 11.07.2015 um 00:01 schrieb Tilman Hausherr:
> Am 10.07.2015 um 23:50 schrieb Roberto Nibali:
>> String ownerPassword = "";
>> String userPassword = "hidden";
>
> Not sure if that is the cause, but it's userPassword that should be 
> empty and owner password set.

To get the restricted permissions, open with the user password (empty).

You opened with the owner password, so you have all permissions.

If that doesn't work, look here:
https://pdfbox.apache.org/1.8/cookbook/encryption.html

and if that doesn't give a hint, get the source code and look at the file
TestSymmetricKeyEncryption.java

This is a unit test, i.e. it does something and tests it to make sure 
that all is OK.

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


Mime
View raw message