Acrobat SDK Overview
 
The Acrobat SDK is a set of tools that help you develop software that interacts with Acrobat technology. The SDK contains header files, type libraries, simple utilities, sample code, and documentation.
 
 
Using the Acrobat SDK, you can develop software that integrates with Acrobat and Adobe Reader in several ways:
 
JavaScript — Write scripts, either in an individual PDF document or externally, to extend the functionality of Acrobat or Adobe Reader.
Plug-ins — Create plug-ins that are dynamically linked to and extend the functionality of Acrobat or Adobe Reader.
Interapplication Communication — Write a separate application process that uses interapplication communication (IAC) to control Acrobat functionality. DDE and OLE are supported on Microsoft® Windows®, and Apple events/AppleScript on Mac OS®. IAC is not available on UNIX®.
 
The Acrobat SDK provides support for development on both Windows and Apple Mac OS environments.
 
Besides the technologies provided by the Acrobat SDK, you can also use the PDF Library (PDFL) to develop applications that create and manipulate PDF documents but do not interact with Acrobat. For more information, see Adobe PDF Library.
 
JavaScript
JavaScript is a cross-platform scripting language. Through its JavaScript extensions, Acrobat exposes much of the functionality of Acrobat and its plug-ins to the document author. The JavaScript objects, properties and methods can also be accessed through Visual Basic or C# to automate the processing of PDF documents.
 
Acrobat defines several objects that allow your code to interact with the Acrobat application, a PDF document, or fields within a PDF document. The most commonly used objects control the Acrobat or Adobe Reader application, the JavaScript console, the PDF document, SOAP web services, databases, security, searches, and JavaScript events.
 
JavaScript can be applied at a variety of levels. Each of the levels represents a context in which processing occurs, which affects when the scripts are loaded and how they are accessed inside and outside documents.
 
The placement of a script at a given level also determines its reusability. For example, folder level scripts are available within all documents, document level scripts are available to all fields within a given document, and field level scripts are visible only to the fields with which they are associated.
 
Plug-ins
Plug-ins are dynamically-linked extensions to Acrobat or Adobe Reader. They can hook in to the user interface in a number of ways and can register to be called when a variety of events occur in the application.
 
A plug-in is written in ANSI C/C++ and uses the Acrobat public APIs. It can add functionality to Acrobat Pro Extended, Acrobat Professional, Acrobat Standard, or Adobe Reader. A plug-in program file goes into a Plug_ins folder or directory and is initialized during Acrobat or Adobe Reader startup.
 
There are three types of plug-ins:
 
Regular Acrobat plug-ins—These plug-ins run on Acrobat Professional and Acrobat Standard. Plug-ins for Acrobat Professional can use any of the Acrobat SDK APIs. Plug-ins for Acrobat Standard do not have access to some APIs.
Adobe Reader-enabled plug-ins—These plug-ins use a restricted set of APIs. Adobe Reader-enabled plug-ins are developed with permission from Adobe and require special processing to load under Adobe Reader. Plug-ins for Adobe Reader can use additional APIs if the PDF document has additional usage rights.
Certified plug-ins—These plug-ins have undergone extensive testing to ensure that they do not compromise the integrity of Acrobat's security model. A checkbox in the Acrobat and Adobe Reader user interface can be used to ensure that only certified plug-ins are loaded. Certified plug-ins can be provided only by Adobe.
 
On Windows, plug-ins are DLLs. However, plug-in names must end in .API, not .DLL. On Mac OS, plug-ins are code fragments, whereas on UNIX, plug-ins are shared libraries.
 
Interapplication Communication
Acrobat provides support for interapplication communication (IAC) through OLE automation and DDE on Windows, and through Apple events and AppleScript on Mac OS. Adobe Reader also supports IAC, but does not support OLE on Windows.
 
IAC support allows programs to control Acrobat or Adobe Reader in much the same way a user would. You can also use IAC support to render a PDF file into an external application window instead of the Acrobat window. The IAC methods and events serve as wrappers for some of the core API calls in the SDK.
 
On Windows, you can develop IAC applications using Visual Basic .NET, Visual C++ .NET, or Visual C# .NET. On Mac OS, you develop IAC applications using Xcode. CodeWarrior is not supported.
 
Choosing the correct Acrobat SDK Technology
 
As you already know, you can develop software that integrates with Acrobat and Adobe Reader in three ways: JavaScript, Plug-ins, and IAC.
 
Based on your application's requirements, choose the appropriate technologies for development. In some situations, the desired functionality is only available using one technology. In other situations, you can choose between two or more technologies. For example, you can add menu items to Acrobat using either JavaScript or a plug-in.
 
You can also use more than one technology in a single application or single document. For example, you can use both plug-ins and JavaScript to implement a particular feature.
 
Situations where Plug-ins are Better than JavaScript
In general, plug-ins allow for more direct control over Acrobat than JavaScript. There is a richer set of APIs that you can use from a plug-in. For example, the following tasks can only be done using a plug-in; there is no equivalent JavaScript functionality:
 
● Accessing Cos and other low-layer objects
● Manipulating PDF content streams
● Creating new annotation or action types
● Modifying the ASFixed scale factor for large PDF file sizes
● Accessing platform-specific services or events
● Getting and setting wireframe drawing mode
 
Situations where JavaScript is Better than Plug-ins
The following example tasks can be done easily using JavaScript, but have no equivalent plug-in API:
 
● Using SOAP and other Web services
● Manipulating multimedia in PDF documents
● Setting up an automated email review workflow
● Describing the state model for the review
● Searching Acrobat Help
● Using Acrobat security policies
 
Some of these example tasks, such as SOAP and Web services, can in fact be done with a plug-in by using low-level APIs. However, this is a time-consuming approach and requires an in-depth knowledge of the low-level APIs.
 
Situations where to Use IAC
To take advantage of Acrobat functionality from within an external application, use IAC.
 
So, you can use the IAC API to open and view a PDF document. You can also use the IAC API to perform these tasks:
 
● Get annotations, text and form data from a PDF document
● Search a PDF document
● Manipulate a PDF document, editing and adding content
● Control Acrobat (but not Adobe Reader) remotely
 
You can also extend the functionality of the IAC interfaces by writing plug-ins that use core API objects not already part of the IAC support system.