Making a Form Locked/Non-Editable After Submission
Copy link to clipboard
Copied
So the thing with this form is that when the person submits it, it will go off to a particular email address. When it arrives, it is still editable – the person receiving can still click in a field and change the content. I don’t want that to happen. Once they submit the info should be embedded / locked / non-editable.
Title edited by: Pariah Burke Made title more succinct.
Copy link to clipboard
Copied
There are two ways you can "lock" a form, one of these only works in Adobe Acrobat, the other works in the free Adobe Reader as well:
1) You can 'flatten' the form. This converts all dynamic content in a PDF to static content. You would do this with the Doc.flattenPages() method: Acrobat DC SDK Documentation - Doc.flattenPages() - This method only works in Adobe Acrobat.
2) You can set all form fields to read-only. This also works in the free Reader. The best way to do this is by iterating over all fields and setting the "readonly" property to true: Acrobat DC SDK Documentation - Field.readonly See here for some sample code: PDF Form javascript for making readonly field by using button
Copy link to clipboard
Copied
Two more options:
3) Submit to a ASP.net server-side script and flatten with iTextSharp and send the attachment using SMTP.
4) Create a signature field, and lock select fields upon signing action (under field properties)
[ Mod: Link removed ]
Copy link to clipboard
Copied
Hi, I am facing this same issue. Did you ever solve this issue? if so how?
Copy link to clipboard
Copied
There were 4 different solutions given above. Did you try any of them? I would recommend option #4, locking the file when it's digitally signed. It's the most secure way of doing it.
Copy link to clipboard
Copied
This link from above is now dead (1) You can 'flatten' the form. This converts all dynamic content in a PDF to static content. You would do this with the Doc.flattenPages() method: Acrobat DC SDK Documentation - Doc.flattenPages() - This method only works in Adobe Acrobat.) Would you be able to explain how to do this for me?
Copy link to clipboard
Copied
This is what happens when you rely on online documentation... What a mess.
Anyway, using this command is very simple. All the code you need is this:
this.flattenPages();
You can run it from the JS Console, or even from a Custom Command, if you have Acrobat Pro DC.
Copy link to clipboard
Copied
Thank you for your reply. So is there a way to tie this to my Save As button, but where it would still leave the Submit Form button usable, so the person would press the SAVE AS, it would flatten the form, they could save it, and then, in the flattened form, hit the SUBMIT FORM button, and submit the flattened form?
Copy link to clipboard
Copied
Yes, that's possible, but it will not work in Reader. There you can only set the fields as read-only, but a better option is to have the user sign the file, and set the signature field to lock all the fields when signed.

