Hi,
Yeah, I got this message:
Please try this before saving:
((COSDictionary)pdfTemplate.getDocumentCatalog().getCOSObject().getDictionaryObject(COSName.PERMS)).removeItem(COSName.getPDFName("UR3"));
The code above doesn't do null checks etc, so you may want to change
that. But it removes the usage rights. I don't know if this is a good
idea, but it does what you asked for.
Tilman
Am 26.03.2018 um 15:29 schrieb JZ Q:
Sorry, I wasn't aware the attached will be filter by this email list. Here
is the link:
https://drive.google.com/file/d/15s-0P3y6dKN4wuvZc1ShYy_yUu-qitfV/view?usp=sharing
Again, for such type of forms, if I use PDField.setValue(), then save it
using the following statements, it becomes READY-ONLY document. I prefer
the program to give the initial value only, then the resulting pdf is still
editable by users. Any feedback is really appreciated as I have been
working on it for a week without any progress. Thanks.
pdfTemplate.setAllSecurityToBeRemoved(true);
pdfTemplate.save(output_file);
On Mon, Mar 26, 2018 at 2:49 AM, Tilman Hausherr <thaush...@t-online.de>
wrote:
Am 26.03.2018 um 03:00 schrieb JZ Q:
I have attached the form for your reference
These don't get passed. Please upload the PDF to a public location.
Tilman
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org