These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Javascript action to add an editable text field

Justine
Registered: Apr 5 2011
Posts: 1

I am working with Adobe Acrobat X Pro and want to write a Javascript action that modifies the opened .PDF and then saves it again.
 
The modification is as follows:
-Add a text box to a certain coordinate/position in the document that will remain editable after the PDF is saved so that I can E-mail this modified PDF to another person who can add his text into this box. Note that I will not be adding any text to this PDF.
 
This text box can be added manually so there is support for it in Acrobat X Pro, but I would need this to be done automatically.

My Product Information:
Acrobat Pro 10.0, Windows
try67
Expert
Registered: Oct 30 2008
Posts: 2398
You need to use the addField method of the Document object.
In order to get the correct coordinates I recommend manually drawing the field and then using its rect in your method.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com