Skip to main content
Known Participant
September 28, 2021
Question

Flattening and disabling the submit button after sending

  • September 28, 2021
  • 1 reply
  • 1838 views

Hi All,

 

I am trying to find a javacode to flatten a PDF document so the receiver(s) can't alter it once received and another code to make the submit button dissapear after submitting the doc.

Any help? 

 

I'm using acrobat DC Pro

 

THX

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
September 28, 2021

Flattening fields and comments can be achieved using this code:

this.flattenPages();

Note that this doesn't mean the user can't edit it. If they have Acrobat they could still do that. In order to prevent editing you should digitally sign and lock the document.

 

To hide a field using this code (replace the name in quotes with the actual field name):

this.getField("Submit Button").display = display.hidden;

Fab787Author
Known Participant
October 7, 2021

Thx try67 I will try tese codes today and let you know.

 

Rgds