Contents
List of Examples
Preface
What’s in this guide
Who should read this guide?
Related documentation
Introduction
About plug-ins
About the Acrobat core API
Acrobat core API objects
Acrobat core API methods
Data types
About PDF Library and plug-in applications
Manipulating Acrobat Professional, Acrobat Standard, and Adobe Reader
Displaying a PDF document in an external window
Indexed searching
Modifying file access
Creating new annotation types
Dynamically adding text to PDF documents
Understanding your target application
New Acrobat core APIs
Understanding Plug-ins
About plug-in initialization
Plug-in loading and initialization
Handshaking and Initialization
Exporting HFTs
Importing HFTs and registering for notifications
Initialization
Unloading
Summarizing a plug-in’s life cycle
Using callback functions
Notifications
Handling events
Mouse clicks
Adjust cursor
Key presses
Using plug-in prefixes
Obtaining a developer prefix
Using a developer prefix
Plug-in name
Menu prefixes
Menu items prefixes
Tool prefixes
Toolbar button prefixes
Private data prefixes
Action prefixes
Annotation prefixes
HFT prefixes
Modifying the Acrobat or Adobe Reader user interface
Adding or removing menus and menu items
Modifying toolbars
Controlling the About box and splash screen
Creating help files
User interface guidelines
Acquiring and releasing objects
Debugging plug-ins
Page view layers
Minimizing screen redrawing
Storing private data in PDF files
Exporting data from PDF document objects
Creating Plug-in and PDF Library Applications
Supported environments
Working with platform-specific techniques
About platform-dependent data
Portability techniques
Windows techniques
Developing a Windows plug-in
Locating and loading plug-ins
Why a plug-in might not load
Macros and project settings
Interapplication communication
Debugging
Handling the thread local storage (TLS) limit
Using modal dialog boxes
Mac OS techniques
Developing a Mac OS plug-in
Locating and loading plug-ins\
Using memory
Resource file considerations
Mac OS-only methods
Interapplication communication
Creating a sample plug-in
Including Acrobat SDK library files
Adding the PIMain source file
Adding application logic
Compiling and building your plug-in
Creating a sample PDF Library application
Contents of the PDF Library SDK
Including library files
Sample code
Developing applications with the Adobe PDF Library
Windows
Mac OS
UNIX
Initialization and termination
Multithreading
Upgrading existing plug-ins
Detecting supported APIs
Updates to ASCoord and AVRect
Upgrading plug-ins in Windows
Upgrading plug-ins on Mac OS
Migrating a PDF Library application from CodeWarrior to Xcode
Inserting Text into PDF Documents
About inserting text into a PDF document
Creating a new PDF document
Creating a new page
Creating a container
Acquiring fonts
Creating a PDEGraphicState object
Creating an ASFixedMatrix object
Inserting text
Saving the PDF document
Examining a PDF Library application source file
Working with Documents and Files
Opening PDF documents
Opening a PDF document in an external window
Creating a Window
Defining the parameters for an external window
Creating a handler for an external window
Displaying an open dialog box
Displaying a PDF document within a window
Bridging core API layers
Creating a PDDoc object
Creating a PDDoc object based on an open PDF document
Accessing non-PDF files
Printing documents
Creating Menus and Menu Commands
About menus
About AVmenubar typedefs
About AVMenu typedefs
About AVMenuItem typedefs
Adding menu commands to menus
Adding a menu command to an existing menu
Adding a menu command to a new menu
Creating menu callback functions
Determining if a menu item can be executed
Creating Toolbars and Buttons
About toolbars
About AVToolBar typedefs
About AVToolButton typedefs
Retrieving toolbars
Creating toolbar buttons
Setting help text for a button
Setting label text
Creating a sub-menu for a button
Retrieving existing toolbar buttons
Attaching a button to a toolbar
Exposing a button in a web browser
Removing a button from a toolbar
Creating toolbar button callback functions
Creating Annotations
About annotations
Creating text annotations
Retrieving existing annotations
Modifying text annotations
Working with Bookmarks
About bookmarks
Creating bookmarks
Defining bookmark actions
Creating a PDViewDestination object
Creating a AVPageView object
Assigning an action to a bookmark
Removing bookmark actions
Opening and closing bookmarks
Retrieving bookmarks
Retrieving the root bookmark
Retrieving a specific bookmark
Retrieving all bookmarks
Deleting bookmarks
Working with Page Views and Contents
About page coordinates
About page views
Displaying page views
Modifying page contents
Creating a PDEContent object
Accessing page contents
Determining page element types
Modifying text elements
Working with Words
About searching for words
About PDWord typedefs
About PDWordFinder typedefs
Creating a PDWordFinder object
Extracting and displaying words
Highlighting words
Creating Handlers
About handlers
Action handlers
Annotation handlers
AVCommand handlers
Creating an AVCommand handler
Invoking AVCommands
Configuring AVCommands
Setting input parameters
Setting configuration parameters
Setting AVCommand parameters
Running commands
Exposing AVCommands to the batch framework
Adding a handler to the global command list
Supporting properties
File format conversion handlers
File specification handlers
Selection servers
Tool callbacks
Window handlers
File systems
Progress monitors
Transition handlers
Adding message handling
Registering for Event Notifications
Registering event notifications
Unregistering event notifications
Working with Document Security
About document security
About security handlers
Adding a security handler
Opening a secured file
Saving a secured file
Setting security for a document
Saving a file with an encryption dictionary
Opening an encrypted file
Working with Unicode Paths
About Unicode paths
Creating Unicode file path application logic
Retrieving Unicode path values
Creating an ASFileSys object
Creating an ASFileSys object that supports Unicode paths
Working with Host Function Tables
About host function tables
Exporting host function tables
Creating HFT methods
Creating HFT method definitions
Creating HFT callback functions
Creating new Host Function Tables
Examining HFT header and source files
Examining an HFT header file
Examining an HFT source file
Importing an existing HFT
Invoking HFT methods
Replacing HFT methods
Migrating non-HFT PDF Library applications to HFT applications
Working with Cos Objects
About Cos objects
About direct and indirect objects
About Cos object types
Cos strings
Cos arrays
Cos names
Cos dictionaries
Cos streams
Working with Cos strings
Creating Cos strings
Retrieving the string value
Working with Cos arrays
Creating Cos arrays
Retrieving Cos array values
Working with Cos dictionaries
Creating Cos dictionaries
Retrieving values from a Cos dictionary
Querying a Cos dictionary for a key
Working with Cos names
Creating Cos names
Retrieving the value of a name object
Working with Cos streams
Creating Cos streams
Creating a stream dictionary
Inserting a Cos stream into a PDF document
Populating a PDF document with a content stream
Creating 3D Annotations
Creating annotations
Adding 3D data to an annotation
Creating the 3D annotation dictionary entries
Specifying the 3D stream
Creating the stream object
Adding the Cos stream to the annotation dictionary
Creating the attributes dictionary
Specifying JavaScript code
Setting the default view
Setting the annotation appearance
Setting the activation dictionary
Handling Exceptions
Creating exception handlers
Returning a value from an exception handler
Raising exceptions
Exception handling scenarios
Using goto statements
Using nested exception handlers
Using register variables
Working with Acrobat Extended APIs
About Acrobat extended APIs
Search extended API
Catalog extended API
PDF Consultant and Accessibility Checker extended API
How the consultant works
Important issues for consultant development
Importing the consultant HFTs into a plug-in
Creating and destroying consultants
Registering agents with consultants
Starting the consultant
Consultant object type identification
Creating an agent class
Creating agent constructors
Recognizing objects of interest
Post processing stage
Digital signature extended API
The PubSec layer
Digital signature components
Digital signature scenarios
Initializing the digital signature plug-in
Understanding the process
Forms extended API
Weblink extended API
Weblink services
Writing a custom driver
Spelling extended API
AcroColor extended API
PDF Optimizer API
Creating an Adobe Reader Plug-In
Enabling an Adobe Reader plug-in
Creating resource files on the Mac OS platform
Creating the public and private key pairs
Enabling the plug-in for Adobe Reader
Creating resource files on the Windows platform
Creating the public and private key pairs
Enabling the plug-in for Adobe Reader
Creating resource files on the UNIX platform
Creating the public and private keys
Enabling the plug-in for Adobe Reader
Troubleshooting
The plug-in appears to be ignored by Adobe Reader
Adobe Reader error messages
Index