Acrobat Pro Bundle Technical Documentation

Developing Software for Acrobat Pro

Developing Software for Acrobat Pro

Using the Acrobat Pro Bundle, you can develop software for Acrobat using different approaches:

1.  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.

2. 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 Pro Bundle 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.

3.  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.

Which approach to development is best for you?

Which approach to development is best for you?

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.

Comparison between Adobe PDF Library and Acrobat Pro Bundle

Adobe PDF Library v Acrobat Pro Bundle

You can use the following feature comparison table as a guide to determining whether you require Adobe PDF Library or the Acrobat Pro Bundle for your development project. The Acrobat Pro Bundle requires that Adobe Acrobat Pro be installed on the client machine for the plug-ins to access PDF functionality.

  Adobe PDF Library Acrobat Pro Bundle
Embed PDF manipulation within your application without the presence of Acrobat Yes  
Create applications that can run on Servers Yes  
Create, edit, and assemble documents Yes Yes
High volume and variable data printing Yes Yes
Embed and subset fonts Yes Yes
View and render PDF Yes Yes
Linearize and optimize PDF for the Web Yes Yes
Compress documents Yes Yes
Provide password security Yes Yes
Extract content Yes Yes
Create and manipulate forms Yes Yes
Use layers and grouping to provide selective viewing of content Yes Yes
Provide searching and indexing Yes Yes
Encrypt documents Yes Yes
Add comments to documents Yes Yes
Access Acrobat plug-ins   Yes
Create and manipulate forms   Yes
Apply digital signatures   Yes
Make documents accessible to screen readers and other accessibility technologies   Yes
Access third party plug-ins   Yes

Loading posts...