Skip to main content
Chemtoli007
Known Participant
January 21, 2017
Answered

How to lock every field and save the work using JavaScript button?

  • January 21, 2017
  • 1 reply
  • 894 views

Hello guys,

How can I create a JavaScript button in Acrobat DC Pro which will lock all fields and save my work on (ex: Desktop) so when I e-mail to anyone it cannot be modified.

Hope i was clear enough.

Kind regards

This topic has been closed for replies.
Correct answer JR Boulay

Hi.

You can place this JavaScript in a button on mouse up:

// all fields to readonly

for(var i=0;i<this.numFields;i++) {

var oFld = this.getField(this.getNthFieldName(i));

oFld.readonly = true;

}

1 reply

JR Boulay
Community Expert
JR BoulayCommunity ExpertCorrect answer
Community Expert
January 21, 2017

Hi.

You can place this JavaScript in a button on mouse up:

// all fields to readonly

for(var i=0;i<this.numFields;i++) {

var oFld = this.getField(this.getNthFieldName(i));

oFld.readonly = true;

}

Acrobate du PDF, InDesigner et Photoshopographe
Chemtoli007
Known Participant
January 21, 2017

Dear

Thank you so much, it works  perfect.