Chapter 1. Understanding JavaScript

With JavaScript you can create dynamic documents for not only forms, but also many other uses such as adding interactivity to files, and viewing options, animation, and similar features not available with Acrobat tools. JavaScript helps you add flare and pizzazz to your PDF files. Now in Acrobat Standard 9 (Windows), you have access to all areas where JavaScripts can be written in Standard just like the Acrobat Pro users.

As the disclaimer I added in the introduction of this book and in Chapter 33 as it applies to Adobe LiveCycle Designer, this book is not about JavaScript. It would take another book the size of Acrobat 9 PDF Bible to provide complete coverage for all the JavaScript options you have in Acrobat. All I can hope to do in this chapter is provide a starting point in using JavaScript in Acrobat 9 and point you to sources where you can learn more. You can find much more on JavaScript in my PDF Forms Using Adobe Acrobat and LiveCycle Designer Bible (Wiley Publishing, 2008).

For more sophisticated uses and some sound reasoning for coding forms, look at the Acrobat JavaScript Scripting Reference and the Acrobat JavaScript Scripting Guide. Both documents are available from Adobe Systems by logging on to www.adobe.com/devnet/acrobat/.

Setting Up the Environment

As described in Chapter 34, creating form fields, with the exception of the Button tool, requires you to enter Form Editing Mode. You also use the same tools used in Chapters 34 and

Get Adobe® Acrobat® 9 PDF Bible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.