This document is the Acrobat JavaScript Object Specification Version 5.0. It introduces Acrobat JavaScript, describes where JavaScript can be used in Acrobat, provides examples of core JavaScript features, and specifies the properties and methods for core Acrobat JavaScript objects like ADBC, Annot, and more. The document aims to help developers understand and effectively use Acrobat JavaScript.
17. Acrobat JavaScript Object
Specification
Introduction
Welcome to Acrobat™ JavaScript
Welcome to the Acrobat 5.0 JavaScript Reference Manual. In the pages to follow, you'll find
all the information you need to get started using JavaScript in your PDF documents. With the
aid of Acrobat's powerful JavaScript binding, you'll be able to customize forms and other
documents in ways that greatly enhance their appearance, utility, and interactivity.
This manual is not only a reference for Acrobat’s JavaScript objects, properties and methods, it
also includes some instruction on the basics of JavaScript programming and numerous useful
examples that illustrate the properties and methods of Acrobat JavaScript as well as relevant
programming techniques.
What Is JavaScript?
JavaScript is the powerful, object-oriented scripting language developed by Netscape
Communications to enhance web-page interactivity. Originally designed for Netscape's
browser software, JavaScript has rapidly evolved to become a widely used, general-purpose
programming language. It is now accepted as a standard under ISO-16262 of the International
Standards Organization. (The first industry-standard version of the language, endorsed by the
European Computer Manufacturers Association, was known as ECMAScript.) The core
language has undergone several revisions, the most current being version 1.5, the one used by
Acrobat 5.0.
What Is Acrobat™ JavaScript?
Core JavaScript has been extended in various implementations to meet various needs. Client-
side (browser based) JavaScript adds objects and methods to manipulate browser windows and
their contents. Server-side JavaScript adds File and Database objects to deal with database
queries and other typical server-side actions. Acrobat™ JavaScript extends the language by
adding objects and methods designed to allow easy access to (and manipulation of) PDF
document contents. The various extensions to the language that make this possible are
described in detail in this manual.
The same characteristics that make browser-based JavaScript easy to work with—relaxed data
typing, C-like syntax, built-in Math and String classes—are applicable to Acrobat™
Acrobat JavaScript Object Specification 15