tabStops in Acrobat XI Pro to generate a Table of Contents, text not filling
Hi all,
I searched the forums for an answer, but couldn't find any. I'm setting the para.tabStops property via JavaScript (or attempting to) but don't see the fruits of my labor. The form field, after executing the script:
- isn't populating with any text
doesn't have tab stops inside the field (verified with the Form Field Text Properties box)
Here's my code snippet:
//http://blogs.adobe.com/formfeed/2009/06/managing_tab_stops_in_fields.html
//section, subsection, pages, date, revision
//defines tab stops for text box, use "\t" to insert a tab
this.getField("1-1ListOfEffectivePages_M").para.tabStops = "left 0in left 0.25in left 3in left 4.5in left 6in";
var TOCLines = new Array();
TOCLines[0] = new Object();
TOCLines[0].text = "Table of Contents" + "\t\t" + "I" + "\n";
TOCLines[0].weight = 900; //bold
TOCLines[0].textSize = 12;
TOCLines[0].textColor = color.black;
TOCLines[1] = new Object();
TOCLines[1].text = "\t" + "List of Effective Pages" + "\t" + "1-1" + "\t" + Date + "\t" + "N/A" + "\n";
TOCLines[1].textSize = 11;
TOCLines[1].textColor = color.black;
//...
TOCLines[23] = new Object();
TOCLines[23].text = "Miscellaneous Information" + "\t\t" + "XI" + "\n";
TOCLines[23].textSize = 12;
TOCLines[23].weight= 900;
TOCLines[23].textColor = color.black
//commit to TOCBox
this.getField("1-1ListOfEffectivePages_M").richValue = TOCLines;
Obviously, the field I want filled is "1-1ListOfEffectivePages_M" and that's in the PDF.
From what I can tell, there isn't an issue with the code (that's what they all say, right?). Online documentation seems lacking though.
I suspect it may be because my PDF form is not dynamic, but I don't know how to verify that.
