Add document protection API
You can encrypt PDF file with password. I think this is useful.
Hello @kkazuo
Looks cool. I'm currently away on holiday. Will check this properly on Tuesday, when I'm back.
Maybe a sample usage of this should be added to the README?
Thanks :)
Hello @kkazuo :wave:
sorry I took so long to respond to this PR properly.
Could you consider moving this functionality that you've implemented from under pdfboxing.info to say pdfboxing.security?
Because info, to me at least, is meant to be just about getting information. Whereas this PR add security aspect.
Feel free to suggest another name if you think that it might be more suitable.
Thanks again
Hello again!
I agree that the namespace separation. src diff is more simple and less conflict too.
Thanks
Hello @kkazuo
thanks for the quick response :)
Any chance that you can add some more tests?
For example, can you add tests for these abilities:
can-extract-content
can-fill-in-form
can-modify
can-modify-annotations
read-only
Something like: 'flip the switch' can-extract-content to no and then try to extract content. Then disable form filling and try to fill in the form and prove that it can't be done. Something similar for read-only...
Hmm.. protect-doc is currently oneway API.
(Unprotected to protected)
Because common/load-pdf could not load password protected pdf.
So, You cannot fill the form of a protected pdf.
Probably I should implement unprotect-doc thing to achieve to write more tests.
Thanks
It's been a while since this was created, and since I won't use it, I'll close the PR.
If you still want it, feel free to re-open it.
Thanks