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

Can all the JavaScript in a PDF be triggered by a single button?

STrast
Registered: Jul 9 2010
Posts: 2

We have developed an SBA loan tracking application that populates PDFs with data from the DB. The date formats in the DB are raw for SQL Server and Oracle. When the date fields on the PDF are filled in, they need to be in a "localized" string. I added the following which works great.
console.println(util.printd(2, new Date() ));
But there are dozens of date fields. I need them to format without actually visiting each individual field. Is there a way to automatically format the date fields in the PDF?
Or I can add a button to the form, so the users would only have to click once, but is there a way to activate ALL of the JS cformat script at once?

Scott Tofteman Trast, President
Trast Consulting, Inc.

My Product Information:
Acrobat Pro 8.1.7, Windows
try67
Expert
Registered: Oct 30 2008
Posts: 2398
You can write a loop that sets each field to the new format.

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