Introduction
You can use the Acrobat DC SDK to create plug-ins for Acrobat Reader and Acrobat as well as stand-alone applications that interact with and manipulate PDF documents. The Acrobat DC SDK contains two libraries: the Acrobat core API and the PDF Library API.
The Acrobat core API contains a set of interfaces that let you develop plug-ins that integrate with Acrobat and Acrobat Reader. The PDF Library API lets you develop applications that interact with and manipulate PDF documents. It overlaps with the Acrobat core API (with the important exception of the AV-layer, which is only part of the Acrobat core API); however, the PDF Library API also extends the Acrobat core API with a small number of interfaces specific to the PDF Library API. This chapter introduces the Acrobat core API and PDF Library API. The API descriptions are contained in the Acrobat and PDF Library API Reference.
About plug-ins
A plug-in is an application that uses the resources of Acrobat or Acrobat Reader as a host environment. This means that a plug-in does not require complex user interface elements. However, it must perform certain basic functions to let Acrobat Reader or Acrobat know of its presence.
Plug-ins are dynamically-linked extensions to Acrobat or Acrobat Reader and are written using the Acrobat core API, which is an ANSI C/C++ library. Plug-ins add custom functionality and are equivalent to DLLs on the Microsoft® Windows® platform; however, the plug-in file name extension is .api, not .dll.
Acrobat and Acrobat Reader plug-ins are grouped in the following categories:
-
Regular plug-ins. Most plug-ins fall under this category.
-
Reader-enabled plug-ins. Reader-enabled plug-ins access the limited set of APIs supported by Acrobat Reader. These plug-ins are developed with permission from Adobe and require special processing to load under Acrobat Reader. (See Creating an Acrobat Reader Plug-In.)
-
Certified plug-ins. Certified plug-ins have undergone extensive testing to ensure that they do not compromise the integrity of the Acrobat security model. There is currently no way for third party plug-ins to be certified by Adobe. Certified plug-ins are reserved for Adobe only.
To ensure that only certified plug-ins are loaded with your installation of Acrobat or Acrobat Reader, select the “Use only certified pug-ins" checkbox in the General panel of the Preferences dialog.
Starting Acrobat X, for secutiry reasons, DLLs can no longer be loaded from subdirectories. Only those DLLs that are located in "plug_ins" folder will be loaded.
About the Acrobat core API
The Acrobat core API consists of methods that operate on objects located within PDF documents. The Acrobat core API is implemented as a standard ANSI C programming library where methods are C functions and objects are opaque data types that encapsulate their data. The Acrobat core API is supported on Windows (32- and 64-bit), Mac OS, Linux®, and some UNIX® platforms like Solaris™, HP-UX, and AIX®.
The following diagram illustrates the hierarchy of the Acrobat core API.
Acrobat core API objects
Most objects accessible through AV and PD layer methods are opaque. That is, they are neither pointers nor pointers to pointers. They provide equivalent functionality in that they reference an object’s data rather than storing it. If you assign one object to another variable, both variables affect the same internal object.
Objects are typically named using the following conventions:
-
The name of the concrete definition for a complex type ends in Rec (for record).
-
A pointer to a simple or complex type ends in P (for pointer).
-
Opaque types do not contain a P suffix. For example, a PDDoc object references a PDF document.
-
Three names identify complex types that provide callback methods:
-
Monitor: A set of callbacks for an enumeration method.
-
Server: An implementation of a service added by a plug-in.
-
Handler: An implementation for a subtype of object handled by a plug-in
-
-
Callback method names typically contain the suffix Proc (for procedure).
About PDF Library and plug-in applications
The Acrobat core API and the PDF Library API let you create plug-ins and PDF Library applications to enhance and manipulate PDF document content and to customize Acrobat and Acrobat Reader to meet your requirements. The PDF Library API is a subset of the Acrobat core API, with some additional functions that are available only in PDF Library.
The following diagram shows the relationship between the PDF Library API and the Acrobat core API.
For information about creating an Acrobat core API or project or PDF Library API, see Creating Plug-in and PDF Library Applications.
Note:The remaining parts of this section describe tasks that you can perform by using either the Acrobat core API or the PDF Library API and refer you to the corresponding sections located in this guide.
Manipulating Acrobat and Acrobat Reader
Plug-ins can control the Acrobat and Acrobat Reader interface. For example, you can create and attach a new button to an existing toolbar. (See Attaching a button to a toolbar.)
Displaying a PDF document in an external window
Plug-ins can have Acrobat draw into an arbitrary window, allowing plug-ins to support PDF file viewing within their own user interface. For example, you can view a PDF document in an external window while Acrobat is displaying another PDF document. That way, you can view two separate PDF documents from within the same instance of Acrobat. (See Opening a PDF document in an external window.)
Indexed searching
Indexed searching enables you to catalog, index, search, and highlight text in PDF files. Simple sequential text searching may be too time consuming for long documents, and completely inadequate for searching a large collection of documents. (See Working with Words.)
Text retrieval systems overcome this problem by building a search index containing information on the location of all words in each document in the collection. A search system uses this index to determine which documents—and word locations within those documents—satisfy a given query. The search system then allows a user to browse the found documents, optionally displaying or highlighting the matching items.
Modifying file access
Plug-ins can provide their own file access procedures that read and write data when requested by the Acrobat core API. Using this capability, a plug-in can enable PDF documents to be read from on-line systems, e–mail, document management, or database programs. (See Accessing non-PDF files.)
Creating new annotation types
Plug-ins can create their own annotation types, including any data they need. A custom annotation type can enable a user to draw (not just type) in an annotation, it can provide support for multiple fonts or text styles, or it can support annotations that can only be viewed by specific users. For example, you can use the Acrobat core API to create 3D annotations. (See Creating 3D Annotations.)
Dynamically adding text to PDF documents
You can use the Acrobat core API or the PDF Library API to dynamically modify a PDF document. For example, a plug-in or PDF Library application can retrieve data from an enterprise database and insert the data into a PDF document. (See Inserting Text into PDF Documents.)
Understanding your target application
Both Acrobat and Acrobat Reader accept plug-ins. Acrobat Reader is designed predominantly for viewing and printing PDF documents. Acrobat Professional DC and Acrobat Pro Extended let you create PDF files, and offer advanced control over document exchange, review, and output. Acrobat Standard DC also lets you create PDF files and exchange and review comments.
Registering plug-ins for use by the plug-in finder
You can register your plug-in with Adobe to ensure that users are prompted to download and install it when they open PDF documents that require it.
Registering your plug-in means that Adobe adds information about your plug-in to a list of registered plug-ins. Each entry in this list associates a PDF dictionary extension and other characteristics with a URL from which users can download and install the plug-in that processes that extension. Acrobat and Acrobat Reader access the list over the web. The list is not publically displayed on adobe.com. That is, it cannot be used to advertise the availability of your plug-ins. If you wish to post on adobe.com information about your plug-in , see your Adobe reprsentative.