Script that list form feilds
Hello all, I would like to list all the fillable fields in a PDF in an array for each page. I found a page that seems to say its script will do just that. I cannot get it to work. Could someone take a look and tell me what is wrong. In the function that is created should I be inserting my document name? If anyone has a better way to do this I will appreciate that as well.
The page that offers a script: Page at Acrobat Library
function getPageFields(doc, p) {
var fields = [];
for (var i=0; i<doc.numFields; i++) {
var f = doc.getField(doc.getNthFieldName(i));
if ((typeof f.page=="number" && f.page==p) || (typeof f.page!="number" && f.page.indexOf(p)>-1)) fields.push(f.name);
}
return fields;
}If my results are listed in the console it is fine. I want the listing to refer to them elsewhere. Thanks for any help.
