Posted By

alexosm on 09/19/17


Tagged

get javascript pdf fields read only all Acrobat


Versions (?)

pdf: get all fields and set to read only


 / Published in: JavaScript
 

set all fields to read only in a for-loop,

  1. // for PDF: array from all fields and set to read only
  2. for (var i=0; i<this.numFields; i++) {
  3. var f = this.getField(this.getNthFieldName(i));
  4. if (f.type != "button") {
  5. f.readonly = true;
  6. // console.println("i");
  7. }
  8. }

Report this snippet  

You need to login to post a comment.