0
Community Beginner
,
/t5/acrobat-sdk-discussions/how-to-lock-every-field-and-save-the-work-using-javascript-button/td-p/8859318
Jan 21, 2017
Jan 21, 2017
Copy link to clipboard
Copied
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
TOPICS
Acrobat SDK and JavaScript
,
Windows
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
Community Expert
,
Jan 21, 2017
Jan 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;
}
Community Expert
,
/t5/acrobat-sdk-discussions/how-to-lock-every-field-and-save-the-work-using-javascript-button/m-p/8859319#M35302
Jan 21, 2017
Jan 21, 2017
Copy link to clipboard
Copied
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
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Chemtoli007
AUTHOR
Community Beginner
,
LATEST
/t5/acrobat-sdk-discussions/how-to-lock-every-field-and-save-the-work-using-javascript-button/m-p/8859320#M35304
Jan 21, 2017
Jan 21, 2017
Copy link to clipboard
Copied
Dear JR_Boulay
Thank you so much, it works perfect.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

