Copy link to clipboard
Copied
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:
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.
There are dynamic XFA forms and static XFA forms, and there are AcroForms... If you have an XFA form then you will only be able to edit it using LCD. AcroForms can only be edited in Acrobat.
If you converted your entire form to XFA then your code should work in Acrobat/Reader, yes, but this is not a trivial task, and you'll need to purchase LCD as it's no longer bundled with Acrobat, like it used to be.
Copy link to clipboard
Copied
There's no such thing as "tab stops" in an Acrobat form. The article you found refers to PDF files created using LiveCycle Designer, which is a completely different thing.
Copy link to clipboard
Copied
Acrobat XI: new tab-stop feature available for rich-text fields explicitly states Acrobat XI in the title. From other resources I guessed I could specify these tab stops with JavaScript.
Copy link to clipboard
Copied
The first sentence of this article states:
With the latest release of Adobe Acrobat/Reader XI there is a new feature available for structuring text in rich-text fields in XFA-based forms.
XFA forms are forms created using LCD.
Copy link to clipboard
Copied
Right, so I asked
I suspect it may be because my PDF form is not dynamic [i.e. XFA], but I don't know how to verify that.
This is an inherited project, so I wasn't sure. I'll see about acquiring LiveCycle.
If the form was re-made with LCD, would the code work as executed from Acrobat or Reader?
Copy link to clipboard
Copied
There are dynamic XFA forms and static XFA forms, and there are AcroForms... If you have an XFA form then you will only be able to edit it using LCD. AcroForms can only be edited in Acrobat.
If you converted your entire form to XFA then your code should work in Acrobat/Reader, yes, but this is not a trivial task, and you'll need to purchase LCD as it's no longer bundled with Acrobat, like it used to be.
Copy link to clipboard
Copied
Alright, thank you.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now