Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Resources and Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
How This Document Is Organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Conventions Used in This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
ASText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .248
ASTimeSpan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .252
Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .253
Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .253
Fixed-point Math . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .254
Fixed-point Utility Macros. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .254
Fixed-point Mathematics Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .254
Fixed-point Matrix Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .254
HFT Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .255
Memory Allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .255
Thread-safe Multithreading APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .256
Using Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .257
Platform-Specific Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .257
Macintosh. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .257
UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .257
Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .259
AVTool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .295
AVToolBar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .295
AVToolButton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .296
AVUndo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298
AVWindow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .299
PDStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .347
PDText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .347
PDTextAnnot. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .348
PDTextSelect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .348
PDThread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .350
PDThumb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .351
PDTrans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .351
PDViewDestination. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .352
PDWord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .352
PDWordFinder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .355
PDXObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .356
Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .368
Client Identifiers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .369
Guide to Page Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .369
Common Code Sequence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .369
Ways To Modify a Pages Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .370
Debugging Tools and Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .374
Object Dump. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .375
PDFEdit Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .377
Dump Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .377
General Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .377
PDEClip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .377
PDEColorSpace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .378
PDEContainer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .378
PDEContent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .380
PDEDeviceNColors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .381
PDEElement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .381
PDEExtGState . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .383
Setting the Opacity of an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .383
PDEExtGState Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .384
PDEFont. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .385
PDEForm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .388
PDEGroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .388
PDEImage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .388
PDEObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .391
PDEPath. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .391
PDEPattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .392
PDEPlace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .392
PDEPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .392
PDEShading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .393
PDESoftMask. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .393
PDEText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .394
PDETextItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .396
PDEUnknown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .397
PDEXGroup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .397
PDEXObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .398
PDSysEncoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .398
PDSysFont . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .398
CosDoc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .421
CosObj. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .422
CosObjCollection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .423
CosArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .424
CosBoolean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .424
CosDict . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .425
CosFixed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .426
CosInteger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .426
CosName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .426
CosNull . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .427
CosStream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .427
CosString . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .427
Encryption/Decryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .428
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759
Description
This document provides a conceptual overview of the PDF Library and Acrobat core and
extended application programming interfaces (APIs). It is intended to familiarize you with
these APIs, as documented in detail in the Acrobat and PDF Library API Reference. The APIs
are accessed using the Acrobat and PDF Library SDKs.
The Acrobat core and extended APIs are used primarily by Acrobat plug-ins. Plug-ins can be
created for Acrobat Professional, Acrobat Standard, and Adobe Reader. The PDF Library
SDK is used to create individual executable programs and has access to most of the same
APIs as the Acrobat SDK, plus some APIs specific to the PDF Library.
NOTE: Many of the APIs specific to plug-in development, such as those dealing with HFTs,
callbacks, and event handlers, are described in detail in the Acrobat SDK Plug-in
Guide, so are not treated in any great detail in this overview. Similarly, plug-in
applications and how they differ from other SDK applications are described in the
Acrobat SDK Users Guide.
NOTE: The information in this document that does not apply to the PDF library SDK are
primarily the sections on the AcroView (AV) layer of the APIs and the extended APIs
(with the exception of the AcroColor APIs, which can be used by PDF Library
applications). Most of the information in Chapter 11, Handlers, also does not apply
to the PDF Library, with the notable exception of the information on handling file
systems.
Using the Acrobat APIs, a plug-in can perform functions such as:
Controlling an Acrobat session
Customizing the Acrobat user interface
Augmenting existing Acrobat functions
Displaying Portable Document Format (PDF) documents in an application-supplied
window, without using the Acrobat user interface
Manipulating the contents of a PDF file
Adding private data to PDF files
Using the PDF Library APIs, a compiled application can perform functions such as:
Develop a custom PDF creation application
Develop a custom PDF display application
Manipulate and edit existing PDF files
Develop a highly customized printing application
Audience
This document is included with both the Adobe Acrobat SDK and the PDF Library SDK.
While the PDF Library SDK is of limited utility to Acrobat SDK developers, the reverse is not
true: many of the samples and much of the documentation that ships with the Acrobat SDK
can also be of great value to PDF Library application developers.
The audience of this document is Acrobat and Adobe Reader plug-in developers, and PDF
Library application developers. Interapplication communication (IAC) application
developers will also find much of the information helpful.
This document assumes that you are familiar with the Acrobat product family and that you
are an experienced user of Acrobat products. You should understand ANSI-C or C++ and be
familiar with programming on your development platform. If you plan to manipulate data
in PDF files, you should be familiar with the contents and structure of PDF files, as described
in the PDF Reference. For an overview of PDF structures, see Appendix B in this document.
If you are new to writing plug-ins, work through some sample plug-ins in the Acrobat SDK
Plug-In Guide. Then you can explore other sample plug-ins provided with the SDK.
If you are writing an application using the PDF Library, see the PDF Library Overview for a
general description of the library and how to use it.
document also provides guidelines for developing plug-ins, including registering plug-
in names and development environment requirements.
PDF Library Overview presents a description of the components of the PDF Library and
PDF Library SDK. It includes detailed instructions on how developers use the PDF Library
on the platform of their choice.
PDF Reference, fifth edition, version 1.6 describes PDF version 1.6 in detail, including PDF
object types, file format, and document structure.
ADM Programmers Guide and Reference describes how to create platform-independent
dialogs for your plug-in.
Additional documents that you should have available for reference are listed below.
Adobe Reader-enabled Plug-ins describes the steps required to enable a plug-in to be
loaded by Adobe Reader.
PostScript Language Reference, third edition describes the syntax and semantics of the
PostScript language and the Adobe imaging model.
monospaced bold Code items within plain The GetExtensionID method ...
text
Parameter names and The enumeration terminates if proc
literal values in returns false.
reference documents
monospaced italic Pseudocode ACCB1 void ACCB2 ExeProc(void)
{ do something }
Placeholders in code AFSimple_Calculate(cFunction,
examples cFields)
blue Live links to Web pages The Adobe Solutions Network URL is:
http://partners.adobe.com/asn/
Live links to sections See Using the SDK.
within this document
Live links to code items Test whether an ASAtom exists.
within this document
bold PostScript language and The setpagedevice operator
PDF operators,
keywords, dictionary
key names
User interface names The File menu
italic Document titles that are Acrobat Core API Overview
not live links
New terms User space specifies coordinates for...
PostScript variables filename deletefile
The Acrobat core API is a set of interfaces you can use to write PDF Library applications and
plug-ins that integrate with Acrobat and Adobe Reader. The Acrobat extended APIs are
interfaces that you can also use to write plug-ins that integrate with Acrobat and Adobe
Reader, but that are exposed from plug-ins rather than from within the core of Acrobat
and Adobe Reader themselves. The PDF Library APIs mostly overlap with the Acrobat core
API (with the important exception of the AV-layer APIs, which are used only by plug-ins),
but extend it as well with a small number of interfaces specific to the PDF Library. This
chapter introduces the core API, extended APIs, and PDF Library API.
This chapter deals primarily with the Acrobat core APIs, most of which are shared with the
PDF Library and all of which are shared with plug-ins along with the extended APIs. For a
detailed overview of the extended APIs, see Chapter 4, Overview of the Acrobat Extended
APIs. For more information about the PDF Library, see the PDF Library Overview, which is
included as part of the PDF Library SDK.
External
Application ... External
Application
Through IAC interfaces, an application can control Acrobat or Adobe Reader in the same
ways the interactive user can. JavaScript and plug-ins can control Acrobat and Adobe
Reader in the same way, but, in addition, they can extend them using the much broader
range of API methods.
Your projects scope determines which of these methods better meets your needs. You can
also use a combination approach, by creating a plug-in and a separate application, where
the application sends messages to the plug-in, and the plug-in manipulates Acrobat or
Adobe Reader. JavaScript can also be added to the mix.
Acrobat Support
Portable Document (PD) Layer (AS)
(bookmarks, pages, thumbnails, annotations, ...)
(file access,
platform-
independent
PDFEdit PDSEdit utilities, callbacks,
(page content) (structure info) exceptions, ...)
Cos Layer
(strings, numbers, dictionaries, ...)
Remove Removes the second object from the current object but does not destroy it.
Example: AVMenuRemove.
Get Retrieves an attribute of the object. Example: AVWindowGetTitle
Set Sets an attribute of the object. Example: PDAnnotSetFlags. (Note: Cos
uses the verb Put).
Is Retrieves a boolean attribute of the object. Example:
PDBookmarkIsOpen.
Enum Enumerates the specified descendant objects of the current object.
Example: PDDocEnumFonts.
While many of the API method names follow this form, there are exceptions. Conversion
methods, for example, are of the form: <layer><object><source_object>to<dest_object>
An example is AVPageViewPointToDevice.
Get and Set methods are used for getting and setting object attributes. Each object type
has zero or more attributes. For example, an annotation object (PDAnnot) contains
attributes such as color and date. You can obtain and modify the value of an objects
attributes using methods such as PDAnnotGetColor and PDAnnotSetDate.
In some cases, the return value of a Get method is another object. For example,
AVDocGetAVWindow returns an AVWindow object corresponding to a specified AVDoc.
Other methods that return objects have the word Acquire in their name. These methods
are always paired with a corresponding Release method, and have the additional side
effect of incrementing or decrementing a reference count. The core API uses
Acquire/Release methods, for example, to determine whether or not it is safe to free a
memory structure representing an object.
If you use an Acquire method to obtain an object, you must subsequently use the
Release method to correctly update the reference counter, as shown here:
PDDoc doc;
PDPage page;
and when they can be deleted safely. For this reason, the API provides validity testing
methods your plug-in can use to determine whether or not an object previously obtained
using a Get method is still usable. IsValid typically is included in the name of a validity
testing method, for example PDAnnotIsValid. You can check if an object has an
associated validity testing method by looking up the object in the Objects section in the
Acrobat and PDF Library API Reference.
Data Types
The core API uses five types:
Scalar Types
Simple Types
Complex Types
Opaque Types
Cos Objects
Scalar Types
Scalar (non-pointer) types are based on underlying C language types, but have
platform-independent bit sizes. They are defined in the header file CoreExpT.h. All scalar
types are AS layer types.
For portability, enumerated types are defined using a type of known size such as
ASEnum16.
Table 1.2 lists and describes the scalar types.
Size
Type (in bytes) Description
ASBool 2 boolean
ASInt8 1 char
Simple Types
Simple types represent abstractions such as a rectangle or matrix. These objects have well-
known fields that are not expected to change.
Examples of simple types are:
ASFixedRect
ASFixedMatrix
AVRect32
NOTE: Two different coordinate systems are used for rectangles. See Understanding
Coordinate Systems on page 30 for details.
Complex Types
Complex types are structures that contain one or more fields. They are used in situations
such as the following:
To transfer a large number of parameters to or from a method. For example, the API
method PDFontGetMetrics returns font metrics by filling out a complex structure
(PDFontMetrics).
To define a data handler or server. For example, your plug-in must provide a complex
structure filled out with callback methods (AVAnnotHandlerRec)when it intends to
register an annotation handler.
Because a complex type may change over time (by adding new fields or obsoleting old
ones), the size of the type is specified either as the first field of the type or as a separate
parameter to a method. A core API method can examine this field to determine whether a
new callback method is available, or whether a new data field should be filled out.
Opaque Types
Many methods in the core API hide the concrete C-language representation of data
structures from plug-ins. Most of these methods take an object and perform an action on
that object. The objects are represented as opaque types.
Examples of opaque objects are PDDoc and AVPageView.
Cos Objects
A Cos object in the core API (type CosObj) refers to its corresponding Cos object in the
PDF document. Cos objects are represented as opaque 8-byte structures. They have
subtypes of boolean, integer, real, name, string, array, dict, and stream.
old APIs. These APIs, along with the methods they replace, are listed in the following table
and are described in detail in the Acrobat and PDF Library API Reference.
User Space
User space specifies coordinates for most objects accessed using PD layer methods. It is the
coordinate system used within PDF files. Figure 1.3 shows the user space coordinate
system. In the figure, as in PDF, the media box is the rectangle that represents that pages
size (for example, US letter, A4). The crop box is an optional rectangle that is present if the
page has been cropped (for example, using the Document -> Crop Pages menu item in
Acrobat).
Media Box
Crop Box
(0,0)
The default origin of the user space coordinate system is the lower left corner of a pages
media box. The value of the x-coordinate increases to the right, and the value of the
y-coordinate increases upward. Coordinates are represented as fixed point numbers, and
rectangles are of type ASFixedRect.
Device Space
Device space specifies coordinates in screen pixels. See Figure 1.4. Plug-ins use this
coordinate system when calling AV layer methods to specify the screen coordinates of
windows.
NOTE: Device space coordinates generally are not equal to points. One point is
approximately 1/72 of an inch. Pixels and points are only nearly equivalent when the
monitor has a resolution of 72 dpi and the zoom factor is 1.0.
Aperture
(0,0)
Crop Box
Media Box
Device space defines an aperture as that portion of the Acrobats window in which the PDF
file is drawn. The origin of the device space coordinate system is at the upper left corner of
the visible page on the screen. The value of the x-coordinate increases to the right, and the
value of the y-coordinate increases downward. Coordinates are represented as integers,
and rectangles are of type AVRect.
NOTE: The upper left corner of the visible page is determined by the intersection of a
pages PDF crop box and media box. As a result, the device space coordinate system
changes when the cropping on a page changes.
PDAnnotGetRect(anAnnot, &userRect);
AVPageViewRectToDevice(pageView, &userRect, &deviceRect);
AVPageViewDrawRect(pageView, &deviceRect);
If more than one page is displayed, as in the continuous display modes of Acrobat,
coordinates in user space may be ambiguous. The problem is that user space coordinates are
relative to a page, and more than one page is displayed. This raises the question of which
page AVPageViewRectToDevice would use. To specify the page, call the
AVPageViewSetPageNum method first. The code shown above now appears as:
ASFixedRect userRect;
AVRect deviceRect;
AVPageViewSetPageNum(pageView, annotPageNum);
PDAnnotGetRect(anAnnot, &userRect);
AVPageViewRectToDevice(pageView, &userRect, &deviceRect);
AVPageViewDrawRect(pageView, &deviceRect);
Media Box
Crop Box
Handling Exceptions
In general, methods do not provide return values but instead raise exceptions when errors
occur. You can write exception handlers to catch and handle exceptions at different points in
your plug-in. Acrobat contains a default handler to deal with otherwise uncaught
exceptions.
Chapter 13, Handling Errors describes exception handling in detail.
many ASInt16s to AVDevCoords and other variables that are defined as 16- or 32-bit,
depending on the level of the SDK:
#if !defined(ACRO_SDK_LEVEL) || (ACRO_SDK_LEVEL < 0x00060000)
typedef ASInt16 AVSDKDependentInteger;
#else
typedef ASInt32 AVSDKDependentInteger;
AVSDKDependentInteger is then used to set the following variables, which were
retrofitted into the appropriate existing APIs, providing the compatibility layer.
AVDevSize Denotes a size in the page view's device space.
AVDevCoord Contains an x or y coordinate in the page view's device space.
AVWindowCoord Contains an x or y coordinate in the windows space, where (0, 0) is at
the top left and units are in pixels.
AVScreenCoord Contains an x or y coordinate in the screen space, where (0, 0) is at
the top left of the main monitor.
ASText Object Changes
Most pointers to character strings were replaced with the ASText object.
New Abstract Types
New abstract types were retrofitted into the API to clarify the meaning and use of
parameters. These are listed separately in the API Changes for version 6 section of this
document. See Appendix G, API Changes. These types are referred to as cosmetic types
since they can be compiled without error if the generic types are still used.
ASAtomGetCount
ASFileSysGetDefaultTempPath
ASFileSysSetDefaultTempPath
ASPurgeMemory
ASSetTempFileSys
AVExtensionMgrRegisterNotification
AVExtensionMgrUnregisterNotification
PDDocPrintPages
PDFLGetCoreHFT
PDFLGetFlags
PDFLGetInitCount
PDFLGetVersion
PDFLibraryRegisterNotification
PDFLibraryUnregisterNotification
PDFLInit
PDFLPrintDoc
PDFLTerm
PDFontDownloadContextCreate
PDFontDownloadContextDestroy
PDFontPSEmitGlyphsIncr
PDFontPSFlushIncrGlyphList
PDFontPSGetComponentFontList
PDFontStreamPS
PDFontWasExtracted
PDFontWasFauxed
PDPageDrawContentsPlacedToWindow
PDPageDrawContentsToMemory
PDPageEmitPSOrient
PDPageGetSize
PDPrefGetAntialiasLevel
PDPrefGetBlackPointCompensation
PDPrefGetGreekLevel
PDPrefGetSuppressICCSpaces
PDPrefGetUseOutputIntents
PDPrefSetAntialiasLevel
PDPrefSetBlackPointCompensation
PDPrefSetGreekLevel
PDPrefSetSuppressICCSpaces
PDPrefSetUseLocalFonts
PDPrefSetUseOutputIntents
PDPrefSetWorkingCMYK
PDPrefSetWorkingGray
PDPrefSetWorkingRGB
The Acrobat core API, the PDF Library, and the extended APIs allow plug-ins and PDF
Library applications to manipulate PDF file contents, to enhance and customize Acrobat
and Adobe Reader to perform specialized functions, or to better integrate with existing
environments. This chapter briefly describes some of the many possibilities and refers you
to the corresponding sections of this document. For more information on applications, see
Acrobat SDK Users Guide.
NOTE: Adobe may supply implementations of some of these applications with its products.
When a plug-in redirects Acrobats or Adobe Readers rendering into another window, the
plug-in must handle mouse and keyboard events, make API calls for scrolling, change
pages, zoom, or otherwise alter the view of the PDF file.
For more information, see the PDPageDrawContentsToWindow method in PDPage
on page 341.
Indexed Searching
Indexed searching enables you to catalog, index, search, and highlight text in PDF files.
Regardless of document file format, simple sequential text searching is generally too time-
consuming for long documents, and completely inadequate for searching a collection of
documents.
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 documentsand word locations within those
documentssatisfy a given query. The search system then allows a user to browse the
found documents, optionally displaying or highlighting the hits, or matching items.
The search and catalog extended APIs are often used for cataloging and searching. See
Chapter 4, Overview of the Acrobat Extended APIs, for more information.
2. Indexing
Indexing applications use the PDWordFinder object to extract text from PDF files and
build a search index in a table or file. Through PDWordFinder, plug-ins can obtain the
character or word offset of each word in a PDF file, and length of each word. A plug-in
can use the PDDocGetInfo method to obtain document-level attributes for it to
index.
3. Searching and displaying search results
Through a user interface or some other means, a search application:
Obtains a word or phrase to be found.
Uses the search index and other API functions to open documents in Acrobat, display
appropriate pages, and highlight targeted words.
Highlighting is limited to page text; text in an annotation or a bookmark cannot be
highlighted. An plug-in can, however, select and show any annotation or bookmark
in the document using the PDF files Document Info fields as search criteria.
Extracting Text
The core API does not specify or constrain indexing applications. Your plug-in can create
search indexes as desired. For example, some plug-ins add the search index filename to the
PDF files Info dictionary so that intra-document searching can be performed without the
user having to specify the location of the search index.
Text is extracted in the same order as it occurs in the pages display list. This often is not the
order in which a user would read the text. The application in which the original file was
created determines the order in which text appears in the PDF file; different applications
differ greatly.
NOTE: The order in which text appears in a file can affect phrase searches, proximity
searches, and the operation of next occurrence functions.
In addition, individual words may be split into two or more pieces because PDF creators
may emit kerned or differently-styled pieces of words at a different point in the page-
generation sequence. The core APIs word extraction algorithm attempts to reconstruct
words by looking at the position and spacing of individual characters, and even handles the
case in which words are hyphenated across lines.
In addition to the text of a word, plug-ins can also obtain the character and word offset
from the beginning of the page and the number of characters in the word. This information
is used to highlight the appropriate words in Acrobat during a search.
PDStyle on page 347, PDWord on page 352, and PDWordFinder on page 355 describe
the methods to obtain word, font, size, location and style information from a document.
Manipulation / Editing
Rendering and Viewing
Printing
Text extraction
Content Extraction (Non-textual)
Creation
Fonts
Security and Encryption
Metadata
Linearization and Optimization
Pre-press
Forms
This chapter lists and describes all Acrobat and PDF Library objects and the methods
associated with them. All setters and getters are listed; these are the methods used to
set and get member variables and data structures. Acrobat extended APIs share these
objects. Table 3.1, Acrobat and PDF Library API Objects, presents a summary of all Acrobat
and PDF Library objects, followed by a detailed description of each.
A S L ayer
Acrobat Support layer. Platform-independent objects and utility functions used
throughout the API.
ASAtom
A hashed token used in place of strings to optimize performance (it is much faster to
compare ASAtoms than strings). Many methods return ASAtoms.
Obtaining
ASAtomFromString
Attributes
Get Set
ASAtomGetString ASAtomFromString
Validity testing
ASAtomExistsForString
ASCab
ASCab objects (cabinets) can be used to store arbitrary key-value pairs. The keys are
always null-terminated strings containing only low-ASCII alphanumeric characters and
spaces (ASCII character 32). Key names cannot begin or end with a space.
Every time you place a non-scalar value inside a cabinet you are handing that value to the
ASCab implementation to managethat is, putting a value in a cabinet is always a hand-
off operation. For example, if you create an ASText object and add it as a value in an
ASCab, the ASText object is no longer managed by you; it is managed by the ASCab. The
ASCab will destroy the ASText object when its associated key is removed or the keys
value is over-written. Pointer values are a special case discussed in more detail below.
The routine naming convention is as follows:
Get routines return a value. These objects are owned by the ASCab and should not be
destroyed by the caller of Get.
GetCopy routines make a copy of the data; the GetCopy client owns the resulting
information and can modify it at will; he is also responsible for destroying it.
Detach routines work the same way as Get routines but the key is removed from the
ASCab without destroying the associated value that is passed back to the client of
Detach. The client is responsible for destroying the returned object.
Normally pointers are treated the same way as scalars; the ASCab passes the pointer value
back and forth but doesn't manage the data to which it points. This all changes if the
pointer has an associated destroyProc. If the destroyProc is set, the ASCab will reference
count the pointer to track how many times the pointer is referenced from any ASCab (for
example, the reference count will be bumped up whenever the pointer is copied via
ASCabCopy or added to another ASCab via ASCabPutPointer) and will destroy the
data associated with the pointer when the ref count goes to 0. The data is destroyed by
calling the destroyProc. Detaching a pointer removes one reference to the pointer without
ever destroying the information pointed to. ASCabDetachPointer returns a separate
value indicating whether the pointer can safely be destroyed by the client or is still referred
to by other key-value pairs inside any ASCabsthat is, whether the reference count went
to zero when the pointer was detached from the ASCab.
Any of the ASCab API's can take a compound name: a string consisting of multiple keys
separated by the colon (:) characterfor example, Grandparent:Parent:Child:Key. The
implementation will burrow down through such a compound string until it reaches the
most deeply nested cabinet. Also, any of the Put routines can take a NULL key name. If
the key name is NULL, the routine creates a new, numeric key name. If the cabinet is empty,
the first generated key name will be 0 and subsequent names will increase in ascending
order. This is useful when treating an ASCab as a bag of unnamed items, or when adding
an ordered list of items to an empty ASCab.
Obtaining:
ASCabNew
ASCabFromEntryList
ASCabCopy
Disposing:
ASCabDestroy
Enumeration:
ASCabEnum
ASConstCabEnum
Actions:
ASCabEqual
ASCabValueEqual
Attributes
Get Set
ASCabGetAtom ASCabPutAtom
ASCabGetBinary, ASCabPutBinary
ASCabGetBinaryCopy
ASCabGetBool ASCabPutBool
ASCabGetCab ASCabPutCab
ASCabGetDouble ASCabPutDouble
ASCabGetInt ASCabPutInt
ASCabGetPathNameCopy ASCabPutPathName
ASCabGetPointer ASCabPutPointer
ASCabGetPointerDestroyProc
ASCabGetPointerType
ASCabGetString, ASCabPutString
ASCabGetStringCopy
ASCabGetText ASCabPutText
ASCabGetType
ASCabGetUns ASCabPutUns
ASCabPutNull
ASCabKnown
Get Set
ASCabMakeEmpty
ASCabMunge
ASCabRemove
ASCabReadFromStream ASCabWriteToStream
ASCallback
Callbacks allow Acrobat or the PDF Library to call functions in an application or plug-in.
Obtaining
ASCallbackCreate
ASCallbackCreateNotification
ASCallbackCreateProto
ASCallbackCreateReplacement
Disposing
ASCallbackDestroy
ASDate
Date objects represent a particular date and time. All date objects are guaranteed to give
accurate representation of UTC time (not adjusted for leap seconds, as the addition of leap
seconds to the international calendar does not happen according to a well-defined rule).
Date objects are not guaranteed to represent local time accurately, because some
operating systems cannot always determine the prevailing daylight saving rule for the time
zone. However, the date object can be set to use the same rule as the operating system.
Obtaining
ASDateNew
ASDateDup
Disposing
ASDateDestroy
Attributes
Get Set
ASDateClear
ASDateCopy
ASDateGetLocalTime ASDateSetToCurrentLocalTime
ASDateGetTimeString ASDateSetTimeFromString
ASDateGetUTCTime ASDateSetToCurrentUTCTime
ASDateSetLocalTimeOffset
ASDateSetTimeFromRec
Actions
ASDateAddCalendarTimeSpan
ASDateAddTimeSpan
ASDateCalendarDiff
ASDateCompare
ASDateExactDiff
ASDateSubtractCalendarTimeSpan
ASDateSubtractTimeSpan
Declarations
ASCalendarTimeSpan
ASDateTimeFormat
ASTimeRec
ASExtension
An opaque pointer to an object that identifies a specific loaded client. An unique
ASExtension object is created for each client when it is loaded. If the client fails to
initialize, the ASExtension remains but is marked as inactive.
Obtaining
ASEnumExtensions
Attributes
Get Set
ASExtensionGetFileName
ASExtensionGetRegisteredName
ASFile
An opaque representation of an open file.
Obtaining
PDDocGetFile
ASFileSysOpenFile
ASFileFromMDFile
Attributes
Get Set
ASFileAcquirePathName
ASFileGetEOF ASFileSetEOF
ASFileGetFileSys
ASFileGetMDFile
ASFileGetOpenMode ASFileSetMode
ASFileGetPos ASFileSetPos
ASFileGetURL
Actions
ASFileClose
ASFileFlush
ASFileHardFlush
ASFileIsSame
ASFilePushData
ASFileRead
ASFileReopen
ASFileWrite
ASFileRegisterFileSys
ASFileUnregisterFileSys
Declarations
ASErrorCode
ASFileMode
ASFile Flags
ASFileMode Flags
ASFileStatus Flags
ASFileSys
A collection of functions that implement file system services, such as opening files, deleting
files, reading data from a file, and writing data to a file. Each ASFileSys provides these
services for one class of devices.
To create an ASFileSys, complete an ASFileSysRec structure.
Obtaining
ASGetDefaultFileSys
ASFileGetFileSys
ASFileGetFileSysByName
PDFileSpecGetFileSys
Attributes
Get Set
ASFileSysAcquireFileSysPath,
ASFileSysAcquireParent,
ASFileSysAcquirePlatformPath
ASFileSysCanPerformOpOnItem
ASFileSysCopyPath
ASFileSysCreatePathName
ASFileSysDIPathFromPath
ASFileSysPathFromDIPath
ASFileSysDisplayASTextFromPath,
ASFileSysDisplayStringFromPath
ASFileSysGetItemProps ASFileSysConvertCabToItemProps
ASFileSysGetItemPropsAsCab ASFileSysConvertCabToItemProps
ASFileSysConvertItemPropsToCab
ASFileSysGetNameFromPath,
ASFileSysGetNameFromPathAsASText
ASFileSysGetStorageFreeSpace
ASFileSysGetTempPathName
ASFileSysGetTypeAndCreator ASFileSysSetTypeAndCreator
ASFileSysURLFromPath
Get Set
ASFileSysFirstFolderItem, ASFileSysCreateFolder
ASFileSysNextFolderItem ASFileSysDestroyFolderIterator
ASFileSysRemoveFolder
Actions
ASFileRegisterFileSys
ASFileSysFlushVolume
ASFileSysOpenFile
ASFileSysPerformOpOnItem
ASFileSysReleasePath
ASFileSysRemoveFile
ASFileUnregisterFileSys
Declarations
ASFileStatus Flags
ASFileSysRec
ASPlatformPath
Description
An opaque object used to retrieve a platform-specific path object.
Obtaining
ASFileSysAcquirePlatformPath
Disposing
ASFileSysReleasePlatformPath
Attributes:
Get Set
ASPlatformPathGetCFURLRefRecPtr
ASPlatformPathGetCstringPtr
ASPlatformPathGetFSRefPtr
ASPlatformPathGetFSRefWithCFStringRefRecPtr
ASPlatformPathGetFSSpecPtr
ASPlatformPathGetPOSIXPathPtr
Declarations
CFURLRefRec_Ptr
Cstring_Ptr
FSRef_Ptr
FSRefWithCFStringRefRec_Ptr
FSSpec_Ptr
POSIXPath_Ptr
ASStm
A data stream that may be a buffer in memory, a file, or an arbitrary user-written procedure.
Typically used to extract data from a PDF file. When writing or extracting data streams, the
ASStm must be connected to a Cos stream.
Obtaining
ASFileStmRdOpen
ASFileStmWrOpen
ASMemStmRdOpen
ASProcStmRdOpenEx
ASProcStmWrOpen
CosStreamOpenStm
Disposing
ASStmClose
Actions
ASStmRead
ASStmWrite
ASText
An ASText object represents a Unicode string. ASText objects can also be used to
convert between Unicode and various platform-specific text encodings as well as
conversions between various Unicode formats (for example, UTF-16, UTF-8). Since it is
common for a Unicode string to be repeatedly converted to or from the same platform-
specific text encoding, ASText objects are optimized for this operationfor example,
they can cache both the Unicode and platform-specific text strings.
There are several ways of creating an ASText object depending on the type and format of
the original text data. The following terminology is used throughout this API to describe
the various text formats.
EncodedA multi-byte string terminated with a single 0 character and coupled with a
specific host encoding indicator. In the Macintosh OS, the text encoding is specified
using a script code. In the Windows OS, the text encoding is specified using a CHARSET
code. On Unix the only valid host encoding indicator is 0, which specifies text in the
platform's default Roman encoding. On all platforms Asian text is typically specified
using multi-byte strings.
ScriptTextA multi-byte string terminated with a single 0 character and coupled with
an ASScript code. This is merely another way of specifying the Encoded case; the
ASScript code is converted to a host encoding using ASScriptToHostEncoding.
UnicodeText specified using UTF-16 or UTF-8. In the UTF-16 case the bytes can be in
either big-endian format or the endian-ness that matches the platform and are always
terminated with a single ASUns16 0 value. In the UTF-8 case the text is always
terminated with a trailing 0 byte. Unicode refers to straight Unicode without the 0xFE
0xFF prefix or language and country codes that can be encoded inside a PDF
document.
PDTextA string of text pulled out of a PDF document. This will either be a big-endian
Unicode string pre-appended with the bytes 0xFE 0xFF or a string in
PDFDocEncoding. In the Unicode case, this string may have embedded language and
country identifiers. ASText objects strip language and country information out of the
PDText string and track them separately. See below for more details.
ASTexts can also be used to accomplish encoding and format conversions; you can
request a string in any of the formats specified above.
In all cases the ASText code attempts to preserve all characters. For example, if you
attempt to concatenate strings in separate host encodings the implementation may
convert both to Unicode and perform the concatenation in Unicode space.
When creating a new ASText object, or putting new data into an existing object, the
implementation will always copy the supplied data into the ASText object. The original
data is yours to do with as you will (and release if necessary).
The size of ASText data is always specified in bytesfor example, the len argument to
ASTextFromSizedUnicode specifies the number of bytes in the string, not the number
of Unicode characters.
Host encoding and Unicode strings are always terminated with a null character (which
consists of one null byte for host-encoded strings and two null bytes for Unicode strings).
You cannot create a string with an embedded NULL character even using the calls which
take an explicit length parameter.
The Getxxx calls return pointers to data held by the ASText object. You cannot free or
manipulate this data directly. The GetxxxCopy calls return data you can manipulate at will
and that you're responsible for freeing.
An ASText object can have language and country codes associated with it. A language
code is a 2-character ISO 639 language code. A country code is a 2-character ISO 3166
country code. In both cases the 2-character codes are packed into an ASUns16 valuethe
first character in bits 8-15, and the second character in bits 0-7. These language and
country codes can be encoded into a UTF-16 variant of PDText encoding using an escape
sequence; see Section 3.8 in the PDF Reference. The ASText calls will automatically parse
the language and country codes embedded inside UTF-16 PDText and will also author
appropriate escape sequences to embed the language and country codes (if present) when
generating UTF-16 PDText.
Obtaining
ASTextNew
ASTextCopy
ASTextDup
ASTextFromEncoded
ASTextFromInt32
ASTextFromPDText
ASTextFromScriptText
ASTextFromSizedEncoded
ASTextFromSizedPDText
ASTextFromSizedScriptText
ASTextFromSizedUnicode
ASTextFromUnicode
ASTextFromUns32
Disposing
ASTextDestroy
ASTextMakeEmpty
Actions
ASTextCat
ASTextCatMany
ASTextCmp
Attributes
Get Set
ASTextGetBestEncoding
ASTextGetBestScript
ASTextGetCountry ASTextSetCountry
ASTextGetEncoded, ASTextSetEncoded
ASTextGetEncodedCopy
ASTextGetLanguage ASTextSetLanguage
ASTextGetPDTextCopy ASTextSetPDText
ASTextGetScriptText, ASTextSetScriptText
ASTextGetScriptTextCopy
ASTextGetUnicode, ASTextSetUnicode
ASTextGetUnicodeCopy
ASTextIsEmpty
ASTextNormalizeEndOfLine
ASTextSetSizedEncoded
ASTextSetSizedPDText
ASTextSetSizedScriptText
ASTextSetSizedUnicode
ASTextReplace,
ASTextReplaceASCII,
ASTextReplaceBadChars
ASTimeSpan
Represents an exact time span, measured in seconds. The internal representation uses 64-
bit signed integers (to avoid the 2038 problem caused by 32-bit representation). Negative
timespans are allowed.
Obtaining
ASTimeSpanNew
ASTimeSpanDup
Disposing
ASTimeSpanDestroy
Attributes
Get Set
ASTimeSpanCopy
ASTimeSpanGetASInt32 ASTimeSpanSetFromASInt32
ASTimeSpanSet
ASTimeSpanSetFromString
ASTimeSpanNegate
ASCalendarTimeSpanAddWithBase
ASTimeSpanAdd
ASCalendarTimeSpanDiff
ASTimeSpanDiff
Actions
ASCalendarTimeSpanCompare
ASTimeSpanCompare
ASUUID
A universal unique identifier for the current user or the current session.
Obtaining
AVAppGetUUID
ASUUIDFromCString
ASUUIDGenFromHash
ASUUIDGenFromName
ASUUIDGenUnique
Actions
ASUUIDToCString
Declarations
AVAppUUIDType
ASUUID
ASUUIDMaxStringLen
HFT
A table of function pointers (actually callbacks) called a host function table. This is the
mechanism through which clients call methods in Acrobat or in other clients.
Obtaining
ASExtensionMgrGetHFT
HFTNew
HFTNewEx
Disposing
HFTDestroy
Attributes
Get Set
HFTGetReplacedEntry HFTReplaceEntry,
HFTReplaceEntryEx,
HFTUnreplaceEntry
HFTGetVersion
Validity testing
HFTIsValid
Declarations
HFTData
HFTEntry
HFTEntryReplaceable
HFT Values
ASVersion
HFTServer
Each HFT is serviced by an HFT server. The HFT server is responsible for handling requests
to obtain or destroy its HFT.
Obtaining
HFTServerNew
Disposing
HFTServerDestroy
MDFile
A file-system specific representation of an individual file. It uses the machines native
platform-specific data structure to represent a file. In the client API, it is primarily used by
Replacement FileSystem implementors. A replacement file system can choose its own
implementation of an MDFile that is mapped by Acrobat to an ASFile for use by clients
of the replacement file system. In Acrobat 5, MDFile was rename ASMDFile.
Obtaining
ASFileGetMDFile
Attributes
Get Set
ASFileFromMDFile
AV L aye r
Acrobat viewer layer. A set of objects whose methods allow clients to manipulate
components of the Acrobat viewer application itself, such as menus and menu items.
AVActionHandler
Carries out an action. When Acrobat executes an action, it looks for the action handler with
a type matching that of the action it is trying to execute. The Acrobat viewer invokes the
matching handler to perform the action. If no match is found, the Acrobat viewer ignores
the user action. Clients can add new action handlers by using
AVAppRegisterActionHandler.
Obtaining
AVAppRegisterActionHandler
AVAppGetActionHandlerByType
Enumerating
AVAppEnumActionHandlers
Attributes
Get Set
AVActionHandlerGetProcs
AVActionHandlerGetType
AVActionHandlerGetUIName
Declarations
AVActionHandlerProcs
AVAnnotHandler
Responsible for creating, displaying, selecting, and deleting a particular type of annotation.
There is one annotation handler for each annotation type. The source for built-in
annotation types may be just the Acrobat executable or the executable plus the default
Adobe plug-ins. An example of annotations that are built into the executable are link
annotations; examples of annotations added by Acrobats default plug-ins include note
annotations. See the PDF Reference for more information. Clients can add new annotation
handlers by using AVAppRegisterAnnotHandler.
Obtaining
AVAppGetAnnotHandlerByName
AVAppEnumAnnotHandlers
Enumerating
AVAppEnumAnnotHandlers
Attributes
Get Set
AVAnnotHandlerGetInfo AVAnnotHandlerDeleteInfo
Declarations
AVAnnotHandler
AVApp
The Acrobat application itself. From the application layer, you can control the appearance
of Acrobat, whether Acrobat appears, and the size of the application window. Your
application has access to the menubar and the toolbar through this object. The application
layer also provides access to the visual representation of a PDF file on the screen, that is, an
AVDoc.
Enumerating
AVAppEnumActionHandlers
AVAppEnumAnnotHandlers
AVAppEnumDocs
AVAppEnumSystemFonts
AVAppEnumTools
AVAppEnumTransHandlers
Attributes
Get Set
AVAppGetHowToPanelAutoShow AVAppRegisterHowToPanel,
AVAppSetHowToPanelAutoShow,
AVAppSetHowToPanelAutoShowText
AVAppCanQuit
AVAppGetActionHandlerByType AVAppRegisterActionHandler
AVAppGetActiveDoc
AVAppGetActiveTool AVAppSetActiveTool,
AVAppRegisterTool
AVAppGetAnnotHandlerByName AVAppRegisterAnnotHandler
AVAppRegisterForContextMenuAddition
AVAppRegisterForPageViewAdjustCursor,
AVAppUnregisterForPageViewAdjustCursor
AVAppRegisterForPageViewClicks,
AVAppUnregisterForPageViewClicks
AVAppRegisterForPageViewDrawing,
AVAppUnregisterForPageViewDrawing
AVAppRegisterIdleProc,
AVAppUnregisterIdleProc
Get Set
AVAppRegisterNotification,
AVAppUnregisterNotification
AVAppGetCancelProc
AVAppGetDefaultTool
AVAppGetDocProgressMonitor
AVAppGetLanguage
AVAppGetLastActiveTool
AVAppGetMenubar
AVAppGetName
AVAppGetNumDocs
AVAppGetPreference AVAppSetPreference
AVAppGetReportProc
AVAppGetToolBar
AVAppGetToolByName
AVAppGetTransHandlerByType
AVAppGetVersion
AVHasAuxDataHandler AVRegisterAuxDataHandler,
AVUnregisterAuxDataHandler
Actions
AVAppBeginModal
AVAppEndModal
AVAppModalWindowIsOpen
AVAppBeginFullScreen
AVAppDoingFullScreen
AVAppEndFullScreen
AVAppHandlePlatformEvent
AVAppHelpSearch
AVAppHelpShowContents
AVAppHelpShowIndex
AVAppOpenHelpFileWithParams
AVAppAutoShowHowToPanel
AVCommand
An AVCommand represents an action that the user can perform on the current document
or the current selection in the current document. An AVCommand can be added to a
command sequence and executed either interactively or via batch processing, using
AVCommandExecute. Commands can be cancelled with AVCommandCancel.
Obtaining:
AVCommandNew
Disposing:
AVCommandDestroy
Attributes
Get Set
AVCommandGetAVDoc
AVCommandGetCab AVCommandPutCab
AVCommandGetCancelProc
AVCommandGetConfig AVCommandSetConfig
AVCommandGetInputs AVCommandSetInputs
AVCommandGetName
AVCommandGetParams AVCommandSetParams
AVCommandGetPDDoc
AVCommandGetProgressMonitor
AVCommandGetProps
AVCommandGetReportProc
AVCommandGetStatus
AVCommandGetUIPolicy
Actions
AVCommandCancel
AVCommandExecute
AVCommandReset
AVCommandShowDialog
AVCommandWork
AVConversion
This is not a data structure, but a conceptual entity that collects methods and data
structures used to convert from and to PDF format.
Actions
AVConversionConvertFromPDFWithHandler
AVConversionConvertStreamFromPDFWithHandler
AVConversionConvertStreamFromStructNodeWithHandler
AVConversionConvertStreamToPDF
AVConversionConvertStreamToPDFWithHandler
AVConversionConvertToPDF
AVConversionConvertToPDFWithHandler
AVConversionEnumFromPDFConverters
AVConversionEnumToPDFConverters
Declarations
AVConversionClientData
AVConversionEnumProcData
AVConversionFlags
AVConversionFromPDFHandler
AVConversionMimeTypeString
AVConversionStatus
AVConversionToPDFHandler
AVDoc
A view of a PDF document in a window. There is one AVDoc per displayed document.
Unlike a PDDoc, an AVDoc has a window associated with it.
Obtaining:
AVAppGetActiveDoc
AVAppEnumDocs
AVDocOpenFromASFileWithParams
AVDocOpenFromASFileWithParamString
AVDocOpenFromFile
AVDocOpenFromASFileWithParams
AVDocOpenFromASFileWithParamString
AVDocOpenFromPDDoc
AVDocOpenFromPDDocWithParams
AVDocOpenFromPDDocWithParamString
AVPageViewGetAVDoc
AVUndoGetAVDoc
Disposing
AVDocClose
Enumerating
AVAppEnumDocs
AVDocEnumSelection
Attributes
Get Set
AVDocGetAVWindow
AVDocGetClientName AVDocSetClientName
AVDocGetPageText
AVDocGetPageText,
AVDocGetPageView,
AVDocGetNthPageView,
AVDocGetNumPageViews
AVDocGetPDDoc
AVDocClearSelection
AVDocDeleteSelection
Get Set
AVDocShowSelection
AVDocGetSelection AVDocSetSelection
AVDocGetSelectionServerByType
AVDocGetSelectionType
AVDocGetSplitterPosition AVDocSetSplitterPosition
AVDocGetTopUndo AVDocClearUndos
AVDocGetViewDef, AVDocSetViewDef,
AVDocGetViewDefEx AVDocSetViewDefEx
AVDocGetViewMode AVDocSetViewMode
AVDocIsExternal
AVDocRegisterSelectionServer
AVDocSetDead
AVDocIsReadOnly AVDocSetReadOnly
Actions
AVDocBeginUndoOperation
AVDocDoActionPropsDialog
AVDocDoCopyAs
AVDocDoPrint
AVDocDoSaveAs
AVDocDoSaveAsWithParams
AVDocDoSelectionProperties
AVDocEndUndoOperation
AVDocPerformAction
Declarations
AVDocOpenParams
AVDocPrintParams
AVDocSelectionServer
AVDocViewDef
AVGrafSelect
A graphics selection on a page in a PDF file. It is a rectangular region of a page that can be
copied to the clipboard as a sampled image.
Obtaining
AVDocGetSelection
AVGrafSelectCreate
Disposing
AVGrafSelectDestroy
Attributes
Get Set
AVGrafSelectGetBoundingRect
AVMenu
A menu in Acrobats menubar. Clients can create new menus, add menu items at any
location in any menu, and remove menu items. Deleting an AVMenu removes it from the
menubar (if it was attached) and deletes all the menu items it contains.
Obtaining
AVMenuAcquire
AVMenuNew
AVMenuItemAcquireSubmenu
AVMenuItemGetParentMenu
AVMenubarAcquireMenuByName
AVMenubarAcquireMenuByIndex
AVMenubarAcquireMenuByPredicate
Disposing
AVMenuRelease
AVMenuRemove
Attributes
Get Set
AVMenuAddMenuItem
AVMenuGetMenuItemIndex
AVMenuGetName
AVMenuGetNumMenuItems
AVMenuGetParentMenubar
AVMenuGetParentMenuItem
AVMenuGetTitle
AVMenubar
Acrobats menubar and a list of all menus. There is only one AVMenubar. Clients can add
new menus to or remove any menu from the menubar. The menubar can be hidden from
the users view.
Obtaining
AVAppGetMenubar
AVMenuGetParentMenubar
AVAppGetMenubar is the standard way to obtain the menubar.
Attributes:
Get Set
AVMenubarAddMenu
AVMenuRemove
AVMenubarAcquireMenuByIndex
AVMenubarAcquireMenuByName
AVMenubarAcquireMenuByPredicate
AVMenubarAcquireMenuItemByName
AVMenubarAcquireMenuItemByPredicate
AVMenubarGetMenuIndex
AVMenubarGetNumMenus
AVMenuItemRemove
AVMenubarHide
AVMenubarShow
AVMenuItem
A menu item under a menu in Acrobat. It has a number of attributes, including a name, a
keyboard shortcut, a procedure to execute when the menu item is selected, a procedure to
compute whether the menu item is enabled, a procedure to compute whether the menu
item is check marked, and whether it has a submenu.
Obtaining
AVMenuItemNew
AVMenuItemAcquire
AVMenubarAcquireMenuByName
AVMenubarAcquireMenuItemByPredicate
AVMenuAcquireMenuItemByIndex
AVMenuGetParentMenuItem
AVMenuDoPopUp
AVPageViewDoPopupMenu
Disposing
AVMenuItemRelease
AVMenuItemRemove
Attributes
Get Set
AVMenuGetMenuItemIndex
AVMenuItemAcquireSubmenu
AVMenuItemGetLongOnly
AVMenuItemGetName
AVMenuItemGetParentMenu
AVMenuItemGetShortcut
AVMenuItemGetTitle AVMenuItemSetTitle
AVMenuItemIsEnabled AVMenuItemSetComputeEnabledProc
AVMenuItemIsMarked AVMenuItemSetComputeMarkedProc
AVMenuItemIsVisible AVMenuItemSetComputeVisibleProc
AVMenuItemSetExecuteProc
AVPageView
The area of Acrobats window that displays the contents of a document page. Every AVDoc
has an AVPageView and vice versa. It contains references to the PDDoc and PDPage
objects for the document being displayed.
Obtaining
AVDocGetPageView
Attributes
Get Set
AVPageViewAppearanceGetAVMatrix
AVPageViewAcquireMachinePort AVPageViewReleaseMachinePort
AVPageViewGetActiveBead
AVPageViewGetAnnotRect
AVPageViewSetAnnotLocation
AVPageViewGetAperture
AVPageViewGetAVDoc
AVPageViewGetColor AVPageViewSetColor
AVPageViewShowControl
AVPageViewGetDevToPageMatrix,
AVPageViewGetPageToDevScaling
AVPageViewGetPageToDevMatrix
AVPageViewGetFirstVisiblePageNum,
AVPageViewGetLastVisiblePageNum
AVPageViewGetFocusAnnot AVPageViewSetFocusAnnot
AVPageViewGetLayoutMode AVPageViewSetLayoutMode
AVPageViewGetMousePosition,
AVPageViewGetMousePositionSnapped
AVPageViewGetNextView
AVPageViewGetPage
AVPageViewGetPageNum AVPageViewSetPageNum
Get Set
AVPageViewGetSelectedAnnotPageNum
AVPageViewGetThreadIndex
AVPageViewGetVisibleAnnotPage
AVPageViewGetZoom,
AVPageViewGetZoomType
AVPageViewDevicePointToPage,
AVPageViewDeviceRectToPage,
AVPageViewDeviceRectToPageRZ,
AVPageViewInfoToDevice
AVPageViewInfoToPoint
AVPageViewPointToDevice,
AVPageViewPointToInfo,
AVPageViewRectToDevice
AVPageViewInvalidateRect,
AVPageViewInvalidateText
AVPageViewIsAnnotAtPoint, AVPageViewSetAnnotLocation
AVPageViewIsAnnotOfTypeAtPoint,
AVPageViewIsFocusAnnot
AVPageViewIsBeadAtPoint
AVPageViewPageNumIsVisible
AVPageViewPointInText
AVPageViewUseDestInfo,
AVPageViewUseThisDestination
AVPageViewUpdateInfoPanel
Actions
AVPageViewDragRect
AVPageViewDragRectSnapped
AVPageViewDragRectSnappedEx
AVPageViewDrawCosObj
AVPageViewDrawNow
AVPageViewDrawRect
AVPageViewDrawRectOutline
AVPageViewGoBack
AVPageViewGoForward
AVPageViewGoTo
AVPageViewHighlightText
AVPageViewInsetRect
AVPageViewInvertQuad
AVPageViewInvertRect
AVPageViewInvertRectOutline
AVPageViewReadPageDown
AVPageViewReadPageUp
AVPageViewResumeOffscreenDrawing
AVPageViewScrollTo
AVPageViewScrollToRect
AVPageViewSnapPoint
AVPageViewSnapRect
AVPageViewStartReadingThread
AVPageViewSuspendOffscreenDrawing
AVPageViewToDestInfo
AVPageViewToViewDest
AVPageViewTrackText
AVPageViewZoomTo
Declarations
AVDestInfo
AVDragRectParams
AVDragType
AVInfoPanelUpdateType
AVPageViewControlID
AVRect
AVZoomType
AVSweetPea
The Sweet Pea methods are used to implement the Adobe Dialog Manager (ADM). See
Adobe Dialog Manager Reference.
Attributes
Get Set
AVSweetPeaGetBasicSuiteP
AVSweetPeaGetPluginRef
AVSweetPeaGetResourceAccess AVSweetPeaSetResourceAccess
Declarations
See Adobe Dialog Manager Reference.
AVSys
Provides various system-wide utilities, including setting the cursor shape and beeping.
Attributes
Get Set
AVSysGetCursor, AVSysSetCursor,
AVSysGetStandardCursor AVSysSetWaitCursor
AVSysGetIconFromFilename,
AVSysGetIconFromMimeType,
AVSysGetIconFromTypeAndCreator
AVSysGetModifiers
AVSysGetUsePenForInput
AVSysMouseIsStillDown
Actions
AVSysAllocTimeStringFromTimeRec
AVSysBeep
AVTool
Handles key presses and mouse clicks in the content region of an AVPageView. AVTools
do not handle mouse clicks in other parts of Acrobats window, such as in the bookmark
pane. At any time, there is one active tool.
Obtaining
AVAppGetActiveTool
AVAppGetLastActiveTool
AVAppGetDefaultTool
AVAppGetToolByName
AVAppEnumTools
Enumerating
AVAppEnumTools
Attributes
Get Set
AVToolGetType
AVToolIsPersistent
Declarations
AVTool
AVToolBar
Acrobats toolbar (the palette of buttons).
Obtaining
AVAppGetToolBar
AVToolBarNew
AVToolBarNewFlyout
AVToolButtonGetFlyout
Attributes
Get Set
AVToolBarGetButtonByName
AVToolBarGetFrame
AVToolBarGetNumButtons
AVToolBarIsRoomFor
AVToolBarAddButton
AVToolBarUpdateButtonStates
AVToolButtonDestroy
AVToolButtonRemove
AVToolButtonSetExternal
AVToolButton
A button in Acrobats toolbar. Like menu items, the procedure that executes when the
button is clicked can be set by a client. Although not required, there is generally a menu
item corresponding to each button, allowing users to select a function using either the
button or the menu item. Buttons are added to the toolbar by specifying which existing
button they appear before or after.
Obtaining
AVToolBarGetButtonByName
AVToolButtonNew
AVToolBarEnumButtons
Disposing
AVToolButtonDestroy
AVToolButtonRemove
Enumerating
AVToolBarEnumButtons
Attributes
Get Set
AVToolButtonGetFlyout AVToolButtonSetFlyout
AVToolButtonGetIcon AVToolButtonSetIcon
AVToolButtonGetLabelText AVToolButtonSetLabelText
AVToolButtonGetMenu AVToolButtonSetMenu
AVToolButtonIsEnabled AVToolButtonSetComputeEnabledProc
AVToolButtonIsMarked AVToolButtonSetComputeMarkedProc
AVToolButtonIsSeparator
AVToolButtonSetNotifyTooltipProc
AVToolButtonIsVisible AVToolButtonSetComputeVisibleProc
AVToolButtonSetExecuteProc
AVToolButtonSetExternal
AVToolButtonSetHelpText
Declarations
Tool Button Flags
AVUndo
Represents an undo record for a document. An undo record allows a client to associate
private data with a particular AVDoc for the purpose of undoing and redoing changes to
the document. The client provides private data that encapsulates the changes, and an
AVUndoHandler that contains callbacks which interpret the data when Undo and Redo
commands are issued.
Obtaining
AVUndoNew
AVDocBeginUndoOperation
Disposing
AVDocClearUndos
AVDocEndUndoOperation
Attributes
Get Set
AVUndoGetAVDoc
AVUndoGetData AVUndoSetData
AVUndoGetType
Declarations
AVUndoHandler
AVUndoHandlerData
AVWindow
Creates and manages windows. Clients should use AVWindows for their own dialogs,
floating palettes, and so forth, to ensure that those windows work well with Acrobat. For
example, under Windows they are hidden when Acrobat is turned into an icon. Once the
client creates an AVWindow, it is free to use platform-dependent code to put whatever it
wants in the window.
Obtaining
AVWindowNew
AVWindowNewFromPlatformThing
AVDocGetAVWindow
Disposing
AVWindowDestroy
AVWindowUserClose
Attributes
Get Set
AVWindowGetFrame AVWindowSetFrame
AVWindowGetInterior
AVWindowGetOwnerData AVWindowSetOwnerData
AVWindowGetPlatformThing
AVWindowGetTitle AVWindowSetTitle
AVWindowIsKey ,
AVWindowSetWantsKey,
AVWindowIsVisible
AVWindowInvalidateRect
Actions
AVWindowBecomeKey
AVWindowBringToFront
AVWindowDoModal
AVWindowDrawNow
AVWindowEndModal
AVWindowHide
AVWindowMaximize
AVWindowResignKey
AVWindowShow
Declarations
AVWindow Flags
AVWindowHandler
AVWindowLayer
Co s L aye r
A set of objects that provide access to the building blocks used to construct documents. Its
methods allow applications to manipulate the low-level data in a PDF file, such as strings,
numbers, and dictionaries.
CosArray
A Cos-level representation of an array.
Obtaining
CosNewArray
Attributes
Get Set
CosArrayGet CosArrayPut
CosArrayLength
CosArrayInsert
CosArrayRemove
CosArrayRemoveNth
CosBoolean
A Cos-level representation of a boolean value.
Obtaining
CosNewBoolean
Attributes
Get Set
CosBooleanValue
CosDict
A Cos-level representation of a dictionary.
Obtaining
CosNewDict
CosDocGetInfoDict
CosStreamDict
Attributes
Get Set
CosDictGet CosDictPut
CosDictKnown
CosDictRemove
CosDoc
A Cos-level representation of an entire PDF file.
Obtaining
CosDocCreate
CosDocOpenWithParams
CosObjGetDoc
PDDocGetCosDoc
Attributes
Get Set
CosDocGetID
CosDocGetInfoDict
CosDocGetObjByID
CosDocHasFullCompression
CosDocHasPartialCompression
CosDocSetDirty
Actions
CosDocClose
CosDocSaveToFile
CosDocSaveWithParams
CosSetMaxDocStorages
Declarations
CosDocOpenParams
CosDocOpenParams
CosDocSaveFlags
CosDocSaveParams
CosFixed
A Cos-level representation of a fixed-point number.
Obtaining
CosNewFixed
Attributes
Get Set
CosFixedValue
CosInteger
A Cos-level representation of an integer.
Obtaining
CosNewInteger
Attributes
Get Set
CosIntegerValue
CosName
A Cos-level representation of a name.
Obtaining
CosNewName
Attributes
Get Set
CosNameValue
CosNull
A Cos-level representation of a null PDF object.
Obtaining
CosNewNull
CosObj
A general object in a PDF file, which may be of any Cos object type.
Obtaining
CosDocGetObjByID
PDActionGetCosObj
PDAnnotGetCosObj
PDBeadGetCosObj
PDBookmarkGetCosObj
PDCharProcGetCosObj
PDFileSpecGetCosObj
PDFontGetCosObj
PDFormGetXUIDCosObj
PDNameTreeGetCosObj
PDPageGetCosObj
PDPageGetCosResources
PDPageLabelGetCosObj
PDThreadGetCosObj
PDTransGetCosObj
PDViewDestGetCosObj
PDXObjectGetCosObj
Disposing
CosObjDestroy
Enumerating
CosObjEnum
Actions
CosObjEqual
Attributes
Get Set
CosDocObjIsWithinRange
CosObjGetCollection CosObjAddToCollection,
CosObjRemoveFromCollection
CosObjGetCompressibility, CosObjSetCompressibility
CosObjIsCompressed
CosObjGetDoc
Get Set
CosObjGetGeneration
CosObjGetID
CosObjHash
CosObjIsIndirect
Actions
CosObjRefreshAfterLinearizedSave
Cos conversion
See Cos conversion for each object.
Declarations
CosType
CosObjCollection
An opaque structure representing a set of Cos objects associated with a particular Cos
document. The initial value of a variable of type ObjCollection is undefined. Use
CosNewObjCollection to create a collection.
Any indirect object whose generation number is zero and which is not a stream may be
added to at most one CosObjCollection. When the file is saved, all the objects in a
given collection are stored together in the PDF file, in one or more object streams (see the
PDF Reference), which are normally compressed in order to reduce file size.
Collections allow grouping of objects that are likely to have a similar usage pattern. If one
of them is required (and therefore decompressed), they are likely to all be required, but it is
possible that none will be required. For example, there could be a collection that stores
bookmarks. If the user never opens the bookmarks panel in Acrobat, none of the objects
need to be decoded. If the user opens the bookmarks panel, it is likely they will all be
needed, and having them together in the PDF file reduces the amount of time needed to
load them all.
NOTE: If the document is saved with full compression, partial compression, or in linearized
format, any existing collections are ignored.
Obtaining
CosNewObjCollection
CosObjGetCollection
Enumerating
CosObjCollectionEnum
Attributes
Get Set
CosObjCollectionEqual
CosObjCollectionIsNull
CosObjCollectionSize
CosStream
A Cos-level representation of a stream.
Obtaining
CosNewStream
CosStreamOpenStm
Attributes
Get Set
CosStreamDict
CosStreamLength
CosStreamPos
Declarations
CosStreamOpenMode
CosString
A Cos-level representation of a string.
Obtaining
CosNewString
Attributes
Get Set
CosStringGetHexFlag CosStringSetHexFlag
CosCopyStringValue
CosStringValue
CosStringValueSafe
P D L ayer
A group of objects that provide access to components of PDF documents such as pages,
annotations, and fonts. Its methods allow applications to manipulate document
components.
PDAction
Actions are what happens when a user clicks on a link or bookmark. In addition, Acrobat
allows a document to have an action that is executed automatically when the document is
opened. Applications can also support actions in custom annotation types they add.
Obtaining
PDActionNew
PDActionNewFromDest
PDActionNewFromFileSpec
PDLinkAnnotGetAction
PDBookmarkGetAction
PDDocGetOpenAction
PDActionCopy
PDActionPaste
Disposing
PDActionDestroy
PDActionDestroyClipboardData
Attributes
Get Set
PDActionCanCopy
PDActionCanPaste
PDActionEqual
PDActionGetDest
PDActionGetFileSpec
PDActionGetSubtype
Cos conversion
PDActionGetCosObj
PDActionFromCosObj
Validity testing
PDActionIsValid
Declarations
PDActionClipboardData
PDAnnot
An annotation on a page in a PDF file. Acrobat has two built-in annotation types:
PDTextAnnot and PDLinkAnnot. Physical attributes of the annotation can be set and
queried. Plug-ins add movie and Widget (form field) annotations. Developers can define
new annotation subtypes by creating new annotation handlers.
Obtaining
AVPageViewIsAnnotAtPoint
PDAnnotFromCosObj
PDPageAddNewAnnot
PDPageCreateAnnot
PDPageGetAnnot
PDAnnotCopy
PDAnnotPaste
Disposing
PDPageRemoveAnnot
PDAnnotDestroyClipboardData
Attributes
Get Set
AVPageViewGetSelectedAnnotPageNum
AVPageViewSetAnnotLocation
PDAnnotCanCopy
PDAnnotCanPaste
PDAnnotEqual
PDAnnotGetColor PDAnnotSetColor
PDAnnotGetDate PDAnnotSetDate
PDAnnotGetFlags PDAnnotSetFlags
PDAnnotGetRect PDAnnotSetRect
PDAnnotGetSubtype
PDAnnotGetTitle PDAnnotSetTitle
PDAnnotGetOCMD PDAnnotSetOCMD
PDAnnotRemoveOCMD
Get Set
PDAnnotIsCurrentlyVisible
Cos conversion
PDAnnotGetCosObj
PDAnnotFromCosObj
Validity testing
PDAnnotIsValid
Declarations
PDAnnotArray
PDAnnotClipboardData
PDAnnot Flags
PDAnnotHandler
PDAnnotInfo
PDBead
A single rectangle in an article thread. (Article threads are known simply as articles in
Acrobats user interface.) A bead remains valid as long as a thread is current and active.
Obtaining
AVPageViewGetActiveBead
AVPageViewIsBeadAtPoint
PDBeadNew
PDBeadGetNext
PDBeadGetPrev
PDThreadGetFirstBead
Disposing
PDBeadDestroy
Attributes
Get Set
PDBeadGetIndex
PDBeadGetNext
PDBeadGetPrev
PDBeadGetRect PDBeadSetRect
PDBeadGetThread
PDBeadIsValid
PDBeadSetPage
Cos conversion
PDBeadGetCosObj
PDBeadFromCosObj
Validity testing
PDBeadIsValid
PDBookmark
A bookmark on a page in a PDF file. Each bookmark has a title that appears on screen, and
an action that specifies what happens when a user clicks on the bookmark. Bookmarks can
either be created interactively by the user through Acrobats user interface or
programmatically generated. The typical action for a user-created bookmark is to move to
another location in the current document, although any action (see PDAction) can be
specified.
Obtaining
PDDocGetBookmarkRoot
PDBookmarkAddNewSibling
PDBookmarkAddNewChild
PDBookmarkFromCosObj
PDBookmarkGetByTitle
PDBookmarkGetParent
PDBookmarkGetFirstChild
PDBookmarkGetLastChild
PDBookmarkGetNext
PDBookmarkGetPrev
Disposing
PDBookmarkDestroy
PDBookmarkUnlink
Attributes
Get Set
PDBookmarkEqual
PDBookmarkGetAction PDBookmarkSetAction
PDBookmarkRemoveAction
PDBookmarkGetColor PDBookmarkSetColor
PDBookmarkGetCount
PDBookmarkGetFirstChild PDBookmarkAddChild
PDBookmarkAddNewChild
PDBookmarkGetFlags PDBookmarkSetFlags
PDBookmarkGetIndent
Get Set
PDBookmarkGetLastChild PDBookmarkAddChild
PDBookmarkAddNewChild
PDBookmarkGetNext PDBookmarkAddNext
PDBookmarkAddNewSibling
PDBookmarkGetParent PDBookmarkAddSubtree
PDBookmarkGetPrev PDBookmarkAddPrev
PDBookmarkAddNewSibling
PDBookmarkGetTitle PDBookmarkSetTitle
PDBookmarkHasChildren
PDBookmarkIsOpen PDBookmarkSetOpen
Cos conversion
PDBookmarkGetCosObj
PDBookmarkFromCosObj
Validity testing
PDBookmarkIsValid
PDCharProc
A character procedure, a stream of graphic operators (see PDGraphic) that draw a
particular glyph of a Type 3 PostScript font.
Enumerating
PDCharProcEnum
PDCharProcEnumWithParams
PDFontEnumCharProcs
Cos conversion
PDCharProcGetCosObj
PDDoc
The underlying PDF representation of a document. There is a correspondence between a
PDDoc and an ASFile; the PDDoc object is the hidden object behind every AVDoc. An
ASFile may have zero or more underlying files, so a PDF file does not always correspond
to a single disk file. For example, an ASFile may provide access to PDF data in a database.
Through PDDocs, your application can perform most of the Edit -> Pages menu items from
Acrobat (delete, replace, and so on). Thumbnails can be created and deleted through this
object. You can set and retrieve document information fields through this object as well.
The first page in a PDDoc is page 0.
Obtaining
AVDocGetPDDoc
PDDocFromCosDoc
PDDocOpen
PDDocOpenFromASFile
PDDocOpenWithParams
PDDocCreate
PDOCConfigGetPDDoc
PDPageGetDoc
PDFileSpecGetDoc
PDEnumDocs
Disposing
PDDocClose
PDDocRelease
Enumerating
PDDocEnumFonts
PDDocEnumLoadedFonts
PDDocEnumOCGs
PDDocEnumOCConfigs
PDEnumDocs
Attributes
Get Set
AVAuthOpen PDDocAuthorize
PDCryptAuthorizeFilterAccess PDDocSetNewCryptFilterData
PDDocSetNewCryptFilterMethod
PDDocSetNewDefaultFilters
PDDocAcquire
Get Set
PDDocAcquirePage PDDocCreatePage
PDDocDeletePages
PDDocImportNotes
PDDocMovePage
PDDocReplacePages
PDDocAuthorize
PDDocCreateThumbs
PDDocDeleteThumbs
PDDocExportNotes
PDDocGetCryptHandlerClientData PDDocSetNewCryptHandler
PDDocGetNewCryptHandler PDDocSetNewCryptHandlerEx
PDDocGetFile
PDDocGetFlags PDDocClearFlags
PDDocSetFlags
PDDocGetFullScreen PDDocSetFullScreen
PDDocGetID
PDDocGetInfo PDDocSetInfo
PDDocGetLabelForPageNum PDDocRemovePageLabel
PDDocGetNameTree PDDocRemoveNameTree
PDDocGetNumPages
PDDocGetOCConfig PDDocReplaceOCG
PDDocGetOCContext
PDDocGetOCGs
PDDocGetNumOCGs
PDDocHasOC
PDDocGetOpenAction PDDocSetOpenAction
PDDocRemoveOpenAction
PDDocGetPageLabel PDDocSetPageLabel
PDDocFindPageNumForLabel
PDDocGetPageObjByNum
Get Set
PDDocGetPageMode PDDocSetPageMode
PDDocGetPermissions
PDDocGetSecurityData PDDocNewSecurityData
PDDocGetNewSecurityData PDDocSetNewSecurityData
PDDocGetNewSecurityInfo
PDDocGetStructTreeRoot PDDocRemoveStructTreeRoot
PDDocCreateStructTreeRoot
PDDocGetThread PDDocAddThread
PDDocGetThreadIndex PDDocRemoveThread
PDDocGetNumThreads
PDDocGetTrapped PDDocSetTrapped
PDDocGetWordFinder PDDocCreateWordFinder
PDDocCreateWordFinderUCS
PDWordFinderDestroy
PDDocGetXAPMetadata PDDocSetXAPMetadata
PDDocGetXAPMetadataProperty PDDocSetXAPMetadataProperty
PDDocGetVersion
PDDocFlattenOC
Cos Conversion
PDDocGetCosDoc
PDDocFromCosDoc
Actions
PDDocRequestEntireFile
PDDocRequestPages
PDDocSave
PDDocSaveWithParams
Declarations
PDDocCopyParams
PDDocFlags
PDDocInsertPagesParams
PDDocOCChangeType
PDDocOpenParams
PDDocPreSaveInfo
PDDocReadAhead Flags
PDDocSaveParams
PDFileSpec
The PDF file specification object. It is used to specify a file in an action (see PDAction). A
file specification in a PDF file can take two forms:
A single platform-independent pathname.
A data structure containing one or more alternative ways to locate the file on different
platforms.
PDFileSpecs can be created from ASPathNames or from Cos objects.
Obtaining
PDActionGetFileSpec
PDFileSpecNewFromASPath
PDFileSpecFromCosObj
Attributes
Get Set
PDFileSpecAcquireASPath
PDFileSpecGetDIPath
PDFileSpecGetDoc
PDFileSpecGetFileSys
PDFileSpecGetFileSysName
Cos conversion
PDFileSpecGetCosObj
PDFileSpecFromCosObj
Validity testing
PDFileSpecIsValid
Declarations
PDFileSpecHandler
PDFont
A font that is used to draw text on a page. It corresponds to a Font Resource in a PDF file.
Applications can get a list of PDFonts used on a PDPage or a range of PDPages. More
than one PDPage may reference the same PDFont object.
A PDFont has a number of attributes whose values can be read or set, including an array of
widths, the character encoding, and the fonts resource name.
Obtaining
PDDocEnumFonts
PDDocEnumLoadedFonts
PDFontGetDescendant
PDStyleGetFont
Enumerating
PDDocEnumFonts
PDFontEnumCharProcs
Attributes
Get Set
PDFontAcquireEncodingArray PDFontEncodingArrayRelease
PDFontAcquireXlateTable PDFontXlateTableRelease
PDFontGetBBox
PDFontGetCharSet
PDFontGetCIDSystemInfo
PDFontGetCIDSystemSupplement
PDFontGetDescendant
PDFontGetEncodingIndex
PDFontGetEncodingName
PDFontGetFontMatrix
PDFontGetMetrics PDFontSetMetrics
PDFontGetName
PDFontGetSubtype
PDFontGetWidths
Get Set
PDFontIsEmbedded
Cos conversion
PDFontGetCosObj
PDForm
A self-contained set of graphics operators (essentially a subroutine of PDF page-marking
operators) that is used when a particular graphic is drawn more than once in the document.
It corresponds to a Form resource. You can use any PDXObject method on a PDImage.
Enumerating
PDFormEnumPaintProc
PDFormEnumPaintProcWithParams
PDFormEnumResources
Attributes
Get Set
PDFormGetBBox
PDFormGetFormType
PDFormGetMatrix
PDFormGetXUIDCosObj
Cos Conversion
PDXObjectGetCosObj
PDGraphic
All graphic objects that comprise page, charproc, and PDForm descriptions.
Attributes
Get Set
PDGraphicGetBBox
PDGraphicGetCurrentMatrix
PDGraphicGetState
Declarations
PDGraphicEnumMonitor
PDGraphicEnumParams
PDGraphicState
PDImage
A sampled image or image mask that corresponds to a PDF Image resource. You can use
any PDXObject method on a PDImage.
Attributes
Get Set
PDImageColorSpaceGetIndexLookup
PDImageGetAttrs
Cos Conversion
PDXObjectGetCosObj
Declarations
PDImageAttrs
PDInlineImage
An image whose data is stored in the page descriptions contents streaminstead of being
stored as an image resource (see PDImage).
Attributes
Get Set
PDInlineImageColorSpaceGetIndexLookup
PDInlineImageGetAttrs
PDInlineImageGetData
PDLinkAnnot
A link annotation on a page in a PDF file. You can use any PDAnnot method on a
PDLinkAnnot. Applications can:
Get and set the bounding rectangle and color, using PDAnnot methods.
Get and set the action that occurs when the link is activated, and the links border, using
PDLinkAnnot methods.
Create new link annotations and delete existing ones, using the PDPage methods.
Obtaining:
Any of the PDAnnot calls, followed by CastToPDLinkAnnot. The annotation passed to
CastToPDLinkAnnot must be a link annotation: other annotation types are not
converted into link annotations.
Disposing
PDPageRemoveAnnot
Attributes
Get Set
PDLinkAnnotGetAction PDLinkAnnotSetAction
PDLinkAnnotGetBorder PDLinkAnnotSetBorder
AVPageViewGetSelectedAnnotPageNum
AVPageViewSetAnnotLocation
PDAnnotEqual
PDAnnotGetColor PDAnnotSetColor
PDAnnotGetDate PDAnnotSetDate
PDAnnotGetFlags PDAnnotSetFlags
PDAnnotGetRect PDAnnotSetRect
PDAnnotGetSubtype
PDAnnotGetTitle PDAnnotSetTitle
Cos conversion
PDAnnotGetCosObj
PDAnnotFromCosObj
Validity testing
PDAnnotIsValid
Declarations
PDLinkAnnotBorder
PDNameTree
The dictionary used to store all of the Named Destinations in a PDF file. A name tree is used
to map Cos strings to Cos objects just as a Cos dictionary is used to map Cos names to Cos
objects. However, a name tree can have many more entries than a Cos dictionary can. You
create a PDNameTree and locate it where you think is appropriate (perhaps under a page,
but most often right under the catalog).
Name trees use Cos-style strings (not null-terminated C strings), which may use Unicode
encoding, and these may contain bytes with zeroes in them (high bytes of ASCII characters).
Obtaining
PDDocCreateNameTree
PDNameTreeNew
PDNameTreeFromCosObj
Enumerating
PDNameTreeEnum
Attributes
Get Set
PDDocGetNameTree
PDNameTreeEqual
PDNameTreeLookup
PDNameTreeGet PDNameTreePut
PDNameTreeRemove
Cos conversion
PDNameTreeGetCosObj
Validity testing
PDNameTreeIsValid
PDNumTree
An object that points to the root node of a number tree inside a PDF file. A number tree is
used to map integers to arbitrary Cos objects just as a Cos dictionary is used to map Cos
names to Cos objects. However, a number tree can have many more entries than a Cos
dictionary can.
Obtaining
PDNumTreeNew
PDNumTreeFromCosObj
Enumerating
PDNumTreeEnum
Attributes
Get Set
PDNumTreeEqual
PDNumTreeGet PDNumTreePut
PDNumTreeRemove
Cos conversion
PDNumTreeGetCosObj
Validity testing
PDNumTreeIsValid
PDOCConfig
An optional-content configuration structure, used to maintain a set of visibility states and
other optional-content information in a PDF file for future use. A document has a default
configuration, saved in the D entry in the OCProperties dictionary, and can have a list of
other configurations, saved as an array in the Configs entry in the OCProperties dictionary.
Configurations are typically used to initialize the optional-content group (PDOCG) ON-OFF
states for an optional-content context (PDOCContext). The OCG order in the
configuration is the order in which the groups appear in the Layers panel of Acrobat 6.0.
The configuration can define a set of mutually exclusive OCGs, called a radio button group.
Obtaining
PDOCConfigCreate
PDDocGetOCConfig
Disposing
PDOCConfigDestroy
Enumerating
PDDocEnumOCConfigs
Attributes
Get Set
PDOCConfigGetAllRadioButtonGroups PDOCConfigMakeRadioButtonGroup
PDOCConfigGetRadioButtonGroupForOCG
PDOCConfigGetCreator PDOCConfigSetCreator
PDOCConfigGetInitState PDOCConfigSetInitState
PDOCConfigGetIntent PDOCConfigSetIntent
PDOCConfigGetName PDOCConfigSetName
PDOCConfigGetOCGOrder PDOCConfigSetOCGOrder
PDOCConfigGetPDDoc
Cos conversion
PDOCConfigGetCosObj
Declarations
PDOCConfigBaseState
PDOCContext
An optional-content context in a document, within which document objects such as words
or annotations are visible or hidden. The context keeps track the ON-OFF states of all of the
optional-content groups (OCGs, represented by the PDOCG object) in a document. Content
is or is not visible with respect to the OCG states stored in a specific context. The context
does not correspond to any explicit PDF specification.
The PDDoc has a default context that it uses for on-screen drawing and that determines
the default state for any other drawing or content enumeration. The context has flags that
control whether to draw or enumerate content that is marked as optional
(PDOCDrawEnumType), and whether to draw content that is not marked as optional
(NonOCDrawing).
There can be more than one PDOCContext object, representing different combinations of
OCG states. You can change the states of OCGs within any context. You can build contexts
with your own combination of OCG states, and issue drawing or enumeration commands
using that context instead of the document's default context. For example, you can pass an
optional-content context to PDPageDrawContentsWithParams through the
PDDrawParams structure. You can save the resulting state information as part of the
configuration, but the context itself has no corresponding PDF form, and is not saved.
Obtaining
PDOCContextNew
PDOCContextNewWithInitialState
PDOCContextNewWithOCDisabled
PDOCContextInit
PDOCContextMakeCopy
PDOCContextMakeCopyWithAutoStateChanges
PDDocGetOCContext
Disposing
PDOCContextFree
Attributes
Get Set
PDOCContextContentIsVisible
PDOCContextFindAutoStateChanges PDOCContextApplyAutoStateChanges
PDOCContextClearAllUserOverrides
PDOCContextGetNonOCDrawing PDOCContextSetNonOCDrawing
PDOCContextGetOCDrawEnumType PDOCContextSetOCDrawEnumType
Get Set
PDOCContextGetOCGStates PDOCContextSetOCGStates
PDOCContextGetIntent PDOCContextSetIntent
PDOCContextGetPDDoc
PDOCContextPopOCMD PDOCContextPushOCMD
PDOCContextResetOCMDStack
PDOCContextXObjectIsVisible
Declarations
PDOCContextChangeType
PDOCContextInitPolicy
PDOCDrawEnumType
PDOCG
An optional-content group. This corresponds to a PDF OCG dictionary representing a
collection of graphic objects that can be made visible or invisible. Any graphic content of
the PDF can be made optional, including page contents, XObjects, and annotations. The
specific content objects in the group have an OC entry in the PDF. The group itself is a
named object that you can manipulate in the Layers panel of Acrobat 6.0.
In the simplest case, the groups ON-OFF state makes the associated content visible or
hidden. The ON-OFF state of a group can be toggled for a particular context
(PDOCContext), and a set of states is kept in a configuration (PDOCConfig). The visibility
can depend on more than one group in an optional-content membership dictionary
(PDOCMD), and can also be affected by the contexts or configurations
PDOCDrawEnumType.
Obtaining
PDOCGCreate
PDOCGCreateFromCosObj
PDOCGGetFromCosObj
PDOCMDGetOCGs
PDDocGetOCGs
PDPageGetOCGs
Disposing
PDOCGDestroy
Enumerating
PDPageEnumOCGs
PDDocEnumOCGs
Attributes
Get Set
PDOCGGetCurrentState PDOCGSetCurrentState
PDOCGGetInitialState PDOCGSetInitialState
PDOCGRemoveInitialState
PDOCGGetIntent PDOCGSetIntent
PDOCGGetName PDOCGSetName
PDOCGGetPDDoc
PDOCGHasUsageInfo PDOCGSetUsageDictEntry
PDOCGGetUsageEntry
Get Set
PDOCGUsedInOCConfig
PDOCGUsedInOCContext
PDOCGGetUserOverride PDOCGSetUserOverride
Cos conversion
PDOCGGetCosObj
PDOCGGetFromCosObj
PDOCMD
An optional-content membership dictionary (OCMD) that allows the visibility of optional
content to depend on the states in a set of optional-content groups (PDOCG). The object
corresponds to the PDF OCMD dictionary.
An OCMD collects a set of OCGs. It sets a visibility policy, so that content in the member
groups is visible only when all groups are ON or OFF, or when any of the groups is ON or
OFF. This makes it possible to set up complex dependencies among groups.
Obtaining
PDOCMDCreate
PDOCMDFindOrCreate
PDOCMDGetFromCosObj
PDAnnotGetOCMD
PDEElementGetOCMD
Attributes
Get Set
PDOCMDIsCurrentlyVisible PDOCMDsMakeContentVisible
PDOCMDsAreCurrentlyVisible
PDOCMDGetVisPolicy
PDOCMDGetOCGs
PDOCMDGetPDDoc
Cos conversion
PDOCMDGetCosObj
PDOCMDGetFromCosObj
Declarations
PDOCMDVisPolicy
PDPage
A single page in the PDF representation of a document. Just as PDF files are partially
composed of their pages, PDDocs are composed of PDPages. A page contains a series of
objects representing the objects drawn on the page (PDGraphic), a list of resources used
in drawing the page, annotations (PDAnnot), an optional thumbnail image of the page,
and the beads used in any articles that occur on the page. The first page in a PDDoc is page
0.
Obtaining
PDDocCreatePage
PDBeadAcquirePage
PDDocAcquirePage
AVPageViewGetPage
Disposing
PDDocDeletePages
PDPageRelease
Enumerating
PDPageEnumContents (Obsolete in Acrobat 4.0)
PDPageEnumOCGs
PDPageEnumResources
Attributes
Get Set
PDDocAcquirePage
PDPageAcquirePDEContent PDPageSetPDEContent
PDPageSetPDEContentCanRaise
PDPageGetAnnotIndex PDPageAddAnnot
PDPageGetAnnotSequence PDPageAddNewAnnot
PDPageCreateAnnot
PDPageRemoveAnnot
PDPageGetBBox
PDPageGetVisibleBBox
PDPageGetBox PDPageSetBox
PDPageGetCropBox PDPageSetCropBox
PDPageGetMediaBox PDPageSetMediaBox
Get Set
PDPageGetCosResources PDPageAddCosResource
PDPageRemoveCosResource
PDPageDrawContentsToWindow PDPageAddCosContents
PDPageDrawContentsToWindowEx PDPageRemoveCosContents
PDPageDrawContentsWithParams
PDPageDrawContentsPlacedWithParams
PDPageGetDefaultMatrix
PDPageGetFlippedMatrix
PDPageGetDoc
PDPageGetDuration PDPageSetDuration
PDPageGetNumAnnots
PDPageGetNumber
PDPageGetOCGs
PDPageGetPalette
PDPageGetPDEContentFilters PDPageSetPDEContentFilters
PDPageGetPDEContentFlags PDPageSetPDEContentFlags
PDPageGetRotate PDPageSetRotate
PDPageGetTransition PDPageSetTransition
PDPageHasTransition
PDPageFlattenOC
Cos conversion
PDPageGetCosObj
Declarations
PDPageDrawFlags
PDPageMode
PDPageNumber
PDPageRange
PDPageStmToken
PDPageLabel
A label used to describe a page. This is used to allow for non-sequential page numbering or
the addition of arbitrary labels for a page (such as the inclusion of Roman numerals at the
beginning of a book). A PDPageLabel specifies the numbering style to use (for example,
upper- or lower-case Roman, decimal, and so forth), the starting number for the first page,
and an arbitrary prefix to be pre-appended to each number (for example, A- to generate
A-1, A-2, A-3, and so forth.)
Obtaining
PDDocGetPageLabel
PDDocGetLabelForPageNum
PDPageLabelFromCosObj
PDPageLabelNew
Disposing
PDDocRemovePageLabel
Attributes
Get Set
PDPageLabelEqual
PDDocSetPageLabel
PDDocRemovePageLabel
PDPageLabelGetStyle
PDPageLabelGetPrefix
PDPageLabelGetStart
PDDocFindPageNumForLabel
Cos conversion
PDPageLabelGetCosObj
Validity testing
PDPageLabelIsValid
PDPath
A PDPath is a graphic object representing a path in a page description. Paths are arbitrary
shapes made of straight lines, rectangles, and cubic curves. Path objects can be stroked,
filled, and/or serve as a clipping path.
Enumerating
PDPathEnum
Attributes
Get Set
PDPathGetPaintOp
Declarations
PDPathEnumMonitor
PDPathPaintOp
PDStyle
Provides access to information about the fonts, font sizes, and colors used in a PDWord.
Obtaining
PDWordGetNthCharStyle
Attributes
Get Set
PDStyleGetColor
PDStyleGetFont
PDStyleGetFontSize
PDText
A graphic object representing one or more character strings on a page in a PDF file. Like
paths, text can be stroked, filled, and/or serve as a clipping path.
Enumerating
PDTextEnum
Attributes
Get Set
PDTextGetState
PDTextAnnot
A PDF text annotation on a page in a PDF file. You can use any PDAnnot method on a
PDTextAnnot.
Applications can:
Get and set attributes including the rectangle, textual contents, and whether the
annotation is open.
Create new text annotations and delete or move existing ones using PDAnnot
methods.
Manipulate the behavior of text annotations by modifying the Text Annotation Handler.
Obtaining
Any of the PDAnnot calls, followed by CastToPDTextAnnot. The annotation passed
to CastToPDTextAnnot must be a text annotation, it will not convert other annotation
types into text annotations.
Disposing
PDPageRemoveAnnot
Attributes
Get Set
PDTextAnnotGetContents PDTextAnnotSetContents
PDTextAnnotIsOpen PDTextAnnotSetOpen
AVPageViewGetSelectedAnnotPageNum
AVPageViewSetAnnotLocation
PDAnnotEqual
PDAnnotGetColor PDAnnotSetColor
PDAnnotGetDate PDAnnotSetDate
PDAnnotGetFlags PDAnnotSetFlags
PDAnnotGetRect PDAnnotSetRect
PDAnnotGetSubtype
PDAnnotGetTitle PDAnnotSetTitle
Cos conversion
PDAnnotGetCosObj
PDAnnotFromCosObj
Validity testing
PDAnnotIsValid
PDTextSelect
A selection of text on a single page, and may contain more than one disjoint group of
words. A text selection is specified by one or more ranges of text, with each range
containing the word numbers of the selected words. Each range specifies a start and end
word, where start is the first of a series of selected words and end is the first word not in
the series.
Obtaining
AVDocGetSelection
AVPageViewTrackText
PDDocCreateTextSelect
PDTextSelectCreatePageHilite
PDTextSelectCreatePageHiliteEx
PDTextSelectCreateWordHilite
PDTextSelectCreateWordHiliteEx
PDTextSelectCreateRanges
PDTextSelectCreateRangesEx
Disposing
PDTextSelectDestroy
Enumerating
PDTextSelectEnumQuads
PDTextSelectEnumText
Attributes
Get Set
PDTextSelectCreatePageHilite
PDTextSelectCreatePageHiliteEx
PDTextSelectCreateRanges
PDTextSelectCreateRangesEx
PDTextSelectCreateWordHilite
PDTextSelectCreateWordHiliteEx
PDTextSelectGetBoundingRect PDTextSelectGetBoundingRect
PDTextSelectGetPage
PDTextSelectGetRange
PDTextSelectGetRangeCount
Declarations
PDTextSelectRange
PDThread
An article in Acrobats user interface, and contains an ordered sequence of rectangles that
bound the article. Each rectangle is called a bead. Threads can be created interactively by
the user, or programmatically.
Obtaining
PDDocGetThread
PDThreadNew
PDThreadFromCosObj
PDBeadGetThread
Disposing
PDDocRemoveThread
PDThreadDestroy
Attributes
Get Set
PDThreadGetFirstBead PDThreadSetFirstBead
PDThreadGetInfo PDThreadSetInfo
PDBeadInsert
Cos conversion
PDThreadGetCosObj
PDThreadFromCosObj
Validity testing
PDThreadIsValid
PDThumb
A thumbnail preview image of a page.
Obtaining
PDDocCreateThumbs
Disposing
PDDocDeleteThumbs
Declarations
PDThumbCreationServer
PDTrans
A transition to a page. The Trans key in a Page dictionary specifies a Transition dictionary,
which describes the effect to use when going to a page and the amount of time the
transition should take.
Obtaining
PDPageGetTransition
PDTransFromCosObj
PDTransNew
PDTransNewFromCosDoc
PDTransNull
Attributes
Get Set
PDTransEqual
PDTransGetDuration
PDTransGetSubtype
Cos conversion
PDTransFromCosObj
PDTransGetCosObj
Validity testing
PDTransIsValid
Declarations
Transition Duration
PDViewDestination
A particular view of a page in a document. It contains a reference to a page, a rectangle on
that page, and information specifying how to adjust the view to fit the windows size and
shape. It corresponds to a PDF Dest array and can be considered a special form of a
PDAction.
Obtaining
AVPageViewToViewDest
PDActionGetDest
PDViewDestCreate
PDViewDestFromCosObj
PDViewDestResolve
Disposing
PDViewDestDestroy
Attributes
Get Set
PDViewDestGetAttr
Cos Conversion
PDViewDestFromCosObj
PDViewDestGetCosObj
Validity testing
PDViewDestIsValid
PDWord
A word in a PDF file. Each word contains a sequence of characters in one or more styles (see
PDStyle).
Obtaining
PDWordFinderGetNthWord
PDWordFinderEnumWords
Enumerating
PDWordFinderEnumWords
Attributes
Get Set
PDWordGetAttr
PDWordGetCharacterTypes
PDWordGetCharDelta
PDWordGetCharOffset
PDWordGetCharOffsetEx
PDWordGetCharQuad
PDWordGetCharEncFlags
PDWordGetLength
PDWordGetNthCharStyle
PDWordGetNthQuad
PDWordGetNumQuads
PDWordGetNumHiliteChar
PDWordGetByteIdxFromHiliteChar
PDWordGetString
PDWordGetStyleTransition
PDWordIsCurrentlyVisible PDWordMakeVisible
Declarations
Word Attributes
PDWordFinder
Extracts words from a PDF file, and enumerates the words on a single page or on all pages
in a document.
Obtaining
PDDocCreateWordFinderEx
PDDocCreateWordFinder
PDDocCreateWordFinderUCS
PDDocGetWordFinder
Disposing
PDWordFinderDestroy
Enumerating
PDWordFinderEnumWords
PDWordFinderEnumVisibleWords
Attributes
Get Set
PDWordFinderAcquireWordList PDWordFinderReleaseWordList
PDWordFinderGetLatestAlgVersion
PDWordFinderGetNthWord
Declarations
WordFinder Character Encoding Flags
WordFinder Sort Order Flags
PDXObject
A superclass used for PDF XObjects. Acrobat currently uses two XObject subclasses:
PDImage and PDForm. You can use any PDXObject method on these three objects.
Enumerating
PDXObjectEnumFilters
PDXObjectGetData
Attributes
Get Set
PDXObjectGetData
PDXObjectGetDataLength
PDXObjectGetSubtype
Cos Conversion
PDXObjectGetCosObj
P D F Ed i t
Provides easy access to PDF page contents. With PDFEdit, you can treat a pages contents as
a list of objectsrather than having to manipulate the content streams PDF marking
operators.
The PDFEdit API is meant to be used in conjunction with the Acrobat PDModel and Cos APIs
for manipulating PDF documents.
NOTE: The PDFEdit API is not available in Adobe Reader.
PDEBeginContainer
The PDFEdit representation of the opening bracket of a marked-content sequence.
Elements of this type must be paired with elements of type PDEEndContainer.
NOTE: The PDFEdit API is not available in Adobe Reader.
Subclass of
PDEElement
Obtaining
PDEBeginContainerCreate
Disposing
PDERelease
Attributes
Get Set
PDEBeginContainerGetDict PDEBeginContainerSetDict
PDEBeginContainerGetMCTag PDEBeginContainerSetMCTag
PDEBeginGroup
A group of PDEElements on a page in a PDF file.
NOTE: The PDFEdit API is not available in Adobe Reader.
Subclass of
PDEElement
Obtaining
PDEBeginGroupCreate
Disposing
PDERelease
PDEClip
A list of PDEElements containing a list of PDEPaths and PDETexts that describe a clip
state. PDEClips can be created and built up with PDEClip methods. Any PDEElement
object can have PDEClip associated with it.
PDEClip objects can contain PDEContainers and PDEGroups to an arbitrary level of
nesting. This allows PDEContainers to be used to mark clip objects.
PDEGroups inside PDEClips that contain at least one PDEText and no PDEPaths
have a special meaning. All PDEText objects contained in such a PDEGroup are
considered to be part of the same BT/ET block. This means that the union of these
PDETexts makes up a single clipping pathas opposed to the intersection of the
PDETexts.
NOTE: The PDFEdit API is not available in Adobe Reader.
Obtaining
PDEClipCreate
PDEElementGetClip
Disposing
PDERelease
Enumerating
PDEClipFlattenedEnumElems
Attributes
Get Set
PDEClipGetElem
PDEClipGetNumElems
PDEClipAddElem
PDEClipRemoveElems
PDEColorSpace
A reference to a color space used on a page in a PDF file. The color space is part of the
graphics state attributes of a PDEElement.
NOTE: The PDFEdit API is not available in Adobe Reader.
Obtaining
PDEColorSpaceCreate
PDEColorSpaceCreateFromName
PDEImageGetColorSpace
Disposing
PDERelease
Attributes
Get Set
PDEColorSpaceGetBase
PDEColorSpaceGetBaseNumComps
PDEColorSpaceGetCTable
PDEColorSpaceGetHiVal
PDEColorSpaceGetName
PDEColorSpaceGetNumComps
Cos conversion
PDEColorSpaceCreate
PDEColorSpaceGetCosObj
Declarations
PDEColorSpec
PDEColorValue
PDEContainer
A group of PDEElements on a page in a PDF file. In the PDF file, containers are delimited
by Marked Content BMC/EMC or BDC/EMC pairs. Every PDEContainer has a Marked
Content tag associated with it. In addition to grouping a set of elements, a BDC/EMC pair
specifies a property list to be associated with the grouping. Thus a PDEContainer
corresponding to a BDC/EMC pair also has a property list dictionary associated with it.
NOTE: The PDFEdit API is not available in Adobe Reader.
Subclass of
PDEElement
Obtaining
PDEContainerCreate
PDSMCGetPDEContainer
Disposing
PDERelease
Attributes
Get Set
PDEContainerGetContent PDEContainerSetContent
PDEContainerGetDict PDEContainerSetDict
PDEContainerGetMCTag PDEContainerSetMCTag
PDEContent
Contains the modifiable contents of a PDPage. A PDEContent may be obtained from an
existing page or from a Form XObject or from a Type 3 CharProc. You can create an empty
PDEContent. A PDEContent contains PDEElements. In addition, a PDEContent may
have attributes such as Form matrix and setcachedevice parameters.
NOTE: The PDFEdit API is not available in Adobe Reader.
Obtaining
PDEContentCreate
PDEContainerGetContent
PDEContentCreateFromCosObj
PDEFormGetContent
PDPageAcquirePDEContent
Disposing
PDERelease
Attributes
Get Set
PDEContentGetAttrs
PDEContentGetElem
PDEContentGetNumElems
PDEContentGetResources
PDEContentAddElem
PDEContentRemoveElem
PDEContentFlattenOC
Cos conversion
PDEContentCreateFromCosObj
PDEContentToCosObj
Declarations
PDEContentAttrs
PDEContentFlags
PDEContentToCosObjFlags
PDEDeviceNColors
A color space with a variable number of device-dependent components. Usually used to
store multiple spot colors in a single color space.
NOTE: The PDFEdit API is not available in Adobe Reader.
Obtaining
PDEDeviceNColorsCreate
Attributes
Get Set
PDEDeviceNColorsGetColorValue
PDEElement
The base class for elements of a page display list (PDEContent) and for clip objects. The
general PDEElement methods allow you to get and set general element properties.
NOTE: The PDFEdit API is not available in Adobe Reader.
Subclasses
PDEContainer
PDEForm
PDEGroup
PDEImage
PDEPath
PDEPlace
PDEPS
PDEShading
PDEText
PDEUnknown
PDEXObject
Obtaining
PDEClipGetElem
PDEContentGetElem
PDEElementCopy
Disposing
PDERelease
Attributes
Get Set
PDEElementGetBBox
PDEElementGetClip
PDEElementGetGState PDEElementSetGState
PDEElementGetMatrix PDEElementSetMatrix
PDEElementGetOCMD PDEElementRemoveOCMD
PDEElementSetOCMD
PDEElementIsAtPoint
PDEElementIsAtRect
Get Set
PDEElementIsCurrentlyVisible PDEElementMakeVisible
PDEElementGetAllVisibilities
Declarations
PDEElementCopyFlags
PDEEnumElementsFlags
PDEGraphicStateP
PDEGraphicStateWasSetFlags
PDEEndContainer
The PDFEdit representation of the closing bracket of a marked-content sequence. Elements
of this type must be paired with elements of type PDEBeginContainer.
NOTE: The PDFEdit API is not available in Adobe Reader.
Subclass of
PDEElement
Obtaining
PDEEndContainerCreate
Disposing
PDERelease
PDEEndGroup
A group of PDEElements on a page in a PDF file.
NOTE: The PDFEdit API is not available in Adobe Reader.
Subclass of
PDEElement
Obtaining
PDEEndGroupCreate
Disposing
PDERelease
PDEExtGState
A reference to an ExtGState resource used on a page in a PDF file. It specifies a
PDEElements extended graphics state, which is part of its graphics state.
NOTE: The PDFEdit API is not available in Adobe Reader.
Obtaining
PDEExtGStateCreate
Disposing
PDERelease
Attributes
Get Set
PDEExtGStateGetAIS PDEExtGStateSetAIS
PDEExtGStateGetBlendMode PDEExtGStateSetBlendMode
PDEExtGStateGetOpacityFill PDEExtGStateSetOpacityFill
PDEExtGStateGetOpacityStroke PDEExtGStateSetOpacityStroke
PDEExtGStateGetOPFill PDEExtGStateSetOPFill
PDEExtGStateGetOPM PDEExtGStateSetOPM
PDEExtGStateGetOPStroke PDEExtGStateSetOPStroke
PDEExtGStateGetSA PDEExtGStateSetSA
PDEExtGStateSetSoftMask
PDEExtGStateGetTK PDEExtGStateSetTK
Cos conversion
PDEExtGStateGetCosObj
PDEFont
A reference to a font used on a page in a PDF file. It may be equated with a font in the
system. A PDEFont is not the same as a PDFont; a PDFont is associated with a particular
document.
NOTE: The PDFEdit API is not available in Adobe Reader.
Obtaining
PDEFontCreate
PDEFontCreateFromCosObj
PDEFontCreateFromSysFont
PDEFontCreateFromSysFontEx
PDEFontCreateWithParams
PDETextGetFont
Disposing
PDERelease
Attributes
Get Set
PDEFontCreateWithParams
PDEFontEmbedNow
PDEFontEmbedNowDontSubset
PDEFontGetCreateNeedFlags
PDEFontGetNumCodeBytes
PDEFontGetOneByteEncoding
PDEFontGetSysEncoding PDEFontSetSysEncoding
PDEFontGetSysFont PDEFontSetSysFont
PDEFontGetWidths
PDEFontGetWidthsNow
PDEFontIsEmbedded
PDEFontIsMultiByte
PDEFontSubsetNow
PDEFontSumWidths
Cos conversion
PDEFontCreateFromCosObj
PDEFontGetCosObj
Declarations
PDEFontAttrs
PDEFontCreateFlags
PDEFontInfoP
PDEForm
A PDEElement that corresponds to an instance of an XObject Form on a page (or other
containing stream such as another XObject Form or annotation form). The context
associated with this instance includes the actual CosObj stream that represents the
XObject Form and the initial conditions of the graphics state. The latter consists of the
transformation matrix, initial color values, and so forth. It is possible to have two
PDEForms that refer to the same XObject Form. The forms will exist at different places
on the same page, depending on the transformation matrix. They may also have different
colors or line stroking parameters. In the case of a transparency group, the opacity is
specified in the gstate.
Within a PDEForm, each PDEElement has its own gstate (or is a container, place, or
group object). These gstates are independent of the parent PDEForm gstate. PDEForm
elements within the PDEForm may have their own opacity.
A PDEContent may be obtained from a PDEForm to edit the forms display list.
NOTE: The PDFEdit API is not available in Adobe Reader.
Subclass of
PDEElement
Obtaining
PDEFormCreateFromCosObj
PDEFormCreateClone
Disposing
PDERelease
Attributes
Get Set
PDEFormGetContent PDEFormSetContent
PDEFormSetXGroup
Cos conversion
PDEFormCreateFromCosObj
PDEFormGetCosObj
PDEGroup
An in-memory representation of objects in a PDEContent. It has no state and is not
represented in any way in a PDF content stream (that is, PDEContent).
When used in a PDEClip, this object is used to associate PDEText objects into a single
clipping object.
NOTE: The PDFEdit API is not available in Adobe Reader.
Obtaining
PDEGroupCreate
Attributes
Get Set
PDEGroupGetContent PDEGroupSetContent
PDEImage
A PDEElement that contains an Image XObject or in-line image. You can associate data
or a stream with an image.
NOTE: The PDFEdit API is not available in Adobe Reader.
Subclass of
PDEElement
Obtaining
PDEImageCreate
PDEImageCreateFromCosObj
Disposing
PDERelease
Attributes
Get Set
PDEImageDataIsEncoded
PDEImageGetAttrs
PDEImageGetColorSpace PDEImageSetColorSpace
PDEImageGetData PDEImageSetData
PDEImageGetDataLen
PDEImageGetDataStm PDEImageSetDataStm
PDEImageGetFilterArray
PDEImageGetMatteArray PDEImageSetMatteArray
PDEImageGetSMask PDEImageSetSMask
PDEImageIsCosObj
Cos conversion
PDEImageCreateFromCosObj
PDEImageGetCosObj
Declarations
PDEImageAttrFlags
PDEImageAttrs
PDEImageDataFlags
PDEImageFlate
A PDEElement representing a flate (ZIP) graphic object.
NOTE: The PDFEdit API is not available in Adobe Reader.
Obtaining
PDEImageAcquireImageFlate
Disposing
PDERelease
Enumerating
PDEObjectDump
Attributes
Get Set
PDEImageFlateGetAttrs
Cos Conversion
PDEImageFlateGetCosObj
PDEImageJPX
A PDEElement representing a JPX graphic object.
NOTE: The PDFEdit API is not available in Adobe Reader.
Obtaining
PDEImageAcquireImageJPX
Disposing
PDERelease
Enumerating
PDEObjectDump
Attributes
Get Set
PDEImageJPXGetAttrs
Cos Conversion
PDEImageFlateGetCosObj
PDEObject
The abstract super class of PDFEdit classes. You can find the type of any object with the
PDEObjectGetType method. You can then cast and apply that classs methods to the
object. In addition, you can cast any of the PDFEdit objects to a PDEObject and use it
anywhere a PDEObject is called for, such as in the PDEObject methods.
NOTE: The PDFEdit API is not available in Adobe Reader.
Obtaining
Various since all PDFEdit objects are PDEObjects.
Disposing
PDERelease
Enumerating
PDEObjectDump
Attributes
Get Set
PDEGetTag PDEAddTag
PDERemoveTag
PDEObjectGetType
PDEAcquire
PDERelease
Declarations
PDEType
PDEPath
A PDEElement that contains a path. Path objects can be stroked, filled, and/or serve as a
clipping path.
NOTE: The PDFEdit API is not available in Adobe Reader.
Subclass of
PDEElement
Obtaining
PDEPathCreate
Disposing
PDERelease
Attributes
Get Set
PDEPathGetData PDEPathSetData
PDEPathGetPaintOp PDEPathSetPaintOp
PDEPathAddSegment
Declarations
PDEPathElementType
PDEPathOpFlags
PDEPattern
A reference to a Pattern resource used on a page in a PDF file.
NOTE: The PDFEdit API is not available in Adobe Reader.
Obtaining
PDEPatternCreate
Disposing
PDERelease
Cos conversion
PDEPatternGetCosObj
PDEPlace
A PDEElement that marks a place on a page in a PDF file. In a PDF file, a place is
represented by the MP or DP Marked Content operators.
Marked content is useful for adding structure information to a PDF file. For instance, a
drawing program may want to mark a point with information, such as the start of a path of
a certain type. Marked content provides a way to retain this information in the PDF file. A
DP operator functions the same as the MP operator and, in addition, allows a property list
dictionary to be associated with a place.
NOTE: The PDFEdit API is not available in Adobe Reader.
Subclass of
PDEElement
Obtaining
PDEPlaceCreate
Disposing
PDERelease
Attributes
Get Set
PDEPlaceGetDict PDEPlaceSetDict
PDEPlaceGetMCTag PDEPlaceSetMCTag
PDEPS
Element representing in-line or XObject pass-through PostScript object. XObject
PostScripts are listed in page XObject resources.
NOTE: The PDFEdit API is not available in Adobe Reader.
Subclass of
PDEElement
Obtaining
PDEPSCreate
PDEPSCreateFromCosObj
Attributes
Get Set
PDEPSGetAttrs
PDEPSGetData PDEPSSetData
PDEPSGetDataStm PDEPSSetDataStm
Cos conversion
PDEPSCreateFromCosObj
PDEShading
A PDEElement that represents smooth shading.
NOTE: The PDFEdit API is not available in Adobe Reader.
Obtaining
PDEShadingCreateFromCosObj
Cos conversion
PDEShadingCreateFromCosObj
PDEShadingGetCosObj
PDESoftMask
Object for creating and manipulating a soft mask in a PDF file.
NOTE: The PDFEdit API is not available in Adobe Reader.
Subclass of
PDEElement
Obtaining
PDESoftMaskCreate
PDESoftMaskCreateFromCosObj
PDESoftMaskCreateFromName
Disposing
PDERelease
Attributes
Get Set
PDESoftMaskAcquireForm
PDESoftMaskGetBackdropColor PDESoftMaskSetBackdropColor
PDESoftMaskGetCosObj
PDESoftMaskGetName
PDESoftMaskGetTransferFunction PDESoftMaskSetTransferFunction
PDESoftMaskSetXGroup
Cos conversion
PDESoftMaskGetCosObj
PDESoftMaskCreateFromCosObj
PDEText
A PDEElement representing text. It is a container for text as show strings or as individual
characters. Each sub-element may have different graphics state properties. However, the
same clip applies to all sub-elements of a PDEText. Also, the charpath of a PDEText
can be used to represent a clip.
NOTE: The PDFEdit API is not available in Adobe Reader.
Subclass of
PDEElement
Obtaining
PDETextCreate
Disposing
PDERelease
Attributes
Get Set
PDETextGetAdvance
PDETextGetAdvanceWidth
PDETextGetBBox
PDETextGetFont PDETextRunSetFont
PDETextGetGState PDETextRunSetGState
PDETextGetItem PDETextAddItem
PDETextRemoveItems
PDETextGetMatrix
PDETextGetNumBytes
PDETextGetNumRuns
PDETextGetQuad
PDETextGetRunForChar
PDETextGetStrokeMatrix PDETextRunSetStrokeMatrix
PDETextGetState PDETextRunSetState
PDETextGetText
Get Set
PDETextGetTextMatrix PDETextRunSetTextMatrix
PDETextGetTextState PDETextRunSetTextState
PDETextRunGetCharOffset
PDETextRunGetNumChars
PDETextRunSetMatrix
PDETextRunSetState
PDETextRunSetMatrix
PDETextRunSetStrokeMatrix
PDETextIsAtPoint
PDETextAdd
PDETextIsAtPoint
PDETextReplaceChars
PDETextSplitRunAt
Declarations
PDEGraphicStateP
PDEGraphicStateWasSetFlags
PDETextFlags
PDETextRenderMode
PDETextState
PDETextStateWasSetFlags
PDETextItem
A PDEElement representing a text object.
NOTE: The PDFEdit API is not available in Adobe Reader.
Subclass of
PDEElement
Obtaining
PDETextItemCreate
PDETextGetItem
Attributes
Get Set
PDETextItemCopyText
PDETextItemGetFont PDETextItemSetFont
PDETextItemGetGState PDETextItemSetGState
PDETextItemGetTextLen
PDETextItemGetTextMatrix PDETextItemSetTextMatrix
PDETextItemGetTextState PDETextItemSetTextState
PDETextItemRemoveChars
PDETextItemReplaceChars
PDETextItemReplaceText
PDEUnknown
A PDEElement representing an unknown element.
NOTE: The PDFEdit API is not available in Adobe Reader.
Subclass of
PDEElement
Attributes
Get Set
PDEUnknownGetOpName
PDEXGroup
A transparency (XGroup) resource.
NOTE: The PDFEdit API is not available in Adobe Reader.
Subclass of
PDEElement
Obtaining
PDEXGroupCreate
PDEXGroupCreateFromCosObj
Disposing
PDERelease
Attributes
Get Set
PDEXGroupAcquireColorSpace
PDEXGroupGetCosObj
PDEXGroupGetIsolated PDEXGroupSetIsolated
PDEXGroupGetKnockout PDEXGroupSetKnockout
PDEXGroupSetColorSpace
Cos conversion
PDEXGroupGetCosObj
PDEXGroupCreateFromCosObj
PDEXObject
A PDEElement representing an arbitrary XObject.
NOTE: The PDFEdit API is not available in Adobe Reader.
Subclass of
PDEElement
Obtaining
PDEXObjectCreate
Disposing
PDERelease
Cos conversion
PDEXObjectGetCosObj
PDSysEncoding
A PDEElement that provides system encoding for a PDF file.
NOTE: The PDFEdit API is not available in Adobe Reader.
Subclass of
PDEElement
Obtaining
PDSysEncodingCreateFromBaseName
PDSysEncodingCreateFromCMapName
PDSysEncodingCreateFromCodePage
PDEFontGetSysEncoding
Disposing
PDERelease
Attributes
Get Set
PDSysEncodingGetWMode
PDSysFont
A reference to a font installed in the host system. PDSysFont methods allow you to list
the fonts available in the host system and to find a font in the system that matches a
PDEFont, if it is present.
NOTE: The PDFEdit API is not available in Adobe Reader.
Obtaining
PDEnumSysFonts
PDFindSysFont
PDFindSysFontEx
PDFindSysFontForPDEFont
PDEFontGetSysFont
Enumerating
PDEnumSysFonts
Attributes
Get Set
PDSysFontAcquirePlatformData PDSysFontReleasePlatformData
PDSysFontGetAttrs
PDSysFontGetCIDSystemInfo
PDSysFontGetCreateFlags
PDSysFontGetEncoding
PDSysFontGetInfo
PDSysFontGetName
PDSysFontGetType0Widths
PDSysFontGetWidths
PDSysFontGetWidthsEx
PDEmbedSysFontForPDEFont
Declarations
PDSysFontMatchFlags
P D S Ed i t
The creation and manipulation of logical structure in PDF documents.
NOTE: The write functions in the PDSEdit API are not available in Adobe Reader.
PDSAttrObj
Represents PDF logical structure attribute objects, which are dictionaries containing
application-specific data that can be attached to PDSElements.
NOTE: The write functions in the PDSEdit API are not available in Adobe Reader.
Obtaining
PDSAttrObjCreate
PDSAttrObjCreateFromStream
PDSClassMapGetAttrObj
PDSElementGetAttrObj
Disposing
PDSElementRemoveAttrObj
PDSElementRemoveAllAttrObjs
Attributes
Get Set
PDSAttrObjGetCosObj
PDSAttrObjGetOwner
PDSClassMap
Associates class identifiers, which are names, with objects of type PDSAttrObj. Structural
elements maintain a list of names identifying classes to which they belong. The associated
attributes are thus shared by all structural elements belonging to a given class. There is one
class map per document, associated with the PDSTreeRoot.
NOTE: The write functions in the PDSEdit API are not available in Adobe Reader.
Obtaining
PDSTreeRootCreateClassMap
PDSTreeRootGetClassMap
Disposing
PDSTreeRootRemoveClassMap
Attributes
Get Set
PDSClassMapAddAttrObj
PDSClassMapRemoveAttrObj
PDSClassMapGetAttrObj
PDSClassMapGetNumAttrObjs
PDSElement
Represents PDF structural elements, which are nodes in a tree giving a PDF documents
logical structure.
NOTE: The write functions in the PDSEdit API are not available in Adobe Reader.
Obtaining
PDSElementCreate
PDSElementGetParent
PDSMCGetInfo
PDSOBJGetParent
PDSTreeRootGetElementFromID
Attributes
Get Set
PDSElementAddAttrObj
PDSElementRemoveAttrObj
PDSElementRemoveAllAttrObjs
PDSElementAddClass
PDSElementRemoveClass
PDSElementRemoveAllClasses
PDSElementGetActualText PDSElementSetActualText
PDSElementGetAlt PDSElementSetAlt
PDSElementGetAttrObj
PDSElementGetNumAttrObjs
PDSElementGetClass
PDSElementGetNumClasses
PDSElementGetCosObj
PDSElementGetFirstPage
PDSElementGetID PDSElementClearID
PDSElementSetID
Get Set
PDSElementGetKid PDSElementInsertKid
PDSElementGetKidEx PDSElementInsertMCAsKid
PDSElementGetKidWithMCInfo PDSElementInsertOBJAsKid
PDSElementGetNumKids PDSElementInsertStmMCAsKid
PDSElementGetParent PDSElementReplaceKid
PDSElementRemoveKid
PDSElementRemoveKidOBJ
PDSElementRemoveKidMC
PDSElementReplaceKidMC
PDSElementGetLanguage PDSElementSetLanguage
PDSElementGetRevision PDSElementIncrementRevision
PDSElementGetTitle PDSElementSetTitle
PDSElementGetType PDSElementSetType
PDSMC
Represents marked contentportions of the graphic content of a PDF document that may
be included in the documents logical structure hierarchy. This type is identical with the
PDFEdit layer type PDEContainer.
NOTE: The write functions in the PDSEdit API are not available in Adobe Reader.
Attributes
Get Set
PDSMCGetInfo
PDSMCGetParent
PDSMCIDGetParent
PDSMCGetPDEContainer
Declarations
PDSMCInfo
PDSRoleMap
Represents mappings of structural element types present in a PDF document to standard
element types having similar uses. There is one PDSClassMap per document, associated
with the PDSTreeRoot.
NOTE: The write functions in the PDSEdit API are not available in Adobe Reader.
Obtaining
PDSRoleMapCopy
PDSTreeRootCreateRoleMap
PDSTreeRootGetRoleMap
Disposing
PDSTreeRootRemoveRoleMap
Attributes
Get Set
PDSRoleMapCopy
PDSRoleMapGetDirectMap
PDSRoleMapDoesMap PDSRoleMapMap
PDSRoleMapUnMapDst
PDSRoleMapUnMapSrc
PDSTreeRoot
The root of the structure tree, which is a central repository for information related to a PDF
documents logical structure. There is at most one PDSTreeRoot in each document.
NOTE: The write functions in the PDSEdit API are not available in Adobe Reader.
Obtaining
PDDocCreateStructTreeRoot
PDDocGetStructTreeRoot
Disposing
PDDocRemoveStructTreeRoot
Attributes
Get Set
PDSTreeRootGetClassMap PDSTreeRootRemoveClassMap
PDSTreeRootGetElementFromID
PDSTreeRootGetKid PDSTreeRootInsertKid
PDSTreeRootRemoveKid
PDSTreeRootGetNumKids
PDSTreeRootGetRoleMap PDSTreeRootRemoveRoleMap
PDSTreeRootReplaceKid
PDSTreeRootReplaceStreamRef
Some of Acrobats default plug-ins expose their APIs for use by third parties. These are
Acrobats extended APIs. They are described in this chapter. The AcroColor extended API is
the only extended API that is not in a plug-in: it is part of the Acrobat core, but is considered
an extended API because it does not cleanly fit into the layered structure of the core. The
actual APIs themselves are documented in the Acrobat and PDF Library API Reference. An
overview is provided here. The extended APIs are the following:
Search Extended API
Catalog Extended API
PDF Consultant (Scrubber) and Accessibility Checker Extended API
Digital Signature (DigSig) Extended API
Forms Extended API
Weblink Extended API
Spelling Extended API
AcroColor Extended API
Search DDE
This technical note describes the Search HFT. The IAC APIs supported by the Acrobat Search
plug-in are described in the Acrobat IAC Overview and the Acrobat IAC Reference.
Search APIs
The Search APIs include:
SearchAddIndex
SearchAddIndexEx
SearchCountIndexList
SearchExecuteQuery
SearchExecuteQueryEx
SearchGetIndexByPath
SearchGetIndexByPathEx
SearchGetIndexFlags
SearchGetIndexList
SearchGetIndexPath
SearchGetIndexPathEx
SearchGetIndexFileSys
SearchGetIndexTitle
SearchGetIndexTitleEx
SearchGetNthIndex
SearchIsLegacySearchAvailable
SearchRemoveIndex
SearchSetIndexFlags
Catalog DDE
This technical note describes the Catalog HFT. The IAC APIs supported by the Acrobat
Catalog plug-in are described in the Acrobat IAC Overview and the Acrobat IAC Reference.
Catalog APIs
The Catalog APIs include:
CatalogActivate
CatalogBuildIndex
CatalogGiveStatus
CatalogLoadIndex
CatalogPurgeIndex
other statistics. It can make certain modifications or repairs to the PDF document. The
objects that the Consultant visits can range from simple, primitive types such as CosStrings
to higher-level objects such as Images. Users call the Consultant to run on a particular PDF
document, choose which tests or repairs to run, then view the results and/or select repair
options.
The Consultant visits the objects in a PDF document according to instructional flags you
pass to it. After the Consultant has visited an object, the object may be different. The
Consultant reclassifies modified objects before moving on to the next object.
As the Consultant traverses a PDF document, gathering objects of interest, it can perform
the following functions:
walk a given hierarchy
keep track of cycles
ensure that objects are only visited once, if desired
recognize object types
keep a traversal stack list
Acrobat Agents
The Consultant accomplishes its task by using Agents, which are pieces of code you design
to gather the statistics and recommend to the Consultant the necessary repairs of the
document. Separate Agents handle each area of analysis and repair. The Agents inform the
Consultant of the particular types of objects in which they are interested by registering
with the Consultant. When the Consultant has one or more Agents registered, it hands each
object of the requested type(s) in the current document to each of the Agents that
requested that type. The Consultant gives objects to each Agent in turn, depending on the
order in which they registered.
The Consultant must intelligently determine the type of each object it comes across (both
direct and indirect), so it can pass appropriate objects to the Agents, or replace or remove
ones that it has been instructed to handle itself. The Consultant communicates directly
with Agents, keeping lists of which Agents are interested in which objects, and obtaining
instructions from the Agent as to an objects visitation status.
Agents can perform their own repairs and modifications to the PDF document, and can
return a corrected object to serve as a replacement for the object the Consultant originally
passed to it. Agents can also modify the Cos graph themselves (including adding or
removing Cos objects or modifiying the contents such as keys or array elements).
The Consultant keeps a list of each object (starting with the object which began the
traversal) that it visits on its way to any given object. Agents must be careful not to make
any modifications that would affect any of the objects in this list, which is referred to as the
traversal stack. For this reason, Agents can specify a post-processing callback that the
Consultant calls once it has finished traversing the entire document. See Important Issues
For Consultant Development for more detailed information on this point.
section, that same object is actually a form field. It is because of such possible dualities that
the Consultant can operate in a "revisit upon reclassify" mode that would visit the above
object twice: once as a Widget Annotation and again as a form field.
Consultant Itinerary
The Consultant process works like this (See the Acrobat and PDF Library API Reference for
details on how to write the actual code to do these steps.):
1. You create a Consultant.
2. You create an Agent.
3. Register your Agent with the Consultant, with information as to which object types are
of interest.
4. The user calls the Consultant to work on a particular PDF document.
5. The Consultant creates a traversal stack to keep track of where it is in walking through
the PDF document.
6. The Consultant begins traversing the PDF document. If Agents have instructed the
Consultant to modify or remove the object, it does so, returning the appropriate
replacement.
7. The Consultant pushes the object onto the traversal stack and sends a message to the
Agent that the object was found.
8. The Agent sends messages to the Consultant about what to do to objects: replace them,
remove them, revisit them later or not.
9. When the entire PDF document has been traversed, the Consultant calls the Agent back
to perform any postprocessing repairs it might want to do.
10.Consultant unregisters all Agents.
11.Remove the Agent object.
12.Remove the Consultant object.
Agents must not modify objects on the traversal stack while the Consultant is still
walking through the document, otherwise infinite loops and other problems can occur.
Decide which piece of code is actually going to do the workthe Consultant or the
Agentin order to optimize your plug-in.
The order in which Agents interact with the Consultant is very important, as Agents can
modify objects that other Agents want to see.
Maintaining the Traversal Stack
The Consultant keeps track of the objects it has visited in the PDF document in the traversal
stack. If an Agent were to modify an object such that it affected the traversal stack, the
entire process would be derailed.The Consultant might no longer know if it had visited an
object, which could cause infinite loops, multiple, unnecessary visitations, or objects that
remain unvisited. It is extremely important that the integrity of the traversal stack remain
undamaged. You must design your Agent carefully so as to avoid this problem. You can use
the postprocessing step of your Agent to handle many repair tasks, thereby avoiding
dealing with objects still on the traversal stack.
Deciding Who Does The Work
If the Consultant performs object modifications it does so as it goes through its traversal.
Modifications that might affect the objects type or properties would alter the traversal
stack and corrupt the traversal process. For these kinds of modifications, set up an Agent to
perform the tasks in the postprocessing step.
For instance, suppose an Agent wants to remove annotations while there are form widgets
present in the document. There are a few ways the Agent can remove the annotions while
the Consultant is working, but they all have problems:
Calling the Agent for all annotations and removing them at the Cos level does not clean
up the forms tree if there are Widget Annots in the document.
Calling the Agent for all Annots and using PDPageAnnotRemove modifies the page
object, which might still be in the traversal stack.
The best solution in this case is to enumerate all of the Annot objects by having the
Consultant look for Annot objects and keep a list of them, then let the Agent call
PDPageAnnotRemove on them in the postprocessing step.
Avoiding Agent Collisions
When running multiple Agents on a document, the order in which you register your Agents
is the order in which the Consultant will hand them objects. If your earlier Agents modify
objects, they may change the objects in such a way that they are missing important
information or are of a different type than they were originally. For example, one Agent
might consider it correct to remove a given field of an object, while another would
complain that the field was not present and would want to add it. If the first Agent modified
an object with respect to its type, subsequent Agents would no longer think they were
interested in it, and their processing would not take place. You must group your Agents so
that you do not run multiple Agents with conflicting goals at the same time.
A rarer problem could occur with self-referential objects. For example, if Dict A contains a
reference to itself and the first Agent replaces Dict A with Dict B (which would still contain a
reference to Dict A), another Agent cannot work with Dict B until the internal reference is
changed. But if you are running the Agents concurrently, there will be a collision. This
would be a case best handled by the Consultant.
Avoiding Visitation Collisions
Objects that have multiple classifications can be reached from multiple paths. In such cases
you might allow the Consultant to revisit such objects if, and only if, they have been
reclassified on a new path. However, you must take care not to allow revisitation under
other circumstances, or the Consultant could miss objects, which would defeat the reason
for using a mode that considers object classification.
HFT Functions
The Consultant defines the following functions for HFT usage:
ConsultantCreate
ConsultantDestroy
ConsultantTraverseFrom
ConsultantRegisterAgent
ConsultantSetStart
ConsultantNextObj
ConsultantGetPercentDone
ConsultantGetNumDirectVisited
ConsultantGetNumIndirectVisited
ConsultantSuspend
ConsultantResume
ConsStackGetCount
ConsStackIndexGetObj
ConsStackIndexGetTypeCount
ConsStackIndexGetTypeAt
ConsStackIndexIsDict
ConsStackIndexIsArray
ConsStackIndexGetDictKey
ConsStackIndexGetArrayIndex
PDFObjTypeGetSuperclass
ConsultantGetNumUniqueIndirectsVisited
wish to keep it running. See Example: Registering An Agent With A Consultant for an
illustration of creating and destroying a Consultant object.
AVSysSetCursor( hWaitCursor );
DURING
AVDoc hAVDoc = AVAppGetActiveDoc();
miAssert( hAVDoc != ( AVDoc )NULL );
if((gDumpAllObjectsAgent == (DumpAllObjectsAgent*)NULL)
|| (gDumpAllObjectsAgent->IsValid() == false))
{
ASRaise( GenError( genErrNoMemory ) );
}
else
{
ConsultantRegisterAgent(hConsultant,
*gDumpAllObjectsAgent,
REG_REVISITRECLASS_ALL );
/* Start the Consultant */
ConsultantTraverseFrom(hConsultant,
CosDocGetRoot(PDDocGetCosDoc(hPDDoc)),PT_CATALOG);
}
}
}
HANDLER
... Destroy Consultant...Free Memory...
END_HANDLER
if( hConsultant != ( Consultant )NULL )
ConsultantDestroy( hConsultant );
if( gDumpAllObjectsAgent != ( DumpAllObjectsAgent* )NULL )
{
delete gDumpAllObjectsAgent;
gDumpAllObjectsAgent = ( DumpAllObjectsAgent* )NULL;
}
AVSysSetCursor( hCurrentCursor );
most use to you. If the Consultant cannot identify a particular object, for one reason or
another, it assigns the identity of PT_UNKNOWN to the object. Just because the Consultant
assigns this value to an object does not mean the object is foreign or malformed (although
it can potentially mean that), it may simply mean that the object type is not particularly
significant in the realm of the PDF Document Format, and thus the Consultant does not
know about it.
Object Type Subclassing
To allow for greater Agent flexibility, the Consultant understands PDF Object Type
subclasses and superclasses. Certain PDF Object Types are members of more generic
classes of PDF Object Type. Agents can often make use of this information, so the
Consultant assigns object types that are actually arrays of types.
The Consultant assigns to an object the most specific classification as well as the more
generic classes of which the object is a member. Agent structures include a field called
"WantSubclasses" that indicates whether or not the Agent wants be called for all the
interesting objects subclasses as well as their directly interesting types.
For example, the PDF Object Type PT_ANNOTATION has a number of more specific
subclasses such as PT_LINKANNOTATION, PT_LINEANNOTATION, and so on. If an
Agent requests only objects of type PT_ANNOTATION, and its WantSubclasses member is
false, it may not be called back for very many objects. If the WantSubclasses member is true,
then the Consultant will call the Agent back for objects of all specific types of annotations
as well as those classified only as PT_ANNOTATION. This also means that when an Agent
retrieves the type of an object, it must specify which type it wants. The types in the array
that is the classification of the object always go from the most specific (at index 0) to the
least specific (the last index in the array).
#include "ConsExpt.h"
class DumpAllObjectsAgent : public ConsultantAgentObj
{
protected:
// ----------------- Data Members --------------------
FILE* m_DumpFile;
public:
// --------------- Constructor / Destructor ------------------------
DumpAllObjectsAgent( PDDoc hPDDoc );
virtual ~DumpAllObjectsAgent( void );
Agent Constructors
In order to write an Agent class derived from the ConsultantAgentObj baseclass, you
must call the base constructor in the derived class construction list. The base constructor
requires a constant array of so-called objects of interest (of type PDFObjType) as well as
the length of the array (as ASUns32) to be passed as parameters. It is up to you as to where
and how the array of types is stored; however the storage must persist, as the base class
saves only a pointer to the data. This has important implications for authoring agents; the
derived class cannot initialize the data in its own constructor since the base constructor will
be called first.
The following example shows an example constructor. In the example Agent the array of
types and array length are static data members of the Agent class. In larger-scale systems
it is better to create a host object for the Agent that will be responsible for determining
the proper objects to include in the array and passing them on to the Agent constructor.
The list of object types is passed on to the Consultant when
ConsultantRegisterAgent is called.
The traversal path illustrates the "hierarchy" of types that the PDF Consultant and
Accessibility Checker assigns to some objects (for example, a PT_TEXTANNOTATION is
also listed as PT_ANNOTATION).
The Consultant will look at all Cos objects. To simplify the output, the DumpAllObjects
agent only involves the most useful Cos objectsCosString, CosDict, CosArray,
and CosStream.
The Post Processing Stage
The second and final required function definition in any ConsultantAgentObj derived
class is the PostProcess callback. This function is called when the Consultant has
finished its traversal and is preparing to unregister agents to prepare for the next possible
run. This callback takes no parameters and returns no values (see
ConsAgentPostProcessCallback). There are also no restrictions on what types of
operations the Agent can perform on the document in this function.
The PostProcess callback function is the place to perform any operations that might
otherwise damage Consultants traversal by modifying objects up the Consultants current
traversal stack.
The PostProcess callback function should also perform any cleanup that cannot be
done in the Agent destructor. The example Agent in Example: Minimal Agent Class
Definition does not need to do any complicated processing, but simply indicates the end of
the output log for this run.
Consultant APIs
The Consultant APIs include:
ConsultantCreate
ConsultantDestroy
ConsultantRegisterAgent
ConsultantResume
ConsultantSetStart
ConsultantSuspend
ConsultantTraverseFrom
PDFObjTypeGetSuperclass
ConsStackGetCount
ConsStackIndexGetArrayIndex
ConsStackIndexGetDictKey
ConsStackIndexGetObj
ConsStackIndexGetTypeAt
ConsStackIndexGetTypeCount
ConsStackIndexIsArray
ConsStackIndexIsDict
ConsultantGetNumDirectVisited
ConsultantGetNumIndirectVisited
ConsultantGetNumUniqueIndirectsVisited
ConsultantGetPercentDone
ConsultantNextObj
Plug-in Relationships
The following figure illustrates the security plug-in relationships.
Adobe Acrobat
Acrobat API PDCrypt
PubSec
PubSecHFT
Microsoft OS User
PKCS#12 Contact
File File
CSP CSP CSP ...
Register and unregister handlers. Handlers can register as PubSec handlers to provide
the following cryptographic services:
Do private-key signing and signature validation
Act as a cryptographic source for decrypting using private keys
Act as a directory source for certificate-based identity authentication
Handlers can call back into the PubSec HFT for various services. Most calls to PubSec pass
an opaque state object called a PSEngine. You specify a default engine upon registering the
handler, and the default engine can make use of the security UI dialogs provided by PubSec
and DigSig.
To register a handler with PubSec:
1. Implement the callbacks you need to provide customized functionality. Many of the
callbacks for PubSec can be specified as NULL, in which case PubSec provides default
behavior. It is recommended that you use the default behavior when possible.
2. Fill in the handler structure with pointers to your callback implementations
(PubSecHandler).
3. Register the handler with PubSec (PSRegisterHandler).
2. The Forms plug-in also creates Signature fields. If the user creates a signature field and
specifies a default method, Forms calls DigSig to fill in default values:
DigSig creates the signature field dictionary, the signature annotation dictionary, and
the (blank) signature appearance dictionary.
DigSig calls the DSDefaultValueProc callback that your plugin provides. This
callback must create the default signature value dictionary and create the /DV key in
the signature field dictionary to point to it.
3. If the user asks to sign a specific signature field using the plug-in, DigSig calls callbacks
into your plug-in in four-step sequence. Your plug-in must register these callbacks
during the plug-in initialization phase. The four callbacks required for this scenario are:
dsNewSigData
dsCommitSign
dsFinshSign
dsFreeSigData.
person signing and the date and time of signing, displayed in a language-independent
way.
2. DigSig calls dsGetValidState to choose which icon to show.
3. OPEN displays an icon and line of text for each signature, then indented lines of further
text, currently consisting of the name of the signer, date and time of signing, location of
signing, reason for signing, and signing method.
4. DigSig calls dsGetValidState to choose which icon to show.
Your plug-in may update the signature panel for a document asynchronously (it might be
doing validation as a background or idle-loop task). To do this, use the
DigSigUpdatePanel callback.
Additional DigSig Plug-in Support
Whenever a signature is created or verified, the plug-in may optionally alter the appearance
of the signature in the document, for the purpose of displaying or printing. For example, it
could change an overprinted question mark on an unverified signature to an underprinted
logo for a verified signature. To help with this, DigSig provides an HFT callback
DigSigGetStdXObj that returns an XObject for a blank appearance, a question mark,
or a cross. These are suitable as targets of the Do operator in a signatures appearance
stream.
To avoid saving a signature to a file with an appearance of valid (rather than unvalidated),
just before each file save, DigSig loops through all the signature fields and calls the specific
methods dsUnValidateSig entry. This routine restores the signatures appearance to
the unvalidated state.
The AcroForms Widget Annothandler calls into DigSig using four entries. These calls all
reflect user actions taken in the document view, not the Signatures panel view.
When the user selects an annotation by tabbing to it or by clicking it with the mouse, and
that annotation is for a signature field, AcroForms calls DigSigDraw. If the annotation is
selected, then bIsSelected is true.
When the user tabs to a signature annotation and activates it by hitting the spacebar or
enter key, this is equivalent to a left mouse click.
AcroForms calls DigSigKeyDown. The parameters parallel those of
AVAnnotHandlerDoKeyDownProc.
When the user left-clicks inside a signature annotation, AcroForms calls DigSigClick.
The parameters parallel those of DoClickProcType.
When the user right-clicks inside a signature annotation, AcroForms calls
DigSigRightClick.
Rollback Support
There is a constraint on the values in the /ByteRange array. This constraint allows DigSig to
implement rollback to prior signatures:
The largest offset + length value in the /ByteRange array for a given signature must be
equal to the length of the PDF file containing that signature; that is, it must equal offset + 1
of the "F" in the %%EOF at the end of the file.
In addition, the following constraints also apply:
All offsets must be in the range 0..2147483647
All lengths must be in the range 1..2147483647
Offset[n+1] must be strictly greater than offset[n] + length[n]
PDDoc
The underlying PDF representation of a document. There is a correspondence between a
PDDoc and an ASFile; the PDDoc object is the hidden object behind every AVDoc. An
ASFile may have zero or more underlying files, so a PDF file does not always correspond
to a single disk file. For example, an ASFile may provide access to PDF data in a database.
Through PDDocs, your application can perform most of the Edit -> Pages menu items from
Acrobat (delete, replace, and so on). Thumbnails can be created and deleted through this
object. You can set and retrieve document information fields through this object as well.
The first page in a PDDoc is page 0.
PSCertIssuedUnderTestCP
PSCloseEncryptedDocs
PSCountEncryptedDocs
PSDataBufferDigest
PSDataBufferEnum
PSExportDataExchange
PSImportDataExchange
PSRegisterHandler
PSSigValidatePDDocSigField
PSUnregisterHandler
AABFindCertsByName
AABGetCertChain
AABGetCertTrust
AABGetTrustedCerts
AABIsCertPresent
DSAPFileAcquire
DSAPFileCanDeleteNthEntry
DSAPFileCopyNthEntry
DSAPFileEditNthEntry
DSAPFileGetCount
DSAPFileGetNewNthName
DSAPFileRelease
DSAPFileRemoveNthEntry
DSAPFileSave
DigSigAddedSig
DigSigAddedSigEx
DSAPCreateCompositeTextXObj
DigSigAPCreateLayeredStream
DigSigAPCreateLayeredStreamEx
DigSigAPXObjectFromLogo
DigSigAPXObjectFromXObjList
DigSigByteToHex
DigSigClearSig
DigSigClearSigRefDict
DigSigClick
DigSigCommitSigRefDict
DigSigComparePages
DigSigComparePagesEx
DigSigCompareWords
DigSigCompareWordsAndFontsRecent
DigSigCompareWordsEx
DigSigCompareWordsRecent
DigSigCosObjOverwrite
DigSigCreateStdXObj
DigSigDeletedSig
DigSigDeletedSigEx
DigSigDocModifiedAfterSig
DigSigDoProperties
DigSigDraw
DigSigEnumSignatures
DigSigFileGetEOF
DigSigFileRead
DigSigFileSetPos
DigSigFinishSigRefDict
DigSigGetDocAuthorSignature
DigSigGetDocMDPSetting
DigSigGetStdXObj
DigSigGetUbiquitySignature
DigSigGetUniqueTitle
DigSigHexToByte
DigSigIsDocSigned
DigSigIsSigSigned
DigSigKeyDown
DigSigMD5ByteRange
DigSigNewSigRefDict
DigSigOverwriteBytes
DigSigOverwriteHexstring
DigSigOverwriteIntArray
DigSigRegisterFilter
DigSigRegisterObserver
DigSigRightClick
DigSigRollbackToSig
DigSigSignDoc
DigSigUnregisterFilter
DigSigUnregisterObserver
DigSigUpdatePanel
DigSigVerifySig
DigSigVerifySigRefDict
Forms APIs
The Forms APIs include:
AFDrawText
AFExecuteThisScript
AFImportAppearance
AFLayoutBorder
AFLayoutCreateStream
AFLayoutDelete
AFLayoutNew
AFLayoutText
AFPDDocEnumPDFields
AFPDDocGetPDFieldFromName
AFPDDocLoadPDFields
AFPDFieldFromCosObj
AFPDFieldGetCosObj
AFPDFieldGetDefaultTextAppearance
AFPDFieldGetFlags
AFPDFieldGetName
AFPDFieldGetValue
AFPDFieldIsAnnot
AFPDFieldIsTerminal
AFPDFieldIsValid
AFPDFieldReset
AFPDFieldSetDefaultTextAppearance
AFPDFieldSetOptions
AFPDFieldSetValue
AFPDFormFromPage
AFPDWidgetGetAreaColors
AFPDWidgetGetBorder
AFPDWidgetGetRotation
AFPDWidgetSetAreaColors
AFPDWidgetSetBorder
AssembleFormAndImportFDF
ExportAsFDF
ExportAsFDFEx
ExportAsFDFWithParams
ExportAsHtml
ExportAsHtmlEx
ImportAnFDF
IsPDDocAcroForm
ResetForm
Weblink Services
The Weblink plug-in provides the following services:
Maintenance of links (editing and storage of URLs associated with links, and so on)
Manipulation of links (appropriate cursor changes and dynamic display of URL
destinations)
Selection of the external Web browser
Driver manipulation
Basic progress status services (progress monitor, wait cursor, and so on)
Weblink Driver
The Weblink plug-in includes a standard driver, known as Adobes Standard Web Driver. It
allows support for transport mechanisms or Web browsers to be added at a later time.
The Standard Driver uses Apple events and DDE messages to communicate with a Web
browser. It supports a protocol that consists of a suite of verbssome going to and some
coming fromthe Web browser. These verb definitions are provided so that Web browsers
can implement this protocol to be compatible with the Adobe Standard Web Driver. Each
verb is specified in terms of the platform-specific implementation: Apple events for the
Macintosh and DDE for Windows. The Standard Drivers use of each verb is also described.
Browsers that wish to use their own protocol may do so by writing a custom driver.
The Weblink plug-in communications software in the Weblink driver is independent of the
Acrobat mechanism for handling links (the PDF implementation of URLs). This separation
improves portability by isolating the highly platform-specific Interapplication
Communication messages. Even on a given platform, there is no standard among Web
browsers for handling interapplication communication, and the actual transport
mechanism may vary over time. By separating out the transport code, the Weblink plug-in
remains portable across platforms, across different vendors implementations of Web
browsers, and across different versions of Web browsers from the same vendor.
Weblink APIs
The Weblink APIs include:
BeginWebProgress
EndWebProgress
GetAppSpecifier
RegisterWebDriver
UpdateWebProgress
WebProgressDidCancel
WLCreateOrDeleteWebLinks
WWWOpenURL
WWWOpenURLWithParams
Text Parameters
Several of the Spelling API methods (SpellCheck, SpellCheckText, and
SpellCheckWord) take input strings as parameters, and several methods return strings
as output parameters.
Input strings are either big-endian Unicode strings with the bytes 0xFE 0xFF prepended,
or strings with PDFDocEncoding. In either case a string is expected to have the
appropriate null-termination. If a string is UCS-2 it may have embedded language and
country information.
Output text is in big-endian UCS-2 format with the bytes 0xFE 0xFF prepended. This
string can be converted to a host encoded string by using ASTextFromPDText and
ASTextGetEncodedCopy. For example:
char **altArray = NULL;
ASInt32 altCount = 0;
ASBool status = SpellCheckWord(acd, cWord, NULL, 0, &altArray,
&altCount);
if (altCount) {
ASText ast = ASTextFromPDText(altArray[1]);
char* altWord = ASTextGetEncodedCopy(ast,
(ASHostEncoding) PDGetHostEncoding() );
}
Spelling APIs
The Spelling APIs include:
SpellAddDictionary
SpellAddDomain
SpellAddWord
SpellCheck
SpellCheckRTF
SpellCheckText
SpellCheckWord
SpellCountKnownWords
SpellCustomDictionaryClose
SpellCustomDictionaryCreate
SpellCustomDictionaryDelete
SpellCustomDictionaryExport
SpellCustomDictionaryOpen
SpellDictionaryNames
SpellDomainNames
SpellGetDocDictionaryOrder
SpellGetDocLanguageOrder
SpellGetNextWord
SpellIgnoreAll
SpellLanguages
SpellRemoveDictionary
SpellRemoveDomain
SpellRemoveWord
SpellSetDocDictionaryOrder
SpellSetDocLanguageOrder
SpellUserDictionaryOrder
SpellUserLanguageOrder
SpellUserWords
Device-specific ICC color profiles, which provide specific mapping between standard
color specifications and specific values for particular output devices that produce those
colors. Additional support objects include profile lists.
Color spaces for the different kinds of color production (such as Grayscale, RGB, CMYK).
Additional support objects include calibrated color spaces for standard color
specifications.
Tranformations between profiles or color spaces.
Color settings, as listed under Edit->Preferences->Color Management-> Settings in the
Acrobat UI. Color settings files contain, for instance, references to color profiles, and
apply across Adobe products. Additional support objects include a string object and
preset lists of settings.
You can create an ICC color profile from available data (ACMakeBufferProfile), or use
profiles that are installed on the system (ACGetWorkingSpaceProfile), or stored in
color settings files (ACGetSettingsProfile).
You can extract information directly from profiles, such as a string to use in the UI
(ACProfileDescription). However, the most important thing you do with color
profiles is use them to make transformations (ACMakeColorTransform). You can then
apply it (ACApplyTransform) to transform a set of image data from one profile to
another, so that it appears with the same colors on a different display device.
AcroColor objects are reference-counted. Each object type has an unreference method
(such as ACUnReferenceProfile). Whenever you create one of these objects, you are
responsible for using the corresponding unreference method to release it when you are
finished with it.
ro
file
eP
r
of
ile
Li
st
ProfileFromDescription
ProfileFromCode Profile MakeColorTransform Transform
ProfileList
*ColorSpace ApplyTransform
*Count *Data
*ItemDescription UnReferenceTransform
Description
*ItemCode ProfilesMatch
al Gra B
UnReferenceProfileList
eC al G
*SIze
La y
ak C lR
M ake eCa
GetWorkingSpaceProfile
b
MakeBufferProfile
M ak
M
UnReferenceProfile
CalRGB
CalGray
CalLab
AcroColor APIs
The AcroColor APIs include:
ACApplyTransform
ACEngineCount
ACEngineInfo
ACGetSettingsProfile
ACGetSettingsString
ACGetSettingsUnsigned32
ACGetWorkingSpaceProfile
ACLoadSettings
ACMakeBufferProfile
ACMakeCalGray
ACMakeCalLab
ACMakeCalRGB
ACMakeColorTransform
ACMakePresetList
ACMakeProfileList
ACMakeSettings
ACMakeString
ACMonitorProfile
ACPresetFileToName
ACPresetListCount
ACPresetListItemFile
ACProfileColorSpace
ACProfileData
ACProfileDescription
ACProfileFromCode
ACProfileFromDescription
ACProfileListCount
ACProfileListItemCode
ACProfileListItemDescription
ACProfileSize
ACProfilesMatch
ACSetEngine
ACStringASCII
ACStringLocalized
ACStringUnicode
ACUnReferencePresetList
ACUnReferenceProfile
ACUnReferenceProfileList
ACUnReferenceSettings
ACUnReferenceString
ACUnReferenceTransform
The Acrobat Support (AS) layer of the core API provides a variety of utility methods,
including platform-independent memory allocation and fixed-point math utilities. In
addition, it allows plug-ins to replace low-level file system routines used by Acrobat
(including read, write, reopen, remove file, rename file, and other directory operations). This
enables Acrobat to be used with other file systems, such as on-line systems.
Several AS methods return error codes rather than raising exceptions on errors. This is
because these methods are called at a low level where exception handling would be
inconvenient and expensive.
This chapter summarizes the AS objects and methods supported by the Acrobat core API.
See the Acrobat and PDF Library API Reference for a detailed description of all methods.
This chapter also describes a set of platform-specific methods.
ASAtom
ASAtoms are hashed tokens that Acrobat uses in place of strings to optimize performance
(it is much faster to compare ASAtoms than strings). ASAtom methods convert between
strings and ASAtoms. ASAtom methods include:
NOTE: With Acrobat 7, developers are encouraged to use new Cos-level methods that
address several problems with ASAtoms. Using the new APIs, you can dramatically
reduce the use of ASAtoms in the Cos layer by allocating and freeing strings. For
more information, see Names Without ASAtoms on page 29.
ASCab
ASCab objects (cabinets) can be used to store arbitrary key-value pairs. The keys are always
null-terminated strings containing only low-ASCII alphanumeric characters. An ASCab
owns all the non-scalar data inside it That is, when a plug-in places a value inside a cabinet,
the ASCab now manages the value and frees it when the key is destroyed. If, for example, a
plug-in creates an ASText object and adds it as a value to an ASCab, that ASText object
is no longer owned by the plug-in: it is owned by the ASCab. The ASCab destroys the
ASText object when the objects associated key is removed or its value is overwritten.
ASCabs are used to store data used by numerous Acrobat APIs, including AVCommand,
AVConversion, and batch security features.
Handling Pointers
Normally, pointers are treated like scalars (for example, integers) in an ASCab: the ASCab
passes the pointer value back and forth but does not own the data pointed to.
If, however, the pointer has an associated destroyProc, this is no longer the case. When
the destroyProc is set, the ASCab reference counts pointers to track how many times
the pointer is being referenced from any ASCab. For example, the reference count is
incremented whenever the pointer is copied via ASCabCopy. Detaching a pointer
removes one reference to the pointer but does not destroy the associated data. The data is
destroyed by a call to the destroyProc when the reference count is 0.
ASCabDetachPointer returns a separate value indicating whether the pointer can
safely be destroyed or if it still is being referenced by other key/value pairs inside ASCabs.
ASCab Methods
ASCab methods include:
ASCallback
Callbacks allows Acrobat to call functions in a plug-in. The core API provides macros to
create and destroy callbacks. These include ASCallbackCreateProto,
ASCallbackCreateReplacement, and ASCallbackCreateNotification
ASDate
Date objects represent a particular date and time. All date objects are guaranteed to give
accurate representation of UTC time (not adjusted for leap seconds, as the addition of leap
seconds to the international calendar does not happen according to a well-defined rule).
The related ASTimeSpan object represents an exact time span, measured in seconds.
Methods allow you to set, clear, compare, add, and subtract dates and times in various
formats. The ASDate methods include the following:
ASExtension
An ASExtension represents a specific plug-in. A unique ASExtension object is created
for each plug-in when it is loaded. If the plug-in fails to initialize, the ASExtension
remains, but is marked as dead. The ASEnumExtensions method allows you to iterate
over all plug-in objects.
ASFile
The ASFile interface encapsulates Acrobats access to file services. It provides a common
interface for Acrobat, applications, and plug-ins to access file system services on different
platforms, and enables you to provide your own file storage implementations.
ASFile is related to the ASFileSys object, the ASPlatformPath object, and the
ASPathName structure.
ASFileGetFileSysByName Gets the file system that was registered with the
specified name.
ASFileGetMDFile Given an ASFile, returns the file system and
the ASMDFile identification in that file
system.
ASFileGetOpenMode Returns a value corresponding to one or more
ASFileMode used to access/create the file,
ASFileGetPos Gets the current seek position in a file.
ASFileSys
An ASFileSys is a collection of functions that implement file system services, such as
opening files, deleting files, reading data from a file, and writing data to a file. Each
ASFileSys provides these services for one class of devices. Acrobat has a built-in
ASFileSys that services the platforms native file system. The Acrobat on Windows
includes an additional ASFileSys that services the OLE2 IStorage/IStream interfaces.
Plug-ins may create additional ASFileSys objects to service other file systems. For
example, a plug-in could implement an ASFileSys to access PDF files stored in a
document database or to access PDF files across a serial link.
An ASFileSysRec structure contains pointers to callback procedures used by the
ASFileSys and ASFile methods. See , File Systems on page 438 for more information
on implementing an ASFileSys. The primary service of an ASFileSys is to provide
clients with a readable and/or writable file object (ASFile) corresponding to a particular
ASPlatformPath
An opaque object used to retrieve a platform-specific path object. This object was added in
Acrobat 6.0 to improve device-independent path referencing.
ASStm
An ASStm is a data stream that may be a buffer in memory, a file, or an arbitrary user-
written procedure. You typically would use an ASStm to extract data from a PDF file. When
writing or extracting data streams, the ASStm must be connected to a Cos stream (see ,
CosStream on page 427).
ASStm methods allow you to open and close streams, and to read and write data. They
include:
ASText
An ASText object holds encoded text. In Acrobat, encoded text can be specified in one of
two ways:
As a null-terminated string of multi-byte text coupled with a host encoding. The host
encoding is platform-specific:
On the Macintosh, host encoding is specified as a script code.
On Windows, host encoding is a CHARSET code.
As an ASUns16 string of Unicode text terminated by an ASUns16 0 (two 0 bytes). The
string can be in either BigEndian or HostEndian format.
Each of the formats described in the following table can be mapped to one of the two cases
outlined above.
Format Description
Encoded A multi-byte string terminated with a single null character and coupled with
a specific host encoding indicator.
ScriptText A multi-byte string terminated with a single null character and coupled with
an ASScript code. (An ASScript is an enumeration of writing scripts.)
This is merely another way of specifying the Encoded case; the ASScript
code is converted to a host encoding using ASScriptToHostEncoding.
Unicode A series of ASUns16 values containing Unicode values in big-endian
format, terminated with a single ASUns16 0. Unicode refers to straight
Unicode without the 0xFE 0xFF prefix or language and country codes that
can be encoded inside a PDF document.
PDText A string of text pulled out of a PDF document. This is either a big-endian
Unicode string pre-pended with the bytes 0xFE 0xFF or a string in PDF
document encoding. In the Unicode case, this also may include language
and country identifiers. ASText objects strip language and country
information out of the PDText string and track them separately.
ASTexts also can be used to accomplish encoding conversions; your plug-in can request a
string in any of the formats specified above.
In all cases the ASText code attempts to preserve all characters. For example, if your plug-
in attempts to concatenate strings in separate host encoding, the implementation may
convert both to Unicode and perform the concatenation in Unicode space.
When creating a new ASText object, or putting new data in an existing object, Acrobat
will always copy the supplied data into the ASText object. The original data is yours to do
with as you will (and release if necessary).
The size of ASText data always is specified in bytes, for example, the len argument to
ASTextFromSizedUnicode specifies the number of bytes in the string rather than the
number of Unicode characters.
Host encoding and Unicode strings are always terminated with a null character (which
consists of one null byte for host-encoded strings and two null bytes for Unicode strings).
You cannot create a string with an embedded null character even using methods that take
an explicit length parameter.
The GetXXX methods return pointers to data held by the ASText object. Your plug-in
cannot free or manipulate this data directly. The GetXXXCopy methods return data that
your plug-in can manipulate at will and is responsible for freeing.
ASText methods include:
ASTimeSpan
An ASTimeSpan object represents an exact time span, measured in seconds. The internal
representation uses 64-bit signed integers (to avoid the 2038 problem caused by 32-bit
representation). Negative timespans are allowed.
ASTimeSpan methods include:
Configuration
The ASGetConfiguration method allows a plug-in to determine which version of
Acrobat it is running under. Because Adobe Reader supports only a subset of the core API, it
is vital that plug-ins use this method at start-up to ensure that the version of Acrobat
currently running supports the API methods they need, including whether Acrobat can
save changes to files (Acrobat can always save changes).
Errors
Acrobat supports a mechanism for registering and using error codes. These error codes
may be returned by methods, or (more commonly) used as exception codes when raising
exceptions. See Chapter 13, Handling Errors for a description of exceptions and their
handling.
Error methods include:
Fixed-point Math
These macros and methods support operations on fixed-point numbers. Acrobat uses 32-
bit fixed numbers, with the least significant 16 bits of a fixed-point number representing
the fractional part of the number. The operations supported include conversions between
integers and fixed-point numbers, conversions between C strings and fixed-point numbers,
math, rectangle utilities, and matrix operations. ASFixed is not a standard C type.
For more information, see Appendix E, Macros. The core API includes some macros and
some AS layer methods for making conversions.
In addition, the header file ASExpT.h contains a number of predefined constants for
specific fixed-point numbers.
HFT Methods
HFTs are the mechanism through which plug-ins call methods in Acrobat or in other
plug-ins. This capability enables plug-ins to override specific portions of Acrobats
functionality. For more information, see Acrobat SDK Plug-in Guide.
The AS group contains several methods for dealing with HFTs, including:
Memory Allocation
The core API provides methods for allocating and managing memory. These should always
be used instead of C functions such as malloc and free. Memory allocation methods
include:
Using Threads
To use threads, simply make the appropriate system call (_beginthreadex on Windows,
and pthread_create on UNIX). While multiple threads cannot share PDFL datatypes,
they do share the same process heap; this means that an application can share generic
datatypes between threads. However, multiple threads should not attempt to write to the
same PDF document. There is not a problem, however, with multiple threads opening the
same file read-only.
NOTE: On Windows, CreateThread is not recommended if the application is using most
stdio.h-defined functions, including file I/O and string manipulation. It is best to
use _beginthreadex on Windows, which performs extra bookkeeping to ensure
thread-safety.
Platform-Specific Utilities
Macintosh
The core API includes Macintosh-specific methods for plug-ins. For details on all the
Macintosh methods available, see Macintosh-specific Methods in the Acrobat and PDF
Library API Reference. Methods include:
UNIX
The core API also includes UNIX-specific utility methods, which are only available for
plug-ins. These methods allow a plug-in to
Windows
Windows-specific utility methods are only available for plug-ins. These methods allow a
plug-in to:
Manipulate modal and modeless dialogs
Get the color palette
Control the AVAppIdle timer
Windows methods include:
The Acrobat Viewer (AV) layer of the core API (also known as AcroView) allows plug-ins to
control Acrobat and modify its user interface. Using the AV methods, a plug-in can add
menus and menu items, add buttons to the toolbar, open and close files, display simple
dialog boxes, and perform many other application-level tasks. Plug-ins must use AV layer
methods to be accessible through the Acrobat viewers user interface.
NOTE: AcroView methods are not available to the Adobe PDF Library.
The AV layer methods do not provide access to:
Detailed internal structure of a PDF file (provided by the PD layer methods described in
Chapter 7, Portable Document (PD) Layer).
Editing page contents (provided by the PDFEdit section of the core API, described in
Chapter 8, PDFEdit LayerCreating and Editing Page Content).
Low-level disk structure of a file (provided by the Cos section of the core API, described
in Chapter 10, Cos Layer).
File I/O system (provided by the AS methods, described in Chapter 5, Acrobat Support
(AS) Layer).
The AV layer consists of the objects shown in Figure 6.1, Acrobat Viewer Objects. The
relationships in the figure are not strictly hierarchical, but are meant to indicate how
objects are associated. For example, the PDTextSelect object is included in the figure
because of its close association with the AV selection methods.
General
General methods do not apply to a particular AV layer object. An example method is
AVDestInfoDestroy, which destroys a destination info object.
AVActionHandler
An AVActionHandler carries out an action. For instance, an action is what happens
when a link or bookmark is clicked in Acrobat. See Section 8.5 in the PDF Reference for more
information on actions.
When Acrobat executes an action, it looks for the action handler with a type matching
that of the action it is trying to execute. Acrobat invokes the matching handler to perform
the action. If no match is found, Acrobat ignores the user action.
Your plug-in can add new action handlers by using AVAppRegisterActionHandler,
expanding the range of action types to which Acrobat can respond. See Action Handlers
on page 430 for further information on creating action handlers.
Your plug-in can use AVActionHandlerGetProcs to get a structure containing
pointers to an action handlers methods. This method can be used to modify an existing
action handler.
AVActionHandler methods include:
AVAlert
AVAlert provides platform-independent support for displaying simple dialog boxes.
AVAlert methods include:
AVAnnotHandler
An AVAnnotHandler is responsible for creating, displaying, selecting, and deleting a
particular type of annotation. There is one annotation handler for each annotation type.
Acrobat contains two built-in annotation types (notes and links), and plug-ins can add new
annotation handlers by using AVAppRegisterAnnotHandler. See Annotation
Handlers on page 430 for details on creating new annotation types.
An AVAnnotHandler is generally accessed through AVApp methods, but it has two
methods of its own, AVAnnotHandlerGetInfo and AVAnnotHandlerDeleteInfo.
AVAnnotHandler methods include:
AVApp
AVApp represents the Acrobat application itself. From the application layer, you can control
the appearance of Acrobat, whether Acrobat appears, and the size of the application
window. Your application has access to the menubar and the toolbar through this object.
The application layer also provides access to the visual representation of a PDF file on the
screen, that is, an AVDoc.
AVApp methods include:
AVCommand
An AVCommand represents an action that the user can perform on the current document
or the current selection in the current document. An AVCommand can be added to a
command sequence and executed either interactively or by means of batch processing,
using the method AVCommandExecute.
Configuring Commands
Prior to executing the AVCommand, the client can configure three categories of properties:
Input parameters (required)
Configuration parameters (optional - initialized to defaults)
AVCommand parameters (optional - initialized to defaults)
Input Parameters
At minimum, the client must configure the AVCommands input parameters. The command
must be provided with a PDDoc upon which to operate, as shown in this example.
PDDoc pdDoc; // Initialized elsewhere
// Create cab to hold input parameters and populate
ASCab inputs = ASCabNew();
ASCabPutPointer (inputs, kAVCommandKeyPDDoc, PDDoc, pdDoc, NULL);
// Set the input parameters and destroy the container ASCab
if (kAVCommandReady != AVCommandSetInputs (cmd, inputs)) {
// Handle error
}
ASCabDestroy (inputs);
All other inputs are optional. See the description of AVCommandSetInputs in the
Acrobat and PDF Library API Reference, for details.
Configuration Parameters
Optionally the client can set configuration parameters. The default UI policy is for
commands to be fully interactive. To invoke the command programmatically instead, the
client can create an ASCab object and populate it with the appropriate parameters, for
example,
// Create cab to hold config parameters and populate
ASCab config = ACabNew();
ASCabPutInt (config, "UIPolicy", kAVCommandUISilent);
AVCommand Parameters
An AVCommands parameter set is specific to each command. For example, the Document
Summary command accepts values for five parameters: Title, Subject, Author, Keywords,
Binding, and LeaveAsIs. As in the Configuration Parameters example, a plug-in can create
ASCabs to hold the appropriate parameters; then it can create empty ASText objects to
hold the parameter values and put these values in the ASCabs. The following example uses
this approach to set Document Summary title and subject values:
const char *docTitleValue = "Document Title";
const char *docSubjectValue = "Document Subject";
AVCommand Methods
AVCommand methods include:
AVConversion
The AVConversion methods enable conversion from non-PDF file formats to PDF and
vice versa. For information on using the AVConversion methods to create a file
conversion handler, see File Format Conversion Handlers on page 434.
The AVConversion methods include:
AVCrypt
AVCrypt methods implement Acrobats built-in dialogs for encryption control. They are
present in the core API so that they can be used by other security handlers. The AVCrypt
methods include:
AVDoc
An AVDoc is a view of a PDF document in a window. Usually there is one AVDoc per
displayed document. Unlike a PDDoc (described in PDDoc on page 313), an AVDoc has a
window associated with it. Starting with Acrobat 7, it is possible to have multiple windows
open on the same document. An API client can track the coming and going of document
windows using three new notifications and query for all windows open for an AVDoc using
two new API calls. AVDoc methods include:
AVGrafSelect
An AVGrafSelect is a graphics selection on a page. It is a rectangular region of a page
that can be copied to the clipboard as a sampled image. After a plug-in creates an
AVGrafSelect, it can use AVDocSetSelection to set the AVGrafSelect as the
current selection and AVDocShowSelection to scroll it to a visible position in the
window.
AVGrafSelect methods include:
AVMenu
An AVMenu is a menu in the Acrobat viewers menubar. Plug-ins can create new menus,
add menu items at any location in any menu, and remove menu items. Deleting an
AVMenu removes it from the menubar (if it was attached) and deletes all the menu items it
contains.
There is a special AVMenu with the title Tools. This menu (the About Plug-ins menu item and
the Plug-in Help menu item) are always created when Acrobat is launched. They are
removed if and only if they are empty after every plug-ins initialization routines have been
called.
Submenus (also called pullright menus) are AVMenu objects that are attached to an
AVMenuItem instead of to the menubar.
Each menu has a title and a language-independent name. The title is the string that appears
in the user interface, while the language-independent name is the same regardless of the
language used in the user interface. Language-independent names allow a plug-in to
locate the File menu without knowing, for example, that it is called Fichier in French and
Ablage in German.
It is strongly encouraged that you begin your language-independent menu names with the
plug-in name (separated by a colon) to avoid name collisions when more than one plug-in
is present. For example, if my plug-in is named myPlug, it might add a menu whose name
is myPlug:Options.
Your plug-in cannot directly remove a submenu. Instead, it must remove the AVMenuItem
to which the submenu is attached.
The AVMenu methods include:
AVMenuGetParentMenuItem Gets the parent menu item for the specified menu.
AVMenuNewWithASText Creates and acquires a new menu with the given title
and language-independent name.
AVMenuRelease Releases a previously acquired menu.
AVMenubar
The AVMenubar is Acrobats menubar and contains a list of all menus. There is only one
AVMenubar. Plug-ins can add new menus to, or remove any menu from, the menubar. The
menubar can be hidden from the users view. The AVMenuBar methods include:
AVMenuItem
An AVMenuItem is a menu item in a menu. It has attributes, including
A name
A keyboard shortcut
A procedure to execute when the menu item is selected
A procedure to compute whether the menu item is enabled
A procedure to compute whether the menu item is check marked, and whether it has a
submenu.
Menu items also may serve as separators between menu items. You are encouraged to
position your plug-in menu items relative to a separator. This helps ensure that if a block of
menu items is moved in a future version of Acrobat, your plug-ins menu items also are
moved.
In Acrobat 4.0 and higher, plug-ins can be liberal in their use of separators. After
initialization, Acrobat 4.0 and higher clean up by removing separators at the beginning or
end of menus as well as removing duplicate separators.
A plug-in can simulate a user selecting a menu item by calling AVMenuItemExecute. If
the menu item is disabled, AVMenuItemExecute returns without doing anything.
AVMenuItemExecute works even when the menu item is not displayed (for example, if it
has not been added to a menu, its menu is not displayed, or the menu bar is not visible).
Plug-ins can set all attributes of menu items they create, but must not set the Execute
procedure of Acrobats built-in menu items.
Your plug-in can specify menu item names using either the names seen by a user, or
language-independent names. The latter allows your plug-in to locate the Print menu
item without knowing, for example, that it is called Imprimer in French and Drucken in
German.
You are strongly encouraged to begin your plug-ins language-independent menu item
names with your plug-ins name (separated by a colon) to avoid name collisions when more
than one plug-in is present. For example, if my plug-in is named myPlug, it might add
menu items whose names are myPlug:Open and myPlug:Find.
The AVMenuBar methods include:
AVPageView
An AVPageView is the area of Acrobats window that displays the contents of a document
page. Every AVDoc has an AVPageView and vice versa. It contains references to the
PDDoc and PDFont objects for the document being displayed. Plug-ins can control the
size of the AVPageView through AVWindowSetFrame and
AVDocSetSplitterPosition.
AVPageView has methods to display a page, select a zoom factor, scroll the page
displayed inside, highlight one or more words, control screen redrawing, and traverse the
history stack that records where users have been in a document.
In continuous page modes when more than one page may be displayed, AVPageView
may not completely specify the view of the AVDoc. In these cases, your plug-in needs to
call AVPageViewSetPageNum to set the page number that it wants. For instance, if your
plug-in is getting an annotations bounding rectangle with
AVPageViewGetAnnotRect, it should call AVPageViewSetPageNum first, providing
the annotations page number. This ensures that your plug-in gets the AVRect on the page
upon which the annotation appears.
Additional AVPageView methods include:
AVSweetPea
The AVSweetPea methods are used to implement the Adobe Dialog Manager (ADM), a
cross-platform API for creating and managing dialogs by Adobe applications. For details on
how to use ADM for Acrobat dialogs, see ADM Programmers Guide and Reference. The
AVSweetPea methods include:
AVSys
AVSys provides various system-wide utilities, including setting the cursor shape, getting
the current cursor, and beeping. Methods include:
AVTool
An AVTool is an object that can handle key presses and mouse clicks in the content region
of an AVPageView. Tools do not handle mouse clicks in other parts of Acrobats window,
such as in the bookmark pane. At any time, there is one active tool, which a plug-in can set
using AVAppSetActiveTool.
Tools are often, but not always, set from toolbar buttons (see AVToolButton on page 296).
Some buttons, such as Zoom, set an active tool; in this case, setting the active tool to one
that drags out a rectangle, or adjusts Acrobats zoom level in response to user actions.
Other buttons, such as the one that displays thumbnail images, do not change the active
tool.
Use AVAppRegisterTool to add a new tool to Acrobat.
Additional AVTool methods include:
AVToolBar
AVToolBar is Acrobats toolbar (the palette of buttons). In Acrobat 4.0 and later, a plug-in
can create flyouts that contain additional buttons and attach these flyouts to existing
buttons.
Plug-ins can add buttons to and remove buttons from a toolbar, show or hide toolbars, and
(Acrobat 5.0) create new toolbars. Because screen space is limited on many monitors, plug-
ins should add as few buttons as possible to toolbars.
Buttons can be organized into groups of related buttons, with additional space between
the groups. It is possible to implement a group in which only one button can be selected at
a time. The logic of doing this is the plug-ins responsibility; the plug-in API does not
provide any means to automatically relate one buttons state to another buttons state.
A plug-in adds buttons to a toolbar by specifying the relative position of the button (before
or after) to an existing button.
Although there appear to be multiple toolbars in the Acrobat 4.0 and higher user interface,
there is still only one AVToolBar containing all the buttons that are not on flyouts. A plug-
in controls the toolbar upon which a button will appear by placing the button next to an
existing one already in the appropriate location. The AVToolBar methods include:
AVToolButton
An AVToolButton is a button in the Acrobat viewers toolbar. Like menu items, the
procedure that executes when the button is clicked can be set by a plug-in. Although not
required, there generally is a menu item corresponding to each button, allowing users to
select a function using either the button or the menu item.
A plug-in can invoke a button as if a user clicked it. Buttons can be enabled (selectable) or
disabled (grayed out), and can be marked (selected). Each button also has an icon that
appears in the toolbar. AVToolButtons frequently, but not always, change the active tool
(see AVTool on page 295). For example, the button that selects the link tool changes the
active tool; whereas, the button that goes to the last page of a document does not.
Normally, all tools are persistent and remain selected indefinitely. The Option key
(Macintosh platform) or Control key (Windows) can be used to select a tool for one-shot
use. Plug-ins should follow this convention to add buttons.
Separators between groups of buttons are themselves buttons, although they are neither
selectable nor executable. Because they are buttons, however, they do have names,
allowing other buttons to be positioned relative to them.
Plug-ins are encouraged to position their tool buttons relative to separators. Doing this
increases the likelihood that tool buttons will be correctly placed if future versions of
Acrobat move groups of toolbuttons around.
Acrobat 4.0 and higher cleans up separators. It ensures that separators don't appear back-
to-back or at the beginning or end of the toolbar. Plug-ins can be liberal with separators in
Acrobat 4.0 and higher versions.
You are strongly encouraged to begin your language-independent button names with the
plug-in name (separated by a colon) to avoid name collisions when more than one plug-in
is present. For example, if my plug-in is named myPlug, it might add a button whose name
is myPlug:LastFile. For more information on plug-in naming, see the Acrobat SDK
Plug-in Guide.
The AVToolButton methods include:
AVUndo
The AVUndo object represents an undo record for a document. An undo record allows a
client to associate private data with a particular AVDoc for the purpose of undoing and
redoing changes to the document. The client provides private data that encapsulates the
changes, and an AVUndoHandler that contains callbacks which interpret the data when
Undo and Redo commands are issued.
The AVUndo object itself has an AVUndoNew method, and methods for getting and
setting properties, such as AVUndoGetData and AVUndoSetData. However, you
initiate and control an undo or redo operation from the document (which you can obtain
with AVUndoGetAVDoc), using methods such as AVDocBeginUndoOperation,
AVDocEndUndoOperation, and AVDocClearUndos.
The AVUndo methods include:
AVUndoGetAVDoc Gets the document whose undo list contains the undo
record.
AVUndoGetData Gets the client-defined private data for the undo record, as
specified on creation.
AVUndoGetType Gets the type of the undo record, as specified in the
AVUndoHandler.
AVUndoNew Creates a new AVUndo record for a document's undo list.
AVWindow
AVWindow provides methods for creating and managing windows. Plug-ins should use
AVWindow methods for their own dialogs, floating palettes, and so forth, to ensure that
those windows work well with Acrobat; for example, that under Windows, they are hidden
when Acrobat is iconified. Once the plug-in creates an AVWindow, it is free to use platform-
dependent code to put whatever it wants in the window.
Acrobat uses the concept of a key window. The key window is the window that receives
keyboard events. Only one window is the key window at any time. Windows can request to
become the key window, or request that they no longer be the key window.
On the Macintosh platform, there is an essential distinction between a key window and an
active window. A window is a key window if and only if it is the target of all keystrokes and
menu selections. A window is the active window if mouse clicks in it are interpreted
without requiring an initial activation click. This state is usually indicated (in modal and
non-floating windows) with some highlighting in the title bar. Floating windows are
inactive only if hidden.
NOTE: Plug-ins on the Macintosh platform should always use the core API methods to
zoom, resize, or move windows. They should never use the toolbox routines
(ZoomWindow, SizeWindow, GrowWindow, MoveWindow, and so forth) directly
on AVWindows.
for internal purposes. To attach client data to an AVWindow, a plug-in should use
AVWindowGetOwnerData or AVWindowSetOwnerData.
The AVWindow methods include:
The Portable Document (PD) layer of the core API (also called PDModel) is a collection of
object methods enabling plug-ins to access and manipulate most data in a PDF file.
Figure 7.1 shows the objects in the PD layer.
PDImage PDForm
PDInlineImage
NOTE: Because of its close association to the AVDoc selection mechanism, the
PDTextSelect object is shown in Figure 6.1, Acrobat Viewer Objects.
NOTE: New objects added in Acrobat 6.0 that implement optional content (layers) are not
shown. These include:
PDOCConfig
PDOCContext
PDOCG
PDOCMD
Because many PD layer objects are based on PDF objects, its important to understand PDF
file structure. See the PDF Reference for details on PDF files.
PD layer methods perform the bookeeping that ensures any file written is a valid PDF file. In
addition, they take care of navigating much of the PDF file structure, such as traversing the
pages tree to get a specific page.
If you need lower-level access to the data in a PDF file, use Cos layer methods
(seeChapter 10, Cos Layer). To control the Acrobat application itself, use AV layer methods
(see Chapter 6, Acrobat Viewer (AV) Layer). To modify page contents, such as text, use
PDFEdit methods, described in Chapter 8, PDFEdit LayerCreating and Editing Page
Content.
The following sections describe each PD layer object and provide an overview of each
objects methods. See the Acrobat and PDF Library API Reference for complete detailed
descriptions of the methods.
For a complete listing, see General PD functions in the Acrobat and PDF Library API
Reference.
Metadata
Metadata is information that describes document content or use. The PDF file format has
always provided the Info dictionary, which contains metadata that applies to an entire
document, with nine standard properties defined (including creation and modification
date, title, and author).
The Acrobat SDK contains several samples dealing with metadata. See the Guide to SDK
Samples for information.
PDAction
Actions are tasks that Acrobat performs when a user clicks on a link or a bookmark. Acrobat
allows a document to execute an action automatically when a document is opened.
Action types include
Going to another view within the same document
Going to a specified view in another PDF file
Launching an arbitrary file
Playing a sound
Resolving a URL
See Section 8.5 in the PDF Reference for more information on actions.
You can add custom action types to your plug-in by creating new action handlers (see
Action Handlers on page 430) that are responsible for interpreting an actions data and
carrying out the action. PDAction methods include:
PDAnnot
This is the abstract superclass for all annotations (see Section 8.4, Annotations, in the PDF
Reference). Acrobat has two built-in annotation classes: PDTextAnnot and
PDLinkAnnot. Plug-ins add movie, Widget (form field), and other annotation types. You
can define new annotation subtypes by creating new annotation handlers (see Annotation
Handlers on page 430). There are no objects of type PDAnnot, but you-in can use
PDAnnot methods on any subclass of PDAnnot.
The Acrobat SDK provides three useful macros to cast among PDAnnot and its text
annotation and link annotation subclasses (see PDExpT.h). These are:
CastToPDAnnot
CastToPDTextAnnot
CastToPDLinkAnnot
The PDAnnot methods include:
PDBead
A bead is a single rectangle in an article thread. An article thread represents a sequence of
physically discontiguous but logically related items in a document (for example, a news
story that starts on one page of a newsletter and runs onto one or more nonconsecutive
pages). See Section 8.3.2, Articles, in the PDF Reference for more information on article
threads and beads.
A bead remains valid as long as a thread is current and active. When traversing the beads
in a thread using PDBeadAcquirePage or PDBeadGetPrev, you can use
PDBeadEqual to determine the wraparound point (end of the list).
Additional PDBead methods include:
PDBookmark
A bookmark corresponds to an outline object in a PDF document (see Section 8.2.2,
Document Outline, in the PDF Reference). A document outline allows the user to navigate
interactively from one part of the document to another. An outline consists of a tree-
structured hierarchy of bookmarks, which display the documents structure to the user.
Each bookmark has:
A title that appears on screen
An action that specifies what happens when the user clicks on the bookmark
Bookmarks can either be created interactively by the user through Acrobats user interface
or can be generated programmatically. The typical action for a user-created bookmark is to
move to another location in the current document, although any action (see PDAction on
page 306) can be specified.
Each bookmark in the bookmark tree structure has zero or more children that appear
indented on screen, and zero or more siblings that appear at the same indentation level. All
bookmarks except the bookmark at the top level of the hierarchy have one parent, the
bookmark under which it is indented. A bookmark is said to be open if its children are
visible on screen, and closed if they are not.
A plug-in can get or set:
The open attribute of a bookmark
The text used for the bookmarks title
The action that is invoked when the bookmark is selected
PDBookmark methods include:
PDCharProc
A PDCharProc is a character procedure, a stream of graphic operators (see PDGraphic
on page 327) that draw a particular glyph of a Type 3 PostScript font.
A glyph is the visual representation of a character, part of a character, or even multiple
characters. For example, a glyph can be a picture of the letter A, or it can be an accent mark,
such as grave (`), or it can be a picture of multiple characters such as the ligature fl, which
represents the letters f and l. Glyphs can also be used to represent arbitrary symbols, such
as in the font ITC Zapf Dingbats. Every glyph has a name in a Type 1, multiple master Type
1, or Type 3 font. In most TrueType fonts, glyphs are assigned names. In some TrueType
fonts, the glyph names are implicit.
For information on Type 3 fonts, see Section 5.5.4 in the PDF Reference.
To determine the sequence of graphics operations used to draw one or more glyphs in a
Type 3 font, use PDFontEnumCharProcs to enumerate the glyphs in the font. Then use
PDCharProcEnum to enumerate the graphic operators in each glyph of interest.
PDCharProc methods include:
PDDoc
A PDDoc object represents a PDF document. There is a correspondence between a PDDoc
and an ASFile. Also, every AVDoc has an associated PDDoc, although a PDDoc may not
be associated with an AVDoc.
NOTE: An ASFile may have zero or more underlying files, so a PDF file does not always
correspond to a single disk file. For example, an ASFile may provide access to PDF
data in a database.
A plug-in may create a new document or open a document using an ASFileSys and an
ASPlatformPath. These frequently provide access to disk files, but could also provide
access to PDF files by other methods, such as via a modem line. Because PD layer objects do
not have a concept of an active document, or even of a user, getting the PDDoc of a
document opened by the user requires calls to AV layer objects (see Chapter 6, Acrobat
Viewer (AV) Layer).
Each PDF document contains, among other things:
A tree of pages (PDPage)
(Optionally) trees of bookmarks and articles
(Optionally) information and security dictionaries
These objects correspond to CosObj objects in the catalog of a CosDoc (see Chapter 10,
Cos Layer). However, they also have PD layer equivalents which are accessible directly
through PDDoc methods. Other objects in the catalog of a PDF file may require Cos
methods to access.
When you merge a PDF file containing form fields that have appearances, those
appearances and forms data are merged along with all the other page contents. If you
merge a file that has forms data into another file that has forms data, name conflicts are
resolved (in the same way the Acrobat Forms plug-in resolves these conflicts).
NOTE: For PDF files with forms data, when inserting pages from another file using
PDDocInsertPages, do not use the PDInsertAll flag. Using this flag wipes
out the previous forms data and replaces it with the information from the file being
inserted.
Link
Bookmark
Thumbnail
Annotation
Form
Signature
To obtain the permissions, a plug-in can call the PDDocPermRequest method (which
replaces PDDocGetPermissions used with earlier Acrobat versions). The plug in can
request, for example, whether a particular operation can be performed on a particular
object (from the list above) for a specified PDDoc. The plug-in may, for example, request
whether permissions allow a rotating operation on a page object in the PDDoc.
For a list of all the operations (PDPermReqOprs) that each object (PDPermReqObj)
supports (and a plug-in can request using PDDocPermRequest), see the
PDPermReqOpr and PDPermReqObj enumerations in the Acrobat and PDF Library API
Reference.
New callbacks have been added to the security handler structure PDCryptHandler to
support the finer granularity of permissions that plug-ins can query.
PDDoc Methods
PDDoc methods include:
PDFileSpec
A PDFileSpec corresponds to the PDF file specification object (see Section 3.10, File
Specifications, in the PDF Reference). It is used to specify a file in an action (see PDAction
on page 306). A file specification in a PDF file can take two forms:
A single platform-independent pathname
A data structure containing one or more alternative ways to locate the file on different
platforms
PDFileSpecs can be created from ASPathNames or from Cos objects. Methods are also
provided to get ASPathNames and device-independent pathnames from PDFileSpecs.
The PDFileSpec methods include:
PDFileSpecGetFileSys Gets the file system that services the specified file
specification.
PDFileSpecGetFileSysName Gets the name of the file system to which the
PDFileSpec belongs.
PDFont
A PDFont is a font that is used to draw text on a page. It corresponds to a font resource in a
PDF file (see Chapter 5, Text, in the PDF Reference).
Plug-ins can get a list of PDFonts used on a PDPage or a range of PDPages. More than
one PDPage may reference the same PDFont object.
A PDFont has a number of attributes whose values can be read or set, including an array of
widths, the character encoding, and the fonts resource name.
In general, a PDFont refers to a base font and an encoding. The base font is specified by
the font name and the subtype (typically Type 0, Type 1, MMType1, Type 3, or TrueType).
This combination of base font and encoding is commonly referred to as a font instance.
In single-byte character systems, an encoding specifies a mapping from an 8-bit index,
often called a codepoint, to a glyph.
Type 0 fonts support single-byte or multibyte encodings and can refer to one or more
descendant fonts. These fonts are analogous to the Type 0 or composite fonts supported by
Level 2 PostScript interpreters. However, PDF Type 0 fonts only support character
encodings defined by a character map (CMap). The CMap defines the encoding for a Type 0
font. It specifies the mappings between character codes and the glyphs in the descendant
fonts. For more information on Type 0 fonts, see Section 5.6.5, Type 0 Font Dictionaries, in
the PDF Reference. See Section 5.6.4, CMaps, for information on CMaps.
Type 0 fonts may have a CIDFont as a descendant. A CIDFont is designed to contain a large
number of glyph procedures and is used for languages such as Chinese, Japanese, or
Korean. Instead of being accessed by a name, each glyph procedure is accessed by an
integer known as a character identifier or CID. Instead of a font encoding, CIDFonts use a
CMap to define the mapping from character codes to a font number and a character
selector. For more information on CIDFonts, see the following sections in the PDF Reference.
Section 5.6.1, CID-Keyed Fonts Overview
Section 5.6.2, CIDSystemInfo Dictionaries
Section 5.6.3, CIDFonts
To access documents on CIDFonts, see the Adobe Solutions Network Web site.
Technical
Note # Title
5092 CID-Keyed Font Technology Overview
5014 Adobe CMap and CIDFont Files Specification
5147 Font Embedding Guidelines for Adobe Third-party Developers
Technical
Note # Title
5078 Adobe-Japan1-2 Character Collection for CID-Keyed Fonts
5079 Adobe-GB1-0 Character Collection for CID-Keyed Fonts
5080 Adobe-CNS1-0 Character Collection for CID-Keyed Fonts
5093 Adobe-Korea1-0 Character Collection for CID-Keyed Fonts
5094 Adobe CJK Character Collections and CMaps for CID-Keyed Fonts
5097 Adobe-Japan2-0 Character Collection for CID-Keyed Fonts
5174 CID-Keyed Font Installation for PostScript File Systems
Each base font contains a fixed set of glyphs. There are some common sets of glyph names,
and these sets are typically called charsets. Acrobat takes advantage of the most common
charset to enable font substitution. This charset is called the Adobe Standard Roman
Character Set (see Appendix E in the PostScript Language Reference, third edition). If Acrobat
encounters a font with this charset, it knows that it can represent all of the glyphs in the
font using font substitution. Other common charsets are the Adobe Expert and Expert
Subset charsets, and the Symbol charset. Most decorative fonts, such as Carta and
Wingdings, have custom charsets.
Given a base font and its charset, multiple encodings are possible. For example, one
encoding for a font could specify that the glyph for the letter A appears at codepoint 65. A
different encoding could specify that A appears at both codepoint 65 and at codepoint 97.
If text were rendered using the second encoding using the text string a is always A, it
would appear as A is always A using a font such as Times. Encodings allow glyphs to be
reordered to the most convenient order for an application or operating system.
Every font has a default encoding, commonly called its built-in encoding. In PDF, shortcuts
are taken when specifying an encoding in order to minimize document size. If a font
instance uses the built-in encoding, no encoding information is written into the PDF
document. If a font has a different encoding, only those codepoints for which the encoding
differs from the built-in encoding are recorded in the PDF file. This information is called a
difference encoding; it describes the difference between the built-in encoding and the
current encoding.
For non-Roman systems, the font encoding may be a variety of encodings, which are
defined by a CMap. See Section 5.6.4, CMaps, in the PDF Reference for a list of predefined
CMaps, such as SHIFT-JIS for Japanese.
A host encoding is a platform-dependent encoding for the host machines base font. For
non-UNIX Roman systems, it is MacRomanEncoding on the Macintosh platform and
WinAnsiEncoding on Windows. For UNIX (except HP-UX) Roman systems, it is ISO8859-1
(ISO Latin-1); For HP-UX, it is HP-ROMAN8. See Appendix D, Character Sets and Encoding,
in the PDF Reference for descriptions of MacRomanEncoding and WinAnsiEncoding. These
encodings specify a mapping from codepoint to glyph name for fonts that use the Adobe
Standard Roman Character Set on the Macintosh and Windows platforms.
Across PDF documentsor even within a single PDF documentthe same base font can
be used with more than one encoding. This allows documents from different platforms to
be combined without losing information. Therefore, it is not uncommon to see a document
that contains two instances of Helvetica, one using MacRoman encoding and another
using WinAnsi encoding. See Appendix D, Character Sets and Encodings, in the PDF
Reference for descriptions of MacRomanEncoding and WinAnsiEncoding. For non-Roman
systems, the host encoding may be a variety of encodings, which are defined by a CMap.
Type 3 fonts do not have the ability to provide a base font with more than one encoding.
For each Type 3 font, there is only one encoding. This encoding is completely specified in
the PDF file; there are no shortcuts as there are for other fonts.
See Section 5.7, Font Descriptors, in the PDF Reference for a discussion of font descriptors.
Methods are provided to create and destroy fonts, as well as to access the information in
the fonts descriptor.
The PDFont methods include the following:
PDForm
A PDForm is a self-contained set of graphics operators that is used when a particular
graphic is drawn more than once in a document. It corresponds to a form resource (see
Section 4.9, Form XObjects, in the PDF Reference). PDForm objects inherit from the
PDXObject class; you can use any PDXObject methods on a PDForm..
NOTE: A PDForm does not correspond to Acrobats interactive forms. See Forms Extended
API on page 220 for information on the Acrobat Forms plug-in API methods.
The PDForm methods include the following:
PDGraphic
PDGraphic is the abstract superclass for all graphic objects that comprise page, charproc,
and PDForm descriptions (see Chapter 4, Graphics, in the PDF Reference). There are no
objects of type PDGraphic, but its methods can be used by any graphic object. There are
three types of graphic objects: PDPath, PDText, and PDInlineImage. In addition to
these three objects, there are also operators in the content stream. These operators are:
Save, Restore, references to XObjects (forms and image resources), and for Type 3
font descriptions only, charwidth and cachedevice. Access to these objects and
operators is via PDPageEnumContents, PDFormEnumPaintProc, or
PDCharProcEnum.
Many of the methods provide access to parameters of the graphics state. For a discussion of
the graphics state and its parameters, see Section 4.3, Graphics State, in the PDF Reference.
PDImage
A PDImage is a sampled image or image mask, and corresponds to a PDF Image resource
(see Stencil Masking in Section 4.8, Images, in the PDF Reference).You can use any
PDXObject method on a PDImage. The PDImage methods include the following:
PDInlineImage
A PDInlineImage is an image whose data is stored in the page descriptions contents
stream instead of being stored as an image resource (see PDImage). PDInlineImage is
a subclass of PDGraphic and corresponds to the PDF inline image operator (see Section
4.8.6, In-Line Images, in the PDF Reference).
Inline images generally are used for images with small amounts of data (up to several
kilobytes), while image resources are used for large images. The reason for this is that there
is a tradeoff between the time needed to access an image resource and the time saved by
not having to parse inline image data when display large images is disabled in Acrobat. For
small images, the time needed to access an image resource is large compared to the time
needed to parse the image data; the opposite is true for large images.
PDLinkAnnot
A PDLinkAnnot corresponds to a link annotation (see Sections 8.4.5, Annotation Types,
in the PDF Reference). You can use any PDAnnot method on a PDLinkAnnot.
Plug-ins can get and set:
The bounding rectangle and color, using PDAnnot methods
The action that occurs when the link is activated, using PDLinkAnnot methods
The links border, using PDLinkAnnot methods
Plug-ins can create new link annotations and delete existing ones, using the PDPage
methods.
The following are useful macros for casting among PDAnnot and its text annotation and
link annotation subclasses:
CastToPDAnnot
CastToPDTextAnnot
CastToPDLinkAnnot
The PDLinkAnnot methods include:
PDNameTree
A PDNameTree is used to map Cos strings to Cos objects, just as a Cos dictionary is used to
map Cos names to Cos objects. However, a name tree can have many more entries than a
Cos dictionary. You can create a PDNameTree and locate it where appropriate (perhaps
under a page, but most often right under the catalog). A PDNameTree is used to store the
named destination information.
Name trees use Cos-style strings, which may use Unicode encoding, rather than null-
terminated C strings. Unicode encoding may contain bytes with zeroes in them (the high
bytes of ASCII characters).
The PDNameTree methods include:
PDNumTree
A PDNumTree is used to map integers to arbitrary Cos objects just as a Cos dictionary is
used to map Cos names to Cos objects. However, a number tree can have many more
entries than a Cos dictionary. The PDNumTree methods include:
PDNumTreePut Puts a new entry in the number tree. If an entry with this
number is already in the tree, it is replaced.
PDNumTreeRemove Removes the specified object from the tree.
PDOCConfig
The PDOCConfig object represents an optional-content configuration structure, used to
maintain a set of visibility states and other optional-content information in a PDF file for
future use. A document has a default configuration, saved in the D entry in the
OCProperties dictionary, and can have a list of other configurations, saved as an array in the
Configs entry in the OCProperties dictionary.
Configurations are typically used to initialize the optional-content group (PDOCG) ON-OFF
states for an optional-content context (PDOCContext). The OCG order in the
configuration is the order in which the groups appear in the Layers panel of Acrobat 6.0.
The configuration can define a set of mutually exclusive OCGs, called a radio button group.
PDOCConfig methods include:
PDOCContext
The PDOCContext object represents an optional-content context in a document, within
which document objects such as words or annotations are visible or hidden. The context
keeps track the ON-OFF states of all of the optional-content groups (OCGs, represented by
the PDOCG object) in a document. Content is or is not visible with respect to the OCG states
stored in a specific context. The context does not correspond to any explicit PDF
specification.
The PDDoc has a default context that it uses for on-screen drawing and that determines
the default state for any other drawing or content enumeration. The context has flags that
control whether to draw or enumerate content that is marked as optional
(PDOCDrawEnumType), and whether to draw content that is not marked as optional
(NonOCDrawing).
There can be more than one PDOCContext object, representing different combinations of
OCG states. You can change the states of OCGs within any context. You can build contexts
with your own combination of OCG states, and issue drawing or enumeration commands
using that context instead of the document's default context. For example, you can pass an
optional-content context to PDPageDrawContentsWithParams through the
PDDrawParams structure. You can save the resulting state information as part of the
configuration, but the context itself has no corresponding PDF form, and is not saved.
PDOCG
The PDOCCG object represents an optional-content group. This corresponds to a PDF OCG
dictionary representing a collection of graphic objects that can be made visible or invisible.
Any graphic content of the PDF can be made optional, including page contents, XObjects,
and annotations. The specific content objects in the group have an OC entry in the PDF. The
group itself is a named object that you can manipulate in the Layers panel of Acrobat 6.0.
In the simplest case, the groups ON-OFF state makes the associated content visible or
hidden. The ON-OFF state of a group can be toggled for a particular context
(PDOCContext), and a set of states is kept in a configuration (PDOCConfig). The visibility
can depend on more than one group in an optional-content membership dictionary
(PDOCMD), and can also be affected by the contexts or configurations
PDOCDrawEnumType.
A group has an Intent entry, an ASAtom value broadly describing the intended use, either
View or Design. A groups content is considered to be optional (that is, the groups state is
considered in its visibility) if any intent in its list matches an intent of the context. The intent
list of the context is usually set from the intent list of the document configuration.
A Usage dictionary entry provides more specific intended usage information than an intent
entry. Possible key values are:
CreatorInfo
Language
Export
Zoom
Print
View
User
PageElement
The usage value can act as a kind of metadata, describing the sort of things that belong to
the group: for example, text in French, fine detail on a map, or a watermark. The usage
values can also be used by the AutoState mechanism to make decisions about what groups
should be on and what groups should be off. The AutoState mechanism considers the
usage information in the OCGs, the AS array of the configuration, and external factors; for
example, the language the app is running in, the current zoom level on the page, or if the
page is being printed.
PDOCG methods include:
PDOCMD
The PDOCMD object represents an optional-content membership dictionary (OCMD) that
allows the visibility of optional content to depend on the states in a set of optional-content
groups (PDOCG). The object corresponds to the PDF OCMD dictionary.
An OCMD collects a set of OCGs. It sets a visibility policy, so that content in the member
groups is visible only when all groups are ON or OFF, or when any of the groups is ON or
OFF. This makes it possible to set up complex dependencies among groups.
An optional-content context can contain a stack of OCMD objects, which you can
manipulate with PDOCContextPopOCMD, PDOCContextPushOCMD, and
PDOCContextResetOCMDStack.
An OCMD can be associated with an annotation (PDAnnotSetOCMD) or a PDE element
(PDEElementSetOCMD).
PDOCMD methods include:
PDPage
A PDPage is a page in a document, corresponding to the PDF Page object (see Page
Objects in Section 3.6.2, Page Tree, in the PDF Reference). Among other associated
objects, a page contains:
A series of objects representing the objects drawn on the page (PDGraphic)
A list of resources used in drawing the page
Annotations (which are subclasses of PDAnnot)
An optional thumbnail image of the page
Beads used in any articles that occur on the page
PDPage methods include:
PDPageLabel
A PDPageLabel represents a page label. These labels allow non-sequential page
numbering or the addition of arbitrary labels for a page (such as the inclusion of Roman
numerals at the beginning of a book). A PDPageLabel specifies:
The numbering style to use (for example, uppercase or lowercase Roman, decimal, and
so forth)
The starting number for the first page
An arbitrary prefix to be added to each number (for example, A- to generate A-1, A-
2, A-3, and so forth)
PDPageLabel methods include:
PDPath
A PDPath is a graphic object (a subclass of PDGraphic) representing a path in a page
description. Paths are arbitrary shapes made of straight lines, rectangles, and cubic curves.
Path objects may be filled or stroked, and they can serve as a clipping path. For details, see
the following sections in the PDF Reference:
Section 4.1, Graphic Objects
Section 4.4, Path Construction and Painting
PDPath methods include:
PDStyle
A PDStyle object provides access to information on the fonts, font sizes, and colors used
in a PDWord. PDStyle methods include:
PDText
A PDText is a graphic object (a subclass of PDGraphic) representing one or more
character strings on a page. For details, see the following sections in the PDF Reference:
Section 4.1, Graphics Objects
Section 5.3, Text Objects
Like paths, text can be stroked or filled, and can serve as a clipping path.
There are PDText methods to access the text-specific parameters in the graphics state. See
Section 4.3, Graphics State, in the PDF Reference for a discussion of graphics state. PDText
methods:
PDTextAnnot
A PDTextAnnot corresponds to a PDF text annotation. For details, see Text
Annotations in Section 8.4.5, Annotation Types, in the PDF Reference. You can use any
PDAnnot method on a PDTextAnnot.
Plug-ins can use PDTextAnnot methods to:
Get and set attributes including the rectangle, textual contents, and whether or not the
annotation is open.
Create new text annotations and delete or move existing ones using PDAnnot
methods.
Manipulate the behavior of text annotations by modifying the Text Annotation Handler.
The Acrobat SDK provides three useful macros to cast among PDAnnot and its text
annotation and link annotation subclasses. These are (see PDExpT.h):
CastToPDAnnot
CastToPDTextAnnot
CastToPDLinkAnnot
PDTextAnnot methods include:
PDTextSelect
PDTextSelect objects represent a selection of text on a single page, and may contain
more than one disjointed group of words. A text selection contains one or more ranges of
text, with each range containing the word numbers (in PDF order, as returned by
PDWordFinderEnumWords or PDWordFinderAcquireWordList) of the selected
words. Each range has a start word (the first word in the series) and an end word (the first
word not in the series).
PDTextSelect methods are useful for:
Processing a text selection created by a user via Acrobats user interface
NOTE: The first three methods above have new versions, with Ex appended, which let
you specify the version of the word finder algorithm to use (see PDWordFinder on
page 355).
PDThread
A thread corresponds to an article in Acrobats user interface, and contains an ordered
sequence of rectangles that bound the article. Each rectangle is called a bead. See Section
8.3.2, Articles, in the PDF Reference for more information on articles and beads in PDF.
Threads can be created interactively by the user or programmatically. They are internally
represented by a circular linked list of PDBeads.
NOTE: With Acrobat and the PDF Library, it is possible to spawn threads using operating
system mechanisms. Acrobat and PDF Library are capable of operating in a thread-
safe environment, but that capability isnot related to thePDThread object. For
more information on using operating system threads, see , Using Threads on
page 257.
PDThread methods include the following:
PDThumb
A PDThumb is a thumbnail preview image of a page.
PDTrans
A PDTrans represents a transition to a page. The Trans key in a page dictionary specifies a
transition dictionary, which describes the effect to use when going to a page and the
amount of time the transition should take. See Section 8.3.3, Presentations, in the PDF
Reference for more information on transitions. PDTrans methods include the following:
PDTransIsValid Tests whether a transition is valid, that is, the transition has
not been deleted.
PDTransNew Creates a new transition
PDViewDestination
A PDViewDestination represents a particular view of a page in a document. It contains
a reference to a page, a rectangle on that page, and information specifying how to adjust
the view to fit the windows size and shape. It corresponds to a PDF Dest array (see Named
Destinations in Section 8.2, Document-Level Navigation, in the PDF Reference) and can be
considered a special form of a PDAction.
PDViewDestination provides a number of methods to get or set the attributes
describing the location and size of the view, including the page, rectangle, and fit style.
PDViewDestination methods include:
PDWord
A PDWord object represents a word in a PDF file. Each word contains a sequence of
characters in one or more styles (see PDStyle on page 102).
All characters in a word are not necessarily physically adjacent. For example, words can be
hyphenated across line breaks on a page.
Each character in a word has a character type. Character types include: control code,
lowercase letter, uppercase letter, digit, punctuation mark, hyphen, soft hyphen, ligature,
white space, comma, period, unmapped glyph, end-of-phrase glyph, wildcard, word break,
and glyphs that cannot be represented in the destination font encoding. See Character
Type Codes in the Acrobat and PDF Library API Reference for details.
The PDWordGetCharacterTypes method can get the character type for each
character in a word. The PDWordGetAttr method returns a mask containing information
on the types of characters in a word. The mask is the logical OR of several flags, including
the following:
One or more characters in the word cannot be represented in the output encoding.
One or more characters in the word are punctuation marks.
The first character in the word is a punctuation mark (this bit is on in addition to the
punctuation bit).
The last character in the word is a punctuation mark (this bit is on in addition to the
punctuation bit).
The word contains a ligature (a special typographic symbol consisting of two or more
characters such as the English fi ligature used to replace the two-character sequence, f
followed by i). Ligatures are used to improve the appearance of a word.
One or more characters in the word are digits.
There is a hyphen in the word.
There is a soft hyphen in the word.
A words location is specified by the offset of its first character from the beginning of the
page (known as the character offset). The characters are enumerated in the order in which
they appear in pages content stream in the PDF file (which is not necessarily the order in
which the characters are read when displayed or printed).
A word also has a character delta, which is the difference between the number of
characters representing the word in the PDF file and the number of characters in the
word. The character delta is non-zero, for example, when a word contains a ligature.
PDWord methods include the following:
PDWordFinder
A PDWordFinder extracts words from a PDF file, and enumerates the words on a single
page or on all pages in a document. The core API provides methods to extract words from a
document, obtain information on the word finder, and to release a list of words after a plug-
in is done using it.
To create a word finder, use PDDocCreateWordFinder or
PDDocCreateWordFinderUCS. PDDocCreateWordFinderEx is a version 6.0
replacement for PDDocCreateWordFinder and PDDocCreateWordFinderUCS
that adds configurable word-breaking behavior.
There are two primary methods of using word finders:
Calling the method PDWordFinderEnumWords, which calls a user-provided
procedure each time a word is recognized on a page.
Using PDWordFinderAcquireWordList, which builds a word list for an entire page
before it returns. This method can return the recognized words in two possible orders:
The order in which the words are encountered in the PDF file.
According to word location on the page. For a page containing a single column of
text, this generally is the same as reading order. For a page containing multiple
columns of text, this is not true.
The PDWordFinder methods include:
PDXObject
This object corresponds to a PDF XObject (see Section 4.9, Form XObjects, in the PDF
Reference). PDXObject objects currently used by Acrobat are of one of the two X Object
subclasses: PDImage and PDForm. You can use any PDXObject method on these
objects.
Introduction
The PDFEdit API provides easy access to PDF page contents. With PDFEdit, your plug-in can
treat a pages contents as a list of objects rather than manipulating the content streams
marking operators.
Page content is a major component of a PDF file. It represents the visible marks on a page
that are drawn by a set of PDF marking operators. The set of marking operators for a page
also is referred to as a display list, since it is a list of marking operations that represent the
displayed portion of a page. See Section 3.7.1, Content Streams, in the PDF Reference for
an overview of page content streams and references to other chapters that describe the
marking operators in detail.
PDFEdit provides easy access to PDF page contents. PDFEdit is meant to be used in
conjunction with the Acrobat PD layer and Cos layer methods for manipulating PDF
documents. To use PDFEdit effectively, you should be familiar with PDF page marking
operators and the PD layer of the core API, described in Chapter 7.
PDFEdit works with the page contents associated with the Contents key in the page
dictionary (see section 3.6.2 in the PDF Reference). It can also handle Form XObject
appearances represented by the AP (appearances) key in an annotation dictionary. See
section 8.4.1 in the PDF Reference for the entries in an annotation dictionary.
Overview of PDFEdit
Why PDFEdit?
Acrobat Distiller and PDFWriter create documents from PostScript or as output from a
printer driver. Non-PDFEdit methods in the core API allow displaying and printing
documents, and provide the ability to rearrange pages and to add annotations. However,
most of these manipulations are creation-centered, or only deal with objects at the page
level and above. PDFEdit methods, on the other hand, allow your plug-in to deal with
objects at the level of a pages contents.
The content of a page either resides in a stream object or an array of stream objects. Inside
the stream, the elements of a page are not described as objects; they are described as
marking operators. There are graphic and clip states at any point in the page description.
This state is modified by other operators (such as SC, w, and so on). These streams are
difficult to manipulate using non-PDFEdit core API methods for these reasons:
What is PDFEdit?
PDFEdit provides an API to treat page contents as a list of objects whose values and
attributes can be modified. PDFEdit allows plug-ins to read, write, edit, and create page
contents and page resources, which may contain fonts, images, extended graphics states,
and so on. For details, see Section 3.7, Content Streams and Resources in the PDF
Reference. PDFEdit also provides mapping between document fonts and system fonts and
allows creating new page content objects.
PDFEdit offers these advantages:
PDFEdit objects are independent of each other. Each object encapsulates all the
relevant information about itself. A text object contains font attributes, for instance.
Your plug-in can use PDFEdit methods to modify the appearance of a page. It can
convert a pages content to a PDEContent (see PDFEdit Paradigm on page 358),
change the PDEContent, and then write it back to the page. Your plug-in also can
create pages from scratch.
PDFEdit Paradigm
PDFEdit converts page contents, XObjects, and charprocs to a PDEContent object for the
page. A PDEContent object contains a linear list of objects, which your plug-in can
manipulate or create from scratch. It can convert a PDEContent back to page contents
and resources, thus modifying the page. PDFEdit works with one page at a time.
The only effect of the ordering of objects in the display list is layering. Objects that occur
later in the display list can obscure earlier objects (or partially obscure them, with the
introduction in PDF 1.4 of transparency). There is no other meaning that the order provides.
For example, the fact that some text appears later in the list implies nothing about its
placement on the page.
When reading and modifying page display lists with PDFEdit, the resulting page stream
may be very different from the original. For example, there are many ways to represent the
text drawn on a page. PDFEdit is not constrained by the representation used in the original
page stream. The resulting stream will, of course, have exactly the same visual
representation if a plug-in simply reads a pages contents and then writes the contents back
using PDFEdit methods.
PDFEdit works mainly with the page contents associated with the Contents key in the page
dictionary of a PDF file.
PDFEdit Classes
PDFEdit defines a set of classes to represent the contents and resources of a page.
Figure 8.1 shows the PDFEdit class inheritance hierarchy.
Like the other core API classes, these classes are implemented as C structures rather than
C++ classes.
Basic Classes
PDEObject is the base class of all PDFEdit objects.
A page display list is represented as a PDEContent object that contains PDEElement
objects. Each PDEElement object is a path, text, image, form, or a marked content place
or container of PDEElements. Objects in the PDEContent are listed in the pages
drawing order. Your plug-in can add or remove objects inside a PDEContent. It can also
change attributes of objects in a PDEContent, such as a bounding box, a text font, or a
clipping path.
Each PDEElement contains its state: colors, matrix, fonts, and clip. Each PDEElement is
independent of the others. Therefore, the display list does not need to be traversed to
determine an objects clip or matrix. An element can be moved or copied from one display
list to another without relying on or altering the neighboring elements.
A plug-in can attach information to PDEElements. This information is identified by a client
ID and a client-provided key or tag. Any PDEElement can be queried for its client ID and
tag.
PDEContainer
PDEClip
PDEForm
PDEColorspace
PDEGroup
PDEContent
PDEImage
PDEDeviceN-
Colors
PDEPath
PDEObject
PDEElement
PDEPlace
PDEExtGState
PDEPS
PDEFont
PDESoftmask
PDEPattern
PDEText
PDEShading
PDEUnknown
PDEXGroup
PDEXObject
Several PDFEdit classes are container classes. A PDEContent is a list of the objects on a
page. A PDEContainer contains a set of PDEElements drawn on a page between
marked content operators. A PDEClip contains a set of path and text objects defining a
clipping path.
NOTE: Since all PDFEdit classes derive from the PDEObject class, your plug-in can cast
any PDFEdit object as a PDEObject and use it with PDEObject methods.
PDEElement Classes
PDEElement is the base class of page elements. The following classes represent these
elements:
PDEText Text.
NOTE: Since these classes all derive from the PDEElement class, your plug-in can cast any
object in these classes as a PDEElement and use it with PDEElement methods.
Example
The following sample outlines how to add text and a path to a page using PDFEdit
methods.
/* Get contents object for a page */
PDDoc pdDoc = PDDocCreate();
PDPage pdPage = PDDocAcquirePage(pdDoc, 0);
PDEContent pdeContent = PDPageAcquirePDEContent(pdPage, clientID);
Classes
PDFEdit has its own classes, distinct from the classes of objects used in a PDPage. For
instance, a PDEFont object is not a PDFont object.
NOTE: Two core PD layer methods were available in pre-4.0 Acrobat to describe the objects
in a page description, namely: PDPageEnumContents and
PDPageEnumResources. It is not recommended that you use either of these
methods in new plug-ins, as they cannot fully parse PDF files that are version 1.2 or
later.
Hit Testing
PDFEdit provides the ability to locate objects at a point. The PDEElementIsAtPoint
and PDEElementIsAtRect methods allow your plug-in to determine whether a point
or rectangle is on an element. PDETextIsAtPoint and PDETextIsAtRect provide
the same capability for text objects.
PDFEdit also allows your plug-in to specify exact placement on a page of text, graphics, and
path objects. If your plug-in knows where a user clicked on screen, it can convert the device
space coordinates to user space coordinates and determine which objects are beneath that
point.
Reference Counting
All PDEObjects contain a reference count. The reference count is initialized to 1 when an
object is created. The count is also incremented when an object is added to another object,
such as a PDEContent, and is decremented when it is removed from an object. When the
reference count becomes 0, the object is freed and the reference to the object is no longer
valid.
A plug-in may explicitly increment or decrement the reference count of an object using the
PDEAcquire and PDERelease methods, respectively. When a plug-in no longer needs
an object, it should call PDERelease.
Objects should only be disposed of with PDERelease if the method by which they were
obtained incremented the reference count for the object. In general, methods that get an
object do not increment the reference count. As you recall from Core API Methods on
page 25, methods that increment the reference count typically contain the word acquire
or create in the method name and specifically state that your plug-in must release the
object in the method description.
All of the Create methods, including the PDEContentCreateFromCosObj method,
set the reference count to 1 on the newly created object.
When a plug-in adds an object to a container, that containers reference count is
incremented. When a containers reference count becomes 0, it releases all of its contained
objects. Typically, if an object is created and added to a container, a plug-in should call
PDERelease immediately after the add operation. The object then has a reference count
of 1 and will be destroyed when its container is destroyed.
Your plug-in should take care when removing an object from one container and adding it
to another. It should acquire the object before removing it from the container. Otherwise,
the containers reference count could reach 0 when your plug-in removes it. In this
situation, adding the object to another container would be illegal since the object would
be invalid.
The Get methods in the API do not change the reference count. However, a plug-in must
be careful not to hold an object it did not acquire for too long, since a subsequent remove
operation on its container could destroy the object.
The Set methods increment the reference count of the object whose attribute is set. For
example, the PDETextRunSetFont method increments the reference count of the font.
Furthermore, the reference count of the previous attribute object (the older font in this
example) is decremented.
The PDEGraphicsState attribute contains references to up to five objects:
Fill and stroke color spaces
Fill and stroke color objects (if the color space is Pattern)
The ExtGState
(Some of these objects may be NULL.) The Get and Set rules apply to the component
references in this case.
A PDEObject may be contained or referenced by more than one PDEObject. This is
obvious in the case of resources such as fonts and color spaces. Other objects also may be
referenced multiple times. For example, a PDEElement may be contained in two
PDEContents.
The best approach a plug-in can take to reference counting is to:
Create its objects
Add the objects to a content object
Add the content object to a page
Release all the objects it created
Matrix Operations
Several PDEElements have matrixes associated with them.
PDFEdit flattens matrixes on input and output. When parsing a page content stream, it sets
the matrix of an element to the value of the current transformation matrix. When parsing a
path, the matrix is applied to the path segments. Thus, after parsing a page, paths have the
identity matrix, images contain the final image matrix, and text runs contain a single matrix
composed of the graphics state matrix, the text state matrix, and the text placement and
scaling operators.
The PDEElementSetMatrix method applies the matrix immediately to images;
PDETextRunSetMatrix applies the matrix immediately to text runs. The path matrix is
not applied to path segments until the page is emitted to a page content stream. After
emission, the path matrix is reset to the identity matrix. This operation is deferred because
it can be time consuming to apply the matrix to each path segment in a large path. Because
the matrix operation is deferred, a plug-in must always examine the path matrix when
processing path data.
Marked Content
PDFEdit supports the marked content operators. These operators provide a mechanism for
attaching additional meaning to locations and to objects in a page content stream. For
details, see Section 10.5, Marked Content, in the PDF Reference. The PDEPlace object
Resources
In PDF, page content streams do not directly refer to Cos resources. Instead, they refer to
them by a name that is used to look up the Cos resource in the Resources dictionary. When
reading and writing streams in an existing document, PDFEdit tries to preserve the original
page resource names. When this is not possible, PDFEdit generates new names as required.
PDFEdit maintains a list of names and Cos objects for each open document to which any
PDFEdit operation has been performed. Every time a stream is generated, PDFEdit consults
the database. If no name exists for a Cos object, it generates a new name and adds the
name to the database. If a name exists but is already in use by another Cos object, it
generates an alternative name. Thus, a single Cos object may be referenced by different
names in different page content streams.
For example, consider a document with two pages. Page 1 contains text set in Helvetica,
and the fonts page resource name is F1. Page 2 contains text set in Times-Roman, and the
fonts page resource name also is F1. Now, if a plug-in adds Helvetica text to page 2, it
cannot use the resource name F1, because F1 already refers to Times-Roman on this page.
Therefore, PDFEdit generates a new page resource name for the Helvetica added to page 2.
Each form (and Type 3 font) should contain a resources dictionary. It is the plug-ins
responsibility to put the resources dictionary in the forms attribute dictionary upon return
from the PDEContentToCosObj method when the PDEContent is a form.
Client Identifiers
Some methods such as PDEAddTag or PDPageAcquirePDEContent require a client
identifier (ID).
A plug-in should use its gExtensionID for the client ID.
NOTE: For the Adobe PDF Library, use a consistent value for the client ID throughout your
code; the value 0 is recommended.
When several plug-ins want to operate on the same page at the same time, they should use
a separate ID for each thread.
PDEFont gFont;
char buf[255];
PDEText pdeText = NULL;
PDETextState tState;
FixedMatrix matrix;
PDEFontAttrs textFontAttr;
PDEGraphicState gstate;
/* Set the text attributes, including font name and type of font */
/* Type of font could be Type1, MMType1, or TrueType */
memset(&textFontAttr, 0, sizeof(textFontAttr));
textFontAttr.name = ASAtomFromString(FONTNAME);
textFontAttr.type = ASAtomFromString("Type1");
gstate.fillColorSpec.space = pdeColorSpace;
gstate.miterLimit = fixedTen; /* constants */
gstate.flatness = fixedOne;
gstate.lineWidth = fixedOne;
pdeColorSpace =
PDEColorSpaceCreateFromName(ASAtomFromString("DeviceGray"));
PDEPathSetPaintOp(pdePath, kPDEFill);
gstate.lineWidth = fixedOne;
pdeColorSpace =
PDEColorSpaceCreateFromName(ASAtomFromString("DeviceGray"));
data = (char*)ASmalloc(sizeof(char)*10000);
if (data)
{
memset(&imageAttrs, 0, sizeof(PDEImageAttrs));
imageAttrs.flags = kPDEImageExternal;
imageAttrs.width = 100L;
imageAttrs.height = 100L;
imageAttrs.bitsPerComponent = 8L;
memset(&pdeColorValue, 0, sizeof(PDEColorValue));
pdeColorValue.color[0] = fixedZero;
memset(data, 0, 10000);
for (i = 0; i < 5000; i++)
data[i]=1;
stm = ASMemStmRdOpen(data, 10000L);
flag. In addition, it is possible for a plug-in to call PDEFontSubsetNow multiple times. The
subsetted data is rewritten with glyphs for any additional text used with the font.
A plug-in also can call PDEmbedSysFontForPDEFont to embed a system font,
including one for which kPDEFontWillSubset was specified. Therefore, the plug-in can
create a font with the kPDEFontWillSubset flag, and, at a later time, decide to leave
the font unembedded (by doing nothing), create the subset by calling
PDEFontSubsetNow, or embed the entire font by calling
PDEmbedSysFontForPDEFont.
Proper Use of Marked Content
Marked content allows a plug-in to identify, characterize, and organize a PDF file. For
instance, it may mark a set of paragraphs with style information. Similarly, a place in the
document may have information for looking up entries in a database. The structure that
marked content provides to a document can facilitate extracting data from a PDF file or
converting it to another file format. Structural information could be used by other
programs to implement PDF and Acrobat enhancements.
PDF marked content operators are used in page descriptions to indicate a part of the
stream that may be significant to an application other than a strict PDF consumer. These
operators attach a tag and, optionally, a property list, to part of the stream.
There are two kinds of marks, those that bracket a sequence of objects, and those that mark
a place in the stream. These operators may appear only between objects.
The BMC/EMC or BDC/EMC operators bracket an object sequence and correspond to the
PDEContainer, which contains a set of objects. This is useful for grouping objects that
belong together in some sense, defined by the document creator. Bracketed sequences
may be nested within each other, and thus a PDEContainer may contain other
PDEContainer objects.
Places are marked with either MP or DP operators. These correspond to the PDEPlace
object, which marks a place in the object list. Theoretically, your plug-in could bracket a
sequence of operators with a pair of related PDPlace objects, but this is not
recommended. Use the PDEContainer for enclosing a set of objects.
The BDC and DP operators take a property list dictionary argument; otherwise they
function identically to BMC and MP operators. Similarly, the PDEContainerCreate and
PDEPlaceCreate methods take an optional dictionary parameter, in addition to a tag for
the object. Use this dictionary to provide additional information about the
PDEContainer or PDEPlace, if needed.
For details on the marked content operators, see Section 10.5, Marked Content, in the PDF
Reference.
Object Dump
The PDEObjectDump enumeration method gets a text description of a given object.
Since objects can be nestedPDEContent objects can contain other objectsyour plug-
in specifies the nesting level for the children and attributes it wants to see. The
PDEObjectDumpProc callback specified in PDEObjectDump returns a buffer with text
describing each object.
The following example illustrates dumping a content object, pdecontent, to a file:
/* Dump the content object */
PDEContent pdecontent;
...
PDEObjectDump((PDEObject)pdecontent, 10,
ASCallbackCreateProto(PDEObjectDumpProc, myPDEObjectDumpProc),
NULL);
...
/* Dump callback function */
ACCB1 void ACCB2 myPDEObjectDumpProc(PDEObject pdeobject,
char* dumpInfo, void* clientData)
{
/* Output the data to a file */
FILE *f;
f=fopen(":PDEObjectDump.txt", "a");
if (f)
{
fprintf(f, "%s\n", dumpInfo);
fclose(f);
}
}
Here is a dump of a PDEContent object, showing its flags and number of elements,
among other information. It also includes the objects inside the PDEContent:
A path
An image
A text object
The number after the pound sign (#) is each objects reference count.
Content (0) #1 3a9d264
Content flags: none Num elems: 3
PDFEdit Methods
Dump Methods
Dump methods allow enumerating objects and their attributes. An objects information
can be dumped in human readable form. An object dump includes its reference count,
which is useful in debugging reference count problems. The Dump methods include:
General Methods
These utility methods simplify tasks, such as setting up graphics information structures and
merging resources for a page. The General methods include the following:
PDEClip
A PDEClip is a list of PDEElements containing a list of PDEPaths and PDETexts that
describe a clipping state. PDEClips can be created and built up with PDEClip methods.
Any PDEElement object can have PDEClip associated with it by using the
PDEElementSetClip method. The PDEClip methods include the following:
PDEColorSpace
A PDEColorSpace object is a reference to a color space used on a page. The color space
is part of the graphics state attributes of a PDEElement. See Sections 4.5, Color
Spaces, in the PDF Reference, for details on color spaces and color operators. The
PDEColorSpace methods include the following:
PDEContainer
A PDEContainer contains a group of PDEElements on a page. In the PDF file,
containers are delimited by the Marked Content operator pairs BMC/EMC or BDC/EMC.
Every PDEContainer has a Marked Content tag associated with it. In addition to
grouping a set of elements, a BDC/EMC pair specifies a property list to be associated with
the grouping. Thus a PDEContainer corresponding to a BDC/EMC operator pair also has
a property list dictionary associated with it.
For example, the following PDF marking operators would correspond to a PDEContainer
that contains several paths and has the tag PathABC:
\PathABC BMC
1 g
84.96 745.2 449.28 -9.596 ref
1 g
427.957 153.071 m
435.4 153.071 441.436 159.107 441.436 166.549
c
441.436 173.993 435.4 180.028 427.957 180.028
c
420.514 180.028 414.479 173.993 414.479
166.549 c
414.479 159.107 420.514 153.071 427.957
153.071 c
b
EMC
A PDEContainer is itself a PDEElement, so a PDEContainer can contain other
PDEContainer objects, which would reflect nested marked content operator pairs.
Marked content is useful for adding structure information to a PDF file. For instance, a text
processing program may have font and style information associated with a paragraph. You
may want to retain this information in the PDF file, and marked content provides a means
to do so.
See Section 10.5, Marked Content, in the PDF Reference, for information on marked
content and property lists.
A PDEPlace object allows marking a single point in a PDF file with information rather
than marking a group of objects.
The PDEContainer methods include:
PDEContent
The PDEContent object is the workhorse of the PDFEdit API, since it contains the
modifiable contents of a PDPage.
A PDEContent may be obtained from an existing page or from a form XObject or from a
Type 3 charproc. You can create an empty PDEContent. A PDEContent contains
PDEElements. In addition, a PDEContent may have attributes such as Form matrix and
setcachedevice parameters.
The simplest way to obtain the PDEContent for a page is with the
PDPageAcquirePDEContent method. After your plug-in modifies the content, it can
put it back in the page with PDPageSetPDEContent, using the same filters with which
the page was originally encoded.
Once your plug-in has the pages PDEContent, it can get, add, or remove elements with
PDEContent methods. It can modify individual page elements with the methods for
PDEElements, such as PDEText or PDEPath.
The PDEContent methods include:
PDEDeviceNColors
A color space with a variable number of device-dependent components. Usually used to
store multiple spot colors in a single color space. The PDEDeviceNColors methods
include, for example:
PDEElement
PDEElement is the base class for elements of a page display list (PDEContent) and for
clip objects. The general PDEElement methods allow you to get and set general element
properties.
PDEExtGState
A PDEExtGState object is a reference to an ExtGState resource used on a page. It
specifies a PDEElements extended graphics state, which is part of its graphics state, as
specified in a PDEGraphicState structure. See Section 4.3.4 in the PDF Reference, for
information on extended graphics states.
// The graphics state controls the various style properties of the text
// including color, weight, and so forth.
if (pdeExtGState) {
PDERelease ((PDEObject) pdeExtGState);
pdeExtGState = NULL;
}
END_HANDLER
For information on transparency, see Chapter 7 in the the PDF Reference.
PDEExtGState Methods
The PDEExtGState methods include the following:
PDEFont
A PDEFont object is a reference to a font used on a page. It may be equated with a font in
the system. A PDEFont is not the same as a PDFont; a PDEFont is associated with a
particular document.
See Chapter 5 in the PDF Reference for information on fonts.
A PDSysFont object represents a system font and is a distinct object from a PDEFont.
You can create a PDEFont from a system font with the PDEFontCreateFromSysFont
method.
Your plug-in can set the font of a text run with the PDETextRunSetFont method. The
PDEFont methods include the following:
PDEForm
A PDEForm is a PDEElement that contains a form XObject. Form XObjects are described
in Section 4.9, Form XObjects, in the PDF Reference. A PDEContent may be obtained
from a PDEForm to edit the forms display list. The PDEForm methods include:
PDEGroup
An in-memory representation of objects in a PDEContent. It has no state and is not
represented in any way in a PDF content stream (that is, PDEContent).
When used in a PDEClip, this object is used to associate PDEText objects into a single
clipping object. The PDEGroup methods include:
PDEImage
A PDEImage is a PDEElement that contains an image XObject or inline image. Image
XObjects and inline images are described in the following sections in the PDF Reference:
PDEObject
PDEObject is the abstract superclass of PDFEdit classes. You can find the type of any
object with the PDEObjectGetType method. You can then cast and apply that class
methods to the object. In addition, you can cast any of the PDFEdit objects to a
PDEObject and use it anywhere a PDEObject is called for, such as in the PDEObject
methods. PDEAcquire and PDERelease increment and decrement the reference
counts of a PDEObject.
PDEObject methods include:
PDEPath
A PDEPath is a PDEElement that contains a path. It can have fill and stroke attributes. It
also has graphics state attributes. The shape of a PDEPath can be used to represent a
clipping path.
The PDEPath methods allow constructing a path from segments and setting its fill and
stroke attributes. PDEPath methods include:
PDEPattern
A PDEPattern is a reference to a pattern resource used on a page. See Section 4.6 in the
PDF Reference, for information on patterns. PDEPath methods include:
PDEPlace
A PDEPlace is a PDEElement that marks a place on a page. In a PDF file, a place is
represented by the MP or DP marked content operators.
See Section 10.5, Marked Content, in the PDF Reference, for information on marked
content.
A PDEPlace object allows marking a particular group of objects in a PDF file, rather than
a place, with information.
PDEPlace methods include:
PDEPS
A PDEPS is a pass-through PostScript object. PDEPS methods include:
PDEShading
A PDEShading is a PDEElement that represents smooth shading. PDEShading
methods include:
PDESoftMask
A PDESoftMask is a reference to a SoftMask resource used to support transparency.
PDESoftMask methods include:
PDEText
A PDEText object is a PDEElement that represents text. It is a container for text as show
strings or as individual characters. Each subelement may have different graphics state
properties. However, the same clipping path applies to all sub-elements of a PDEText.
Also, the charpath of a PDEText object can be used to represent a clipping path.
Text consists of text runs, which are runs of characters in a PDF file with the same attributes.
For instance, the text in the string before a Tj operator would constitute a text run or part of
a text run. PDFEdit combines text from multiple Tj operators into a single text run, when
possible.
NOTE: All text is in text runs. Its possible for a text run to be a single character.
Many PDEText methods take an index parameter to indicate a text position. These
methods also take a PDETextFlags parameter to indicate whether a plug-in is accessing
the text by characters or by text runs. If the plug-in uses the kPDETextChar flag, the
index is the character offset from the beginning of the text element. This lets a plug-in
ignore the fact that the PDEText consists of text runs. If a plug-in uses the kPDETextRun
flag, the index is the index of the text run in the text element. Accessing text by text run is
faster than accessing text a character at a time.
A plug-in can get and set attributes (such as the font or text matrix) of a PDEText object
with PDEText methods. PDEText methods include:
PDETextItem
A PDETextItem is a PDEElement representing a text object. PDETextItem methods
include:
PDEUnknown
A PDEUnknown is a PDEElement representing an unknown element. The
PDEUnknownGetOpName method gets the operator name of an unknown operator.
PDEXGroup
A PDEXGroup is a reference to an XGroup resource used to support transparency.
PDEXGroup methods include, for example:
PDEXObject
A PDEXObject object is a PDEElement representing an arbitrary XObject. See Section
4.7, External XObjects, in the PDF Reference, for information on XObjects. PDEXObject
methods include:
NOTE: Use the appropriate methods for PDEForm and PDEImage objects. Do not use
PDEXObject methods.
PDSysEncoding
A PDSysEncoding is a subclass of PDEElement that provides system encoding for a
PDF file. PDSysEncoding methods include:
PDSysFont
A PDSysFont is a reference to a font installed on the host system. PDSysFont methods
allow your plug-in to list the fonts available on the host system and to find a font on the
system that matches a PDEFont, if it is present.
The PDSysFont and PDEFont classes are distinct. Your plug-in can create a PDEFont
from a system font with the PDEFontCreateFromSysFont method. It can determine
what system fonts are available using the PDEnumSysFonts and PDFindSysFont
methods.
PDSysFont methods include:
Introduction
PDF files are well known for representing the physical layout of a document; that is, the
page markings that comprise the page contents. In addition, PDF versions 1.3 and beyond
provide a mechanism for describing logical structure in PDF files. This includes information
such as the organization of the document into chapters and sections, as well as figures,
tables, and footnotes.
Further, PDF 1.4 and Acrobat 5 introduced tagged PDF, which is a particular use of
structured PDF that allows page content to be extracted and used for various purposes
such as reflow of text and graphics, conversion to file formats such as HTML and XML, and
accessibility to the visually impaired.
This chapter describes how to create and access structure information in a PDF document.
The PDSEdit methods in the core API provide access to this capability.
To use PDSEdit effectively in the plug-ins you write, you should understand how logical
structure is represented in a PDF file. For details, see Section 10.6, Logical Structure, in the
PDF Reference.
asdflkjljasldfjljlajsdfljljlajsdlfjlja;sjdf;j;lj
P asdlfkjljasdflkjl;jasdlfjljasldjfljlasjdfljljadsf
alkjasdflkjljasdfljljasldfjljlasjdfljljalsdjfljlasdf
asdflkjljasdflkjlajsdljlajsdflkjlkjasdfljljasdf
asdfljasdfjlkjasdfljl;kjwoiulkajdlknlvaoijsd
lkasdflk;joiwlknbnsdoinowoinoinodinoisiolkclkjsf
lkasdlknboijasldfnlkansduojsdflnalsnfoiusdn
sdfoiulknaslnvaoinolnfdoisadfjlkasdfljljasdlfkjljas
asdfoioasfd
Article P asdoioiuasdf
sdfoijosdfjoijoasdifjoijojsaofdjoj
asdlfkjqwoeinblknalskdfjlkajsdflkjl
asdflkjlasdflkjasdf
Drawing asdflkjljasdflkjlkjasdlfkj
asdflkjljasdflkjlajsdflkjaslkdj
In fact, HTML logical structure can be preserved in a PDF document. The Web Capture
feature introduced in Acrobat 4.0 allows converting HTML to PDF. Such PDF may optionally
contain structure information from the HTML data. Acrobat 4.0 can generate bookmarks
from this structure data.
the pdfmarks. This approach requires the authoring application to add structure pdfmarks
to the PostScript code it generates, or for some other application to generate the pdfmarks.
See the pdfmark Reference for more information.
PDSEdit Classes
PDSEdit is organized around a set of classes representing structure components.
PDSTreeRoot
All logical structure information is in the structure tree, and the PDSTreeRoot is its root.
There is at most one PDSTreeRoot in each document. PDSTreeRoot methods include:
PDSElement
PDSElement is the basic building block of the structure tree. It represents PDF structural
elements, which are nodes in a tree, defining a PDF documents logical structure.
PDSElement methods include:
PDSAttrObj
A PDSAttrObj represents a structure attribute object, which is a Cos dictionary or stream
describing attributes associated with a PDSElement. The attributes data may be
application-specific, suiting the application that adds or extracts logical structure
information. An attribute object can have a revision number to indicate whether other
applications have modified either the associated element or the elements contents since
the application created or modified the element. PDSAttrObj methods include:
PDSMC
Portions of a pages contents may be wrapped with marked content operators. A PDSMC
object represents this marked content. A tag and an optional property list may be
associated with a PDSMC. PDSMC is identical to the PDFEdit class PDEContainer.
PDSMCs may be nested. The PDSMC methods include:
PDSOBJR
An object reference (OBJR) is a reference to a PDF object. A PDSOBJR object references an
entire Cos dictionary or stream. The PDSOBJR object has one method:
PDSClassMap
The PDSClassMap (or class map) associates class names with a set of attribute objects. A
structural element may have a list of names identifying the classes to which it belongs.
Associated attributes are shared by all structural elements belonging to a given class. There
is only one class map per document, associated with the PDSTreeRoot. PDSClassMap
methods include:
PDSRoleMap
Each structure element must have a structure type. The definition of such types is
application-specific. In addition, PDF 1.3 defines a standard set of structure types for logical
structure in PDF documents. The role map (PDSRoleMap) maps application-specific
element types to the standard element types that have a similar function. There is only one
PDSRoleMap per document, associated with the PDSTreeRoot.
The structure tree root may contain a role map, which can help you identify elements that
serve common uses in the structure. You should call PDSTreeRootGetRoleMap to get
the tree roots role map.
The structure tree root may also hold a class map, which associates sets of attributes with
elements in the structure tree. You can get the class map with the
PDSTreeRootGetClassMap method.
Structure Elements
The actual structure elements or PDSElements of a document are grouped into subtrees
that are attached to the structure tree root. Each subtrees root is itself a PDSElement to
which other PDSElements may be attached.
Call PDSTreeRootGetNumKids to get the number of elements attached to the tree root.
To obtain each of these elements, use the PDSTreeRootGetKid method.
This example:
Gets the structure tree root
Checks if the tree root has children
Gets the last child
PDSTreeRoot treeRoot;
if (!PDDocGetStructTreeRoot(pdDoc,&treeRoot))
return; /* no structure tree */
ASInt32 numKids;
if ((numKids = PDSTreeRootGetNumKids(treeRoot)) == 0)
return; /* no kids */
PDSElement listElement;
/* get last kid /*
PDSTreeRootGetKid (treeRoot, numKids - 1, &listElement);
pointerKid. This method optionally provides the page on which an object or marked
content child is located.
Suppose you want to traverse the entire structure tree, looking for an element or a set of
elements that satisfy some search criteria. The PDSTreeRootGetNumKids and
PDSTreeRootGetKid methods allow it to get the elements in the root of the structure
tree. You can then use PDSElementGetNumKids and PDSElementGetKid to traverse
the children of each element it encounters. Since the structure is a tree, it lends itself to
recursive handling.
If a child is a PDSElement, it may have children of its own, which you can examine as
indicated above. Given a PDSElement, you can use PDSElement class methods to
determine the type (also called its tag name), title, and attributes.
If the child is a PDSOBJR, it can be a reference to a Cos dictionary or Cos stream object on a
page. For instance, the object referenced may be an XObject representing an image.
Handling of object references in the structure tree typically is application-specific.
If the child is a marked content element, you can use PDFEdit methods to examine it. For
example, it can see what text the marked content element contains or copy the content to
another document.
NOTE: A marked content object is referred to as type PDSMC in the PDSEdit API, and this is
actually a synonym for the PDFEdit class PDEContainer. Be sure to cast objects
appropriately and observe the conventions for acquiring and releasing PDFEdit
objects.
For more information, see Chapter 8, PDFEdit LayerCreating and Editing Page Content.
The example below:
Gets the children of an element
Looks for a marked content element
Gets the marked content
In this example, the element contains a list of other elements as children, and marked
content may be attached to these children.
/* Get the number of kids*/
ASInt32 listLength = PDSElementGetNumKids(listElement);
if (!listLength)
return; /* no kids */
/* Extract information from each kid */
ASInt32 i; for (i = 0; i < listLength; i++) {
CosObj cosObjKid, cosObjKid1;
PDSMC mcKid;
ASAtom kidType = PDSElementGetKid(listElement, i, &cosObjKid,
(void**)&mcKid, NULL);
if (kidType != ASAtomFromString("StructElem"))
continue; /* Not a structure element */
/* Look at first kid of structure element */
kidType = PDSElementGetKid((PDSElement)cosObjKid,0, &cosObjKid1,
(void**)&mcKid, NULL);
if (kidType != ASAtomFromString("MC"))
continue; /* Not an MC */
/* Got the MC. Get its content. */
PDEContainer pdeContainer = (PDEContainer)mcKid;
PDEContent markedContent = PDEContainerGetContent(pdeContainer);
/* Process the marked content */
...
}
Object Attributes
An element may have attributes representing application-specific information. Attributes
are Cos dictionaries or Cos streams. You can use PDSElementGetNumAttrObjs and
PDSElementGetAttrObj to iterate through the attribute objects attached to an
element. You can filter these attribute objects according to their revision number (as
mentioned in PDSEdit Classes on page 404) by comparing the returned revision number
from PDSElementGetAttrObj with the revision number of the element returned by
PDSElementGetRevision.
Once you have an attribute object, you may examine the object using standard Cos-level
methods. Note that each attribute object may contain zero or more attributes. The
attributes of an element are the union of the attributes given by all the attribute objects.
Structure Elements
Creating structure using PDSEdit is mainly a process of creating elements with
PDSElementCreate, connecting them using PDSElementInsertKid, and attaching
the resulting subtrees to the structure tree root using PDSTreeRootInsertKid. You
can also construct the tree by adding PDSElements to the tree root, then adding children
to these PDSElements. Or you can do a combination of these.
Create a structural element by calling PDSElementCreate. You must set its type with
PDSElementSetType before doing anything else with it. You may optionally set an
elements ID, title, and alternate text representation with the respective methods,
PDSElementSetID, PDSElementSetTitle, and PDSElementSetAlt.
The PDSClassMapAddAttrObj method adds an attribute object to an element.
PDSElementAddClass adds a class to an element.
The example below:
Creates a PDDocs structure tree root if one does not exist
PDSTreeRoot treeRoot;
if (!PDDocGetStructTreeRoot(pdDoc, &treeRoot))
PDDocCreateStructTreeRoot(pdDoc, &treeRoot);
PDSElement listElement;
PDSElementCreate(pdDoc, &listElement);
PDSElementSetType(listElement, ASAtomFromString("L"));
/* list element */
#define TEXT_LIST "Text element list"
PDSElementSetTitle(listElement,(const ASUns8*)TEXT_LIST,
strlen(TEXT_LIST));
PDSTreeRootInsertKid(treeRoot, listElement,
PDSTreeRootGetNumKids(treeRoot));
PDSElement listItemElement;
PDSElementCreate(pdDoc, &listItemElement);
#define TEXT_ELEMENT "A text element"
PDSElementSetType(listItemElement, ASAtomFromString("LI"));
/* list item */
PDSElementSetTitle(listItemElement, (const ASUns8*)TEXT_ELEMENT,
strlen(TEXT_ELEMENT));
/* Put marked content into element */
PDSElementInsertMCAsKid(listItemElement,pageCos,(PDSMC)pdeContainer, 0);
PDPageRelease(pdPage);
Class Map
You can create a class map in the structure tree root with
PDSTreeRootCreateClassMap, which provides the class map created. You can get an
existing class map in a structure tree with PDSTreeRootGetClassMap. There is only
one class map in a PDF document.
To add an attribute for a class to the class map, use PDSClassMapAddAttrObj. If the
class does not already exist in the class map, it is created and the attribute added to it.
PDSClassMapRemoveClass removes a given class from the class map.
PDSClassMapRemoveAttrObj removes an attribute from a given class in the class
map.
Role Map
PDSTreeRootCreateRoleMap creates a role map in a structure tree and provides the
newly-created role map. PDSTreeRootGetRoleMap obtains an existing role map. A PDF
document has only one role map.
To specify that a user-defined element type has the role of a standard element type, call
PDSRoleMapCopy. For more information, see Section 10.7, Tagged PDF in the PDF
Reference.
The Cos layer provides access to the low-level object types and file structure used in PDF
files. PDF documents are trees of Cos objects. Cos objects represent document components
such as bookmarks, pages, fonts, and annotations, as described in Section 3.6, Document
Structure, in the PDF Reference.
Unlike using the AV and PD layer methods, using Cos layer methods improperlycould result
in an invalid PDF file. Therefore, you should not use Cos methods unless necessary, for
example to add private data to portions of a PDF file that cannot be accessed in other ways.
This chapter describes the Cos object types, data structures, and methods. See the Acrobat
and PDF Library API Reference for detailed information on each method. See Section 3.4,
File Structure, and Section 3.6, Document Structure, in the PDF Reference, for details on
file structure and Cos objects. The Acrobat SDK Plug-in Guide also includes a chapter on
using Cos object methods.
File Structure
A PDF file consists of four sections:
A one-line header specifying the PDF version.
A body, which is a sequence of objects representing a PDF document.
A cross-reference table containing information allowing access to indirect objects in the
file.
A trailer containing information on certain special objects in the file.
There is one entry in the cross-reference table for each indirect object in a file; the entry
specifies the byte offset of the object from the beginning of the file. When a file is opened, if
Acrobat determines that the offsets are incorrect (indicating that the file has been
damaged in some manner), it attempts to rebuild the cross-reference table as described in
Appendix C.1 in the PDF Reference.
Multiple files may be open simultaneously. Each open file is represented by a document
pointer, and all indirect objects must be associated with a document. However, objects
belonging to one document cannot be stored in objects in another document. The Cos layer
uses ASStm objects to access a files contents.
CosDoc
A CosDoc object is the Cos layer representation of an entire PDF file. See Appendix B for an
overview of PDF document structure. See Section 3.6.1, Document Catalog, in the PDF
Reference, for a description of the catalog dictionary.
CosObj
A CosObj is a general object in a PDF file, which may be of any Cos object type.
The Cos layer provides several methods that are not specific to any particular object.
Several methods are available to manipulate a Cos object and include:
CosObjCollection
The CosObjCollection is an opaque structure representing a set of Cos objects
associated with a particular Cos document. The initial value of a variable of type
ObjCollection is undefined. Use CosNewObjCollection to create a collection.
Any indirect object whose generation number is zero and which is not a stream may be
added to at most one CosObjCollection. When the file is saved, all the objects in a
given collection are stored together in the PDF file, in one or more object streams (see the
PDF Reference), which are normally compressed in order to reduce file size.
Collections allow grouping of objects that are likely to have a similar usage pattern. If one
of them is required (and therefore decompressed), they are likely to all be required, but it is
possible that none will be required. For example, there could be a collection that stores
bookmarks. If the user never opens the bookmarks panel in Acrobat, none of the objects
need to be decoded. If the user opens the bookmarks panel, it is likely they will all be
needed, and having them together in the PDF file reduces the amount of time needed to
load them all.
The CosObjCollection methods allow you to compare collections and iterate over the
objects in a collection. CosObjCollection methods include:
CosArray
Cos arrays are one-dimensional collections of objects accessed by a numeric index. Array
indexes are zero based. An arrays elements may be any combination of the Cos data types.
The CosArray methods include:
CosBoolean
Cos boolean objects can have a value of true or false. The CosBoolean methods
include:
CosDict
A Cos dictionary is an associative table whose elements are pairs of objects:
The first element of a pair is the key, which is always a name object, a sequence of
characters beginning with the forward slash (/) character.
The second element is the Cos object representing the value.
See Section 3.2.6 in the PDF Reference for details.
The CosDict methods include
CosFixed
Fixed numbers may only be in decimal format. See Section 3.2.2 in the PDF Reference, for
details. The CosFixed methods include:
CosInteger
Integers may be specified by signed or unsigned constants. See Section 3.2.2 in the PDF
Reference, for details. CosInteger methods include:
CosName
A name is a sequence of non-white space characters. In code, a name is preceded by the
forward slash (/) character indicating that it is a string literal, for example:/AName.
See Section 3.2.4 in the PDF Reference, for details. The CosName methods include:
CosNull
There is only one NULL object, which is used to fill empty or uninitialized positions in arrays
or dictionaries. See Section 3.2.8 in the PDF Reference for details.
CosNewNull is a method that gets a NULL Cos object.
CosStream
A stream is a sequence of characters that can be read a portion at a time. Streams are used
for objects with large amounts of data, such as images, page content, or private data a
plug-in creates. A stream consists of these elements, which are listed in their relative order
in the stream object, starting at the beginning.
See Section 3.2.7 in the PDF Reference, for a description of the stream object. CosStream
methods include:
CosNewStream Creates a new Cos stream, using data from an existing ASStm.
CosNewStream64 Creates a new Cos stream, using data from an existing ASStm.
CosStreamLength64 Gets the length of a Cos stream from the Length key in the
stream's attributes dictionary.
CosStreamOpenStm Creates a new, non-seekable ASStm for reading data from a Cos
stream.
CosStreamPos Gets the byte offset of the start of a Cos streams data in the PDF
file.
CosStreamPos64 Gets the byte offset of the start of a Cos stream's data in the PDF
file.
CosString
A string is a sequences of characters, enclosed in parentheses. See Section 3.2.3 in the PDF
Reference for details. CosString methods include:
Encryption/Decryption
The Cos layer provides methods to encrypt and decrypt data in arbitrary memory blocks.
The encryption and decryption uses Acrobats built-in algorithm (RC4 from RSA Data
Security, Inc.) and a key that can be specified. methods include:
Plug-ins and PDF Library applications can add new types of tools, annotations, actions, file
systems, and so on, thereby expanding the number of object types that Acrobat supports.
To accomplish this, plug-ins and PDF Library applications provide a collection of callback
routines called handlers. Handlers perform the necessary functions for the objects, such as
creating and destroy them, drawing, and handling mouse clicks, keyboard events, and
other events as appropriate for their objects.
NOTE: The PDF Library, since it does not have access to AV-layer APIs, can provide handlers
only for a few of the capabilities described in this chapterspecifically, file systems
(see File Systems) and file specification handlers (see File Specification Handlers).
NOTE: These types of handlers are distinct from exception handlers (see Chapter 13,
Handling Errors).
To add a new handler, a plug-in must write the callback routines, create the appropriate
data structure containing the callbacks and other data, and pass the structure to Acrobat
using the appropriate API method. Subsequently, Acrobat automatically calls the correct
callbacks when it encounters an object of the type handled by the handler.
This chapter describes several types of handlers and shows the which data structures,
callbacks and methods are involved in creating them.
It is possible to subclass existing handlers or to create entirely new types of handlers. For
example, a plug-in could subclass the built-in text annotation handler by adding the ability
to hide annotations. To accomplish this, the plug-in would :
Obtain the built-in text annotation handler structure (using
AVAppGetAnnotHandlerByName).
Copy the structure before modifying it (not modifying the original).
Replace the handlers Draw callback with one that calls the built-in Draw callback
(obtained from the structure) if annotations are visible, or simply return without
drawing anything if annotations are hidden.
Register the new handler (using AVAppRegisterAnnotHandler with a new type).
If a handler requires more data than provided in the predefined structures described in this
section, you can append additional data to the predefined structures. To do this, create a
new structure type with the predefined structure as its first member and the additional
data as subsequent members. Before passing the expanded structure to the Acrobat
method, cast the structure to the predefined structure type. Upon return of the structure
from Acrobat, re-cast the structure to its expanded type to access the appended data.
Each handler data structure contains a size field, which specifies the structures size. This
field provides future compatibility. Different versions of the structure have different sizes,
allowing Acrobat to determine which version your plug-in was written to use.
NOTE: Regardless of whether your plug-in adds data to the predefined structures, it always
must pass the size of the predefined structure (rather than the size of its expanded
structure) in the size field.
Action Handlers
Support for new action types can be added by defining and registering an action handler.
The Acrobat Weblink plug-in uses this ability to add support for URL links.
To add a new action type, a plug-in must provide a set of callbacks, specify them in the
AVActionHandlerProcs structure, and call AVAppRegisterActionHandler to
register them (see the Acrobat and PDF Library API Reference for details). The callbacks
include ones that:
Perform the action, such as setting the view to that specified by the destination
(AVActionPerformProc).
Allow the user to set the actions properties (necessary only if any properties can be set).
(AVActionDoPropertiesProc).
Initialize an actions dictionary with default values.
(AVActionFillActionDictProc).
Display a string containing brief instructions for the action.
(AVActionGetInstructionsProc).
Display various text strings to be used in dialogs. (AVActionGetButtonTextProc,
AVActionGetStringOneTextProc, AVActionGetStringTwoTextProc).
Copy the action (AVActionCopyProc).
For details on each of the callbacks in an action handler, see the description of
AVAppRegisterActionHandler in the Acrobat and PDF Library API Reference.
Annotation Handlers
Support for new annotation types in Acrobat can be added by defining and registering an
annotation handler. The Acrobat Movie plug-in, for example, uses this to support video
annotations.
To add a new annotation type, a plug-in must provide a set of callbacks, specify them in the
AVAnnotHandler structure, and register them with AVAppRegisterAnnotHandler
(see the Acrobat and PDF Library API Reference for details). The callbacks include ones that:
Draw the annotation (AVAnnotHandlerDrawProc).
Handle mouse clicks in the annotation (AVAnnotHandlerDoClickProc).
Control the cursor shape when the cursor is over the annotation
(AVAnnotHandlerAdjustCursorProc).
AVCommand Handlers
Introduced in Acrobat 5.0, an AVCommand represents an action that the user can perform
on the current document or the current selection in the current document. AVCommands
are exposed to Acrobat through AVCommand handlers. A plug-in can add new command
types in Acrobat by defining and registering an AVCommand handler. Commands can be
executed interactively, programmatically, or through batch processing.
Supporting Properties
When building a list of batchable commands, Acrobat iterates through its internal
command list, querying each command for the "CanBatch" and "GroupTitle" properties. To
be exposed through the batch framework user interface, a command must support these
properties (that is, return true and a valid ASText object, respectively, when Acrobat
queries them).
To accomplish this, the AVCommand handler must implement the GetProps callback of
the AVCommandHandlerRec structure.
If an AVCommand supports these properties, Acrobat queries a number of additional
properties as the user interacts with the batch framework. Of these additional properties,
only two are required: Title and "Generic Title". A command must provide the title strings
that will be displayed in the Batch Sequences and Batch Edit Sequence dialogs. See the
Acrobat and PDF Library API Reference for a complete description of the various AVCommand
properties.
const char *kCmdTitle = "Command Title";
const char *kGroupTitle = "Group Title";
const char *kCmdGenericTitle = "Generic Title";
Selection Servers
A selection server allows the selection of a certain type of data, such as annotations, text, or
graphics. Plug-ins can create new selection servers to allow the selection of types of data
not already supported. To add a new selection server, a plug-in must provide a set of
callbacks, specify them in the AVDocSelectionServer data structure, and register
them using AVDocRegisterSelectionServer.
The callbacks include ones that:
Return the selection type serviced by the handler (AVDocSelectionGetTypeProc).
Tools
To add a new tool, a plug-in must provide a set of callbacks, specify them in the AVTool
data structure, and register them using AVAppRegisterTool..
The callbacks include ones that:
Activate the tool; that is, do whatever is necessary when the tool is selected
(ActivateProcType)
Deactivate the tool; that is, do whatever is necessary when another tool is selected
(DeactivateProcType)
Handle mouse clicks (DoClickProcType).
Handle key presses (DoKeyDownProcType).
Control the shape of the cursor (AdjustCursorProcType).
Return the tools name (GetTypeProcType).
Indicate whether the tool stays active after it is used once
(IsPersistentProcType).
Determine whether the tool is enabled. For example, if a tool is meant to be used within
documents, but there are no documents open, it probably makes no sense to activate
the tool (AVComputeEnabledProc).
See the description of AVTool in the Acrobat and PDF Library API Reference for a complete
list of the callbacks.
Window Handlers
When a plug-in creates a window, it can register the window, so that it behaves like other
windows in Acrobat, for example, when the Acrobat is minimized or hidden. For each
window that a plug-in provides, a window handler must be provided.
NOTE: Window handlers are used only in the Macintosh version of the Acrobat. Windows
and UNIX versions of Acrobat instead use the platforms native window handling
mechanisms.
To define a window handler, a plug-in must provide a set of callbacks, specify them in an
AVWindowHandler structure, and pass the structure to AVWindowNew or
AVWindowNewFromPlatformThing.The window handlers callbacks are automatically
called by Acrobat. Default behavior is used for any missing callbacks.
The callbacks include ones that:
Handle mouse clicks in the window (AVWindowMouseDownProc).
Handle keystrokes in the window (AVWindowKeyDownProc).
Draw the windows contents (AVWindowDrawProc).
Permit or prevent closing of the window (AVWindowWillCloseProc).
Clean up after the window has been closed (AVWindowDidCloseProc).
Do anything that must be done when the window is activated or deactivated
(AVWindowDidActivateProc, AVWindowWillDeactivateProc).
Do anything that must be done when the window becomes responsible for handling
keystrokes or loses responsibility for handling keystrokes
(AVWindowDidBecomeKeyProc, AVWindowWillResignKeyProc).
Permit or constrain window size changes (AVWindowWillBeResizedProc).
Determine whether the Cut, Copy, Paste, Clear, SelectAll, and Undo menu items are
enabled (AVWindowCanPerformEditOpProc).
Perform Cut, Copy, Paste, Clear, SelectAll, and Undo operations
(AVWindowPerformEditOpProc).
Control the shape of the cursor when it is within the window
(AVWindowAdjustCursorProc).
For a complete list of callbacks in a window handler, see the description of
AVWindowHandler in the Acrobat and PDF Library API Reference.
File Systems
Plug-ins can add new file systems to Acrobat, to access files on a device that cannot be
accessed as a local hard disk, such as a socket or a modem line.
To add a new file system, a plug-in must provide a set of callbacks and specify them in the
ASFileSysRec structure. This structure is passed as a parameter to calls that require a file
system. Unlike some of the other handlers in this chapters,there is no explicit registration.
The callbacks include ones that:
Open (ASFileSysOpenProc) or close (ASFileSysCloseProc) a file.
Flush a files buffered data to disk (ASFileSysFlushProc).
Get or set the current position in a file (ASFileSysSetPosProc,
ASFileSysGetPosProc) .
Get or set a files logical size (ASFileSysGetEofProc or ASFileSysSetEofProc)
.
Read data from a file (ASFileSysReadProc) .
Write data to a file (ASFileSysWriteProc) .
Delete a file (ASFileSysRemoveProc) .
Rename a file (ASFileSysRenameProc) .
Get a files name (ASFileSysGetNameProc)
Determine the amount of free space on a volume
(ASFileSysGetStorageFreeSpaceProc).
Get a file systems name (ASFileSysGetFileSysNameProc) .
Test whether two files are the same (ASFileSysIsSameFileProc) .
Get a pathname to a temporary file (ASFileSysGetTempPathNameProc) .
Copy a pathname (not the underlying file) (ASFileSysCopyPathNameProc) .
Convert between device-independent and device-dependent pathnames
(ASFileSysDiPathFromPathProc) .
Dispose of a pathname (not the underlying file)
(ASFileSysDisposePathNameProc) .
Flush data on a volume (ASFileSysFlushVolumeProc) .
Handle asynchronous I/O (ASFileSysAsyncReadProc,
ASFileSysAsyncWriteProc) .
Handle multiple read requests (ASFileSysMReadRequestProc) .
For details on each of the callbacks in a file system, see the description of ASFileSysRec
in the Acrobat and PDF Library API Reference.
Progress Monitors
Progress monitors provide feedback to a user on the progress of a time-consuming
operation. Some potentially time-consuming methods in the core API require a progress
monitor as a parameter. Acrobat has a default progress monitor, which generally is
sufficient for plug-ins to use. The built-in progress monitor can be obtained using
AVAppGetDocProgressMonitor.
Plug-ins can use the default progress monitor or implement their own by providing a set of
callbacks, specifying them in the ASProgressMonitorRec data structure, and passing a
pointer to the structure to the methods that require a progress monitor. (There is no explicit
registration method.)
NOTE: Prior to Acrobat 5.0, the ProgressMonitorRec structure was used.
Plug-ins can also use a progress monitor (either the built-in one or their own) to display
progress when they carry out a time-consuming task. To do this, they simply call the
progress monitors callbacks directly.
NOTE: Plug-ins that perform time-consuming tasks should, in general, allow the user to
cancel them (see AVAppGetCancelProc).
The progress monitor callbacks include ones that :
Initialize the progress monitor and display it with a current value of zero
(PMBeginOperationProc).
Draw a full progress monitor, then remove the progress monitor from the display
(PMEndOperationProc).
Set the value that corresponds to a full progress monitor display
(PMSetDurationProc).
Set the current value of the progress monitor and update the display
(PMSetCurrValueProc).
Get the progress monitors maximum value (PMGetDurationProc).
Get the progress monitors current value (PMGetCurrValueProc).
For details, see the description of ASProgressMonitorRec in the Acrobat and PDF
Library API Reference.
Transition Handlers
Transitions allow effects such as dissolves or wipe-downs when displaying a new page. New
transition types can be added by defining and registering a transition handler.
To add a new transition, a plug-in must provide a set of callbacks, specify them in the
AVTransHandler data structure, and register them using
AVAppRegisterTransHandler. The callbacks include ones that:
This chapter describes the document security features of the Acrobat core API. It discusses:
Encryption and decryption of PDF files so that only authorized users can read them.
Security handlers, which are the primary mechanism for controlling access to a file. They
contain code that performs user authorization and sets permissions. Acrobat has a built-
in security handler; plug-ins can alter Acrobats security system by adding new security
handlers.
New security features in Acrobat 5.0.
Security Handlers
The code that performs user authorization and sets permissions is known as a security
handler. The core API has one built-in security handler. This security handler supports two
passwords:
A user password that allows a user to open and read a protected document with
whatever permissions the owner chose
An owner password that allows a documents owner to also change the permissions
granted to users
Plug-ins can use the core APIs built-in security handler, or they can write their own security
handlers to perform user authorization in other ways (for example, by the presence of a
specific hardware key or file, or by reading a magnetic card reader). A security handler
provided by a plug-in can use Acrobats built-in dialog boxes for entering passwords and
for changing permissions.
Security handlers are responsible for:
Setting permissions on a file.
Authorizing access to a file.
Setting up a files encryption and decryption keys.
Maintaining the encryption dictionary of the PDF file containing the document.
Security handlers are used when:
A document is opened The security handler must determine whether a user is
authorized to open the file and set up the decryption key that is used to decrypt the PDF
file. See Opening a File on page 445.
A document is saved The security handler must set up the encryption key and write
whatever extra security-related information it wants into the PDF files encryption
dictionary. See Saving a File on page 447.
A user tries to change a documents security settings The security handler must
determine whether or not the user is permitted to do the operation. See Setting a
Documents Security on page 447.
A document may have zero, one, or two security handlers associated with it. A document
has zero security handlers if no security is used on the file. When security is applied to a file,
or the user selects a different security handler for a secured file, the newly-chosen security
handler is not put in place immediately. Instead this new security handler is simply
associated with the document; it is a pending security handler until the document is saved.
The new security handler is not put in place immediately because it is responsible for
decrypting the contents of the documents encryption dictionary, and that dictionary is re-
encrypted in the correct format for the new security handler only when the document is
saved. As a result, a document may have both a current and a new security handler
associated with it.
NOTE: In Acrobat 5.0, the Save or Save As... menu item can be used to save the file. On
Acrobat versions prior to 5.0, the file must be saved with Save As for reasons
described in Saving a File on page 447.
A security handler has two names: one that is placed in each PDF file that is saved by the
handler (for example, ADBE_Crypt), and another name that Acrobat can use in any user
interface items in which the security handler appears (for example, Acrobat Developer
Technologies default encryption). This is similar to the two-name scheme used for menu
items: a language-independent name that the code can refer to regardless of the user
interface language, and another name that appears in the user interface. See Chapter 2,
Registering and Using Plug-in Prefixes, in the Acrobat SDK Plug-in Guide for details on plug-
in naming conventions.
Prior to Acrobat 5.0, the maximum length of the encryption key that Acrobat accepted was
40 bits. Acrobat version 5.0 or higher accommodates an encryption key length of 128 bits.
These length limitations are imposed to comply with export restrictions.
Opening a File
The core API has several methods for opening files. PDDocOpen, or PDDocOpenEx
(introduced with Acrobat 5.0 and containing an additional parameter) is always used to
open PDF files, even when a plug-in calls AV layer methods such as
AVDocOpenFromASFileWithParams. As a result, the sequence of operations is largely
the same regardless of whether the document is being opened from the PD layer or from
the AV layer. The difference is that if you call PDDocOpen directly, you must pass your own
authorization procedure (PDAuthProc), while AV layer methods always use Acrobats
built-in authorization procedure . (See Acrobats Built-in Authorization Procedure on
page 446.)
The authorization procedure must implement the authorization strategy, such as giving the
user three chances to enter a password. The PDAuthProc is not part of a security handler,
but it must call the security handlers methods to authorize the user (for example, to get the
password from the user and to check whether or not the password is valid).
The security-related steps to opening a file are:
1. Acrobat looks for an Encrypt key in the PDF documents trailer, to determine whether or
not the document is encrypted. If there is no Encrypt key, Acrobat opens the document
immediately.
2. If there is an Encrypt key, its value is an encryption dictionary. Acrobat gets the value of
the Filter key in the dictionary to determine which security handler was used when the
file was saved. It looks in the list of registered security handlers (which contains
Acrobats built-in handler and any handlers that plug-ins or applications have
registered) for one whose name matches the name found in the PDF file.
3. If Acrobat finds no match, indicating that the necessary handler could not be found, it
does not open the document.
If it finds a matching security handler, it calls that handlers
PDCryptNewSecurityDataProc callback to extract and decrypt information from
the PDF files encryption dictionary.
4. Acrobat calls the security handlers authorize callback (PDCryptAuthorizeExProc)
with NULL authorization data, and with the requested permissions set to
PDPermReqOprOpen or pdPermOpen (requesting that the user be allowed to open
the file). This allows support for authorization schemes that do not need authorization
data. For details, see Acrobats Built-in Authorization Procedure on page 446.
5. If authorization succeeds, the handlers authorization callback must return the
PDPermReqStatus (when the callback is PDCryptAuthorizeExProc) or
pdPermOpen (when the callback is PDCryptAuthorizeProc) indicating that the
user is permitted to open the file.
6. If authorization fails, the authorization procedure passed in the call to open the PDDoc
is called.
NOTE: This authorization procedure is not the same as the security handlers authorize
callback, although it must, at some point, call the security handlers callback. (All
AV layer file opening methods use Acrobats built-in authorization procedure.)
7. If authorization still fails, the file is not opened.
8. If authorization succeeds, Acrobat calls the security handlers
PDCryptNewCryptDataProc callback to create the decryption key that is used to
decrypt the file. The PDCryptNewCryptDataProc callback can construct the
decryption key in any way it chooses, but generally performs some calculation based on
the contents of the security data structure filled previously by the handlers
PDCryptNewSecurityDataProc callback.
documents use the same password. The authorize callback can return permissions that
depend on the password as well as the permissions specified when encryption was set up.
This allows, for example, more rights to be granted to someone who knows a documents
owner password than to someone who knows the documents user password.
Saving a File
When saving a file, it is important to keep in mind that:
When a user selects document encryption for the first time or has selected a different
security handler for an already encrypted file, the newly-selected handler does not take
effect until the document is saved.
To be allowed to save a file, the user must have PDPermReqOprModify (available
with Acrobat 5.0 and higher) or either pdPermEdit or pdPermEditNotes
permission.
In Acrobat 5.0 and above, File->Save As and File->Save both force a complete encrypted
copy of the file to be written.In Acrobat versions prior to 5.0, users must use Save As to
save a file in an encrypted form for the first time, or when a different security handler
was selected for an already encrypted file. Save did an incremental update, so only the
last changes made to the file would be encrypted, and the remainder of the document
would still be usable by anyone (or would not be able to be decrypted by the newly-
selected security handler).
When a secured file is saved:
If the file is being saved in an encrypted form for the first time or if a different security
handler is selected, Acrobat calls the new security handlers
PDCryptNewSecurityDataProc callback. This action creates a new copy of the
new security handlers security data structure.
If the file is being saved in an encrypted form for the first time or if a different security
handler is selected, Acrobat calls the new security handlers
PDCryptUpdateSecurityDataProc callback. This presents whatever user
interface the security handler has for enabling the user to set permissions.
Acrobat calls the new security handlers PDCryptFillEncryptDictProc callback
to encrypt and write into the PDF files encryption dictionary whatever data the security
handler wants to save in the PDF file.
Acrobat writes out the encrypted file.
Acrobat sets the new security handler as the documents current security handler.
When security is set, the security handler obtains the permissions and authorization data
(such as passwords) to be used for the file. The settings do not take effect until the file is
saved, as described in the previous item
NOTE: In Acrobat 5.0, users select File-> Document Security... to set security. On Acrobat
versions prior to 5.0, the user set security using the Security button in the Save As...
dialog.
Implementation Examples
This section describes the sequence of callbacks and how they would be used by a plug-in
that uses public-private key technology.
Utility Methods
These user interface utility methods are provided for Acrobat:
Most Acrobat core API methods do not return error codes, but raise exceptions when errors
occur. Exceptions are handled by exception handlers. Acrobat provides a default exception
handler, but this handler is not able to back gracefully out of an unfinished operation.
Therefore, plug-ins should add their own exception handlers to trap and handle various
exceptions, typically performing some cleanup (such as releasing memory) when an
exception occurs. Your exception handler can either absorb the exception or re-raise the
exception to pass it along to the next handler on the exception handler stack.
Exception Handlers
Plug-ins can use the DURING, HANDLER, and END_HANDLER macros to define exception
handlers. The code for which an exception handler is to be active appears between the
DURING and HANDLER macros, while the exception handler code appears between the
HANDLER and END_HANDLER macros. For example, the following code declares an error
handler that is active only during the call to AVDocOpenFromFile:
DURING
avd = AVDocOpenFromFile(asp, NULL, (char *)NULL);
HANDLER
avd = NULL;
errorCode = ERRORCODE;
AVAlertNote("Error opening file");
END_HANDLER
If the method raises an exception, the handler code is executed; otherwise it is not
executed. In the example shown, the handler sets the value of two variables and displays an
error message to the user.
When an exception occurs, your handler can access the exception error code by using the
ERRORCODE macro. The value returned by the ERRORCODE macro does not change until
another exception is raised.
The exception error code contains the following information:
Severity
Exception system
Error number
Your exception handler can use all of this information to decide how to respond to the
exception.Your plug-in can extract information from an exception code with macros listed
in the following table:
Name Description
ErrSysNone General error and out of memory error
Name Description
ErrSysPDMetadata XMP Metadata
ErrSysAcroView AcroView
ErrSysPDFEdit PDFEdit
ErrSysPDSEdit PDSEdit
ErrSysRaster Rasterizer
The following code example illustrates an exception handler that simply determines which
system raised an exception and displays that information in a dialog box:
switch(ErrGetSystem(ERRORCODE))
{
case ErrSysNone: strcpy(msg, "No memory");break;
case ErrSysCos: strcpy(msg, "CosStore");break;
case ErrSysCosSyntax: strcpy(msg, "Cos syntax");break;
case ErrSysPDDoc: strcpy(msg, "PDDoc");break;
...
default: strcpy(msg, "Unknown system");break;
}
AVAlertNote(msg);
R ai s i n g E xce p t i o n s
In addition to handling exceptions Acrobat raises, plug-ins can use ASRaise to raise
exceptions. Plug-ins can raise any of the exceptions that Acrobat has defined, or they can
raise their own exceptions.
NOTE: Your plug-in should use the ASRegisterErrorString method to define its
own exceptions.
Use the RERAISE macro (see Table 13.1) when you do not want your exception handler to
handle an exception, but want to pass the exception to the next exception handler on the
stack.
NOTE: If code that calls ASRaise gets control as a result of a non-Acrobat event (such as a
drag and drop event on some platforms), ASRaise fails. There is no Acrobat code in
the stack to handle the exception.
The following code example illustrates the use of the E_RTRN_VOID macro (the error
handler in this example simply displays an alert dialog):
DURING
pdDoc = AVDocGetPDDoc(avDoc);
rootBm = PDDocGetBookmarkRoot(pdDoc);
if(PDBookmarkIsValid(rootBm)){
parentBm = PDBookmarkGetByTitle(rootBm, "Contents", 8, 1);
if(PDBookmarkIsValid(parentBm)){
pdAction = PDBookmarkGetAction(parentBm);
if (!PDActionIsValid(pdAction))
E_RTRN_VOID
dest = PDActionGetDest(pdAction);
if (!PDViewDestIsValid(dest))
E_RTRN_VOID
PDViewDestGetAttr(dest, &fit, &initRect, &zoom);
pageNum = PDViewDestGetPageNumber(dest, pdDoc) + 2;
} else {
AVAlertNote("No Contents Bookmark");
E_RTRN_VOID
}
} else {
AVAlertNote("No Root Bookmark");
E_RTRN_VOID
}
HANDLER
AVAlertNote("Exception raised");
return;
END_HANDLER
The E_RETURN(x) macro must not call a function that might raise an exception. For
example:
E_RETURN(foo())
is dangerous, if theres any possibility that foo could raise an exception. The reason is that
E_RETURN pops an exception frame off the stack before evaluating the expression to be
returned. If this evaluation raises an exception, it does not call your handler. Instead it calls
the next handler up the stack.
Therefore, if you need to call a function, it is best to do it this way:
result = foo();
E_RETURN(result);
This way, if foo raises an exception, your handler will be executed.
END_HANDLER
error:
This is a bug: the top stack frame has not been popped, so the frame is incorrect. Instead,
the following makes sure the stack frame is set up correctly:
DURING
...
ASRaise(myspecialerrorcode);
...
HANDLER
if ERRORCODE == myspecialerrorcode
goto error;
END_HANDLER
error:
in body code surrounded by the outer exception handler will restore the incorrect calling
environment and lead to unpredictable results. For example:
{
DURING /* Places one frame on the exception stack */
pdoc = AVDocGetPDDoc(avdoc);
DURING /* Places a second frame on the stack */
rootBm = PDDocGetBookmarkRot(pdDoc);
if (!PDBookmarkIsValid(rootBm)){
E_RTRN_VOID
/*
Returning here messes up the exception stack
because two frames have been placed on the stack
and E_RTRN_VOID only clears one of them before
returning
*/
}
pdAction = PDBookMarkGetAction(parentBm);
HANDLER
AVAlertNote("Bad AVDoc");
return (1);
/*
Returning here messes up the exception stack
because there is still a frame on the stack from
the outer DURING macro and it will not be cleared
before the function returns
*/
END_HANDLER
HANDLER
AVAlertNote("Bad PDDoc");
END_HANDLER
}
plug-ins should only declare as volatile variables whose value is needed in the
exception handler or beyond.
When using volatile, be sure to place the keyword in the correct location, for example:
volatile myStruct* p = 0;
declares the instance of the structure to be volatile, while
myStruct* volatile p = 0;
declares the pointer itself to be volatile. In general, the second form is the one to use.
Security/encryption Support for document security has been enhanced from the API
level, mostly through the addition of more cryptographic filters. Certified documents
have their own security model.
Review and commenting Support for annotations has been extended.
Text extraction and manipulation (new Wordy algorithm) More powerful text search
and manipulation capabilities have been added to the API with enhancements to
WordFinder.
Color management The Adobe AcroColor API, while present in earlier versions of
Acrobat, has been exposed in Acrobat 6.
New printing APIs Support for separations and an accompanying API has been added
to Acrobat 6.
Object compression API The PDF file format has been modified to enable powerful
compression techniques to be applied to PDF files, resulting in much smaller file sizes.
Access to these capabilities are provided through the API. The new CosObjCollection API
provides support for this compression.
Document level undo/redo stack The API has been expanded to support multiple
undo/redo.
New metadata calls Support for Acrobats metadata API has been expanded.
Date and time API Acrobat now provides a cross-platform date and time API.
UUID API Support has been included for Universal Unique IDentifiers.
New enterprise installer capabilities Enterprise installation of Acrobat 6 has been
made more flexible, including the ability to allow third parties to have their plug-ins
automatically installed through the Acrobat updater.
Save PDF files as XML A new plug-in enables users to save any PDF file as an XML file.
You must, however, provide your own DTD, which will be selectable from Save As.... See
Using the Save as XML Plug-in.
Help system enhancements Plug-in developers can now write help systems to
support their plug-ins directly from within Acrobat using the How To window. Support
for PDF-based help has been expanded. See Acrobat Help for details.
Added material from PDF Library Supplement to the Acrobat Core API Reference that could
not be moved to header files from the Acrobat 6 version of the document.
Added material from AcroColor API Reference, Catalog API Reference, Digital Signature API
Reference, Forms API Reference, PDF Consultant Accessibility Checker, Search API Reference,
Spelling API Reference, and Weblink API Reference that could not be moved to header files
from the Acrobat 6 versions of the documents.
Updated references to the PDF Reference.
Updated individual API tables with comprehensive lists and descriptions of all APIs.
Updated to introduce the following major new features that were added to the API in
Acrobat version 7.0 (see Appendix G, API Changes for details):
Support for 64-bit filesizes
New graphics objects: PDEImageFlate, PDEImageJPX
New Cos-level APIs used to create strings instead of using ASAtoms
New APIs to support thread safety
New APIs to support opening multiple windows on the same document
New APIs to support object data
New member in PDDocSaveParams (numSubFilesToCompact) for use with
new auto-save feature
New callback AVAnnotHandlerGetAccessibilityStringProc for
accessible annotations
New search options in Search extended API (SearchWordOptions adds support
for searching object data and attachments)
Ubiquity permissions are now enforced in Acrobat (previously they were enforced in
Reader only). To handle the permissions issues raised by this, a new API was added:
PDDocPermRequestNoUB.
The following figures show how various object types can be obtained from other object
types. Use them to help you find your way among the objects in the Acrobat core API.
AVDoc
ASGetDefaultFileSys
AVDocOpenFromFile
AVDocOpenFromFileWithParams
AVDocOpenFromASFileWithParams
PDDocOpen
ASFileGetFileSys( )
PDDoc ASFile ASFileSys
PDDocGetFile
ASFileSysOpenFile
ASFileAcquirePathName
ASFileSysCopyPath PDFileSpecGetFileSys
PDFileSpecAcquireASPath
ASPathName PDFileSpec
PDFileSpecNewFromASPath
PDFileSpecFromCosObj
Device-independent CosObj
pathname PDFileSpecGetDIPath
PDDocCreate CosDoc
PDDocGetCosDoc
PDDocOpen PDDoc
AVDocGetPDDoc
AVDocOpenFromPDDoc
ASFile & AVDocOpenFromPDDocWithParams
ASFileSys
PDDocGetFile
AVDocOpenFromFile AVDoc
AVDocOpenFromFileWithParams
AVDocOpenFromASFileWithParams
AVPageView
AVWindow
This Appendix provides a brief overview of PDF and the PDF structures. For details, see the
PDF Reference.
Introduction To PDF
PDF is a means of representing text and graphics using the imaging model of the PostScript
language. It describes the imaging required to draw a page or a collection of pages. A PDF
file draws a page by placing paint on selected areas. Starting with a blank page, the page
is drawn by using various marking operators to place marks on the page. Each new mark
overlays any previous marks. Marks are painted figures defined by letter shapes (text)
regions defined by combinations of lines and curves (line art), or sampled images
(photographs or images). Unlike PostScript, a full language that is programmable, PDF does
not contain procedures, variables, or control constructs. PDF uses a pre-defined set of
high-level marking operators that can describe pages.
PDF handles images through image compression filters such as JPEG for color and
grayscale images; CCITT Group 3 and Group 4, LZW, and Run Length compression for
monochrome images; and LZW compression for text and graphics.
Fonts for text are described by a font descriptor. The font descriptor includes the font name,
character metrics, and style information. This allows the accurate display of any fonts used
in the document that may be missing on the readers system.
The following table shows the objects and structures of a PDF file.
Objects
(Basic Objects: Booleans, Numbers, Strings,
Names, Arrays, Dictionaries, Streams, Filters)
Page Description
(PDF Operators
File Structure that describe
(Header, Body, Cross-reference Tables, Trailer) text, graphics,
and images)
Document Structure
(Catalog, Pages Tree, Pages, Imagable Content,
Thumbnail, Annotation, Outline Tree, etc.)
PDF Objects
The object types supported in PDF are similar to those supported by the PostScript
language. There are seven basic types: booleans, numbers, strings, names, arrays,
dictionaries, and streams, as well as a null object. Objects can be labeled and referred to by
an ID (indirect objects).
File Structure
The PDF file structure consists of four sections: header, body, cross-reference table and a
trailer. No line in a PDF file (except for those that are part of stream data) can be longer than
255 characters, and a line is delimited by a carriage return and linefeed, or a carriage return.
The following table illustrates the structure of a PDF file.
Header
Body
Cross-reference Table
Trailer
The one-line header specifies the version number of the PDF specification used in the file.
The body is a sequence of indirect objects (labeled objects) that describe the document.
The objects are the basic PDF Object types (numbers, strings, dictionaries, etc.). The %
symbol indicates a comment in the PDF file.
The cross-reference table contains information that enables random access to indirect
objects in the file. For each indirect object, there is a one-line entry in the table that gives
the location of the object in the file. To facilitate access to pages in a multi-page document,
the cross-reference table can be used to locate and directly access pages and other objects
in the document file.
The trailer includes the number of entries in the cross-reference table, a pointer to any
other cross-reference sections, a catalog object for the document, and an info dictionary
(optional) for the document.
The PDF file is read from back to front and the trailer information permits the quick location
of the cross-reference table, which in turn enables quick location of any object in the
document.
A PDF file can be updated without rewriting the entire contents of the file. This is done by
appending changes to the end of the file, while leaving the original contents intact.
NOTE: This may mean that a file with deleted elements will be larger than then original
file. When the PDF file is updated, any new or changed objects are appended, an
additional cross-reference table is added, and a new trailer is inserted. An appended
file structure is shown in the following figure.
Header
Original Body
Original File Structure
Original
Cross-reference Table
Original Trailer
Body Update 1
Update 1
Cross-reference Section 1
Updated Trailer 1
Body Update n
Update n
Cross-reference Section n
Updated Trailer n
Document Structure
A PDF file contains pages with text, graphics, and images, along with other information
such as thumbnails, text annotations, hypertext links, and bookmarks. It is organized into a
catalog of a page tree and bookmark (or outline) tree, along with the pages, page contents
and bookmark entries, as shown in the following figure.
Catalog
Pages Outline
tree tree
Imageable
Thumbnail Annotations
content
Page Contents
A PDF page contents is a sequence of graphic operators that generate marks that are
applied to the current page, overlaying any previously made marks. The following table
describes the four graphics objects.
Object Description
Path An arbitrary shape made of straight lines, rectangles, and cubic curves.
Text One or more character strings that can be placed anywhere on the page
and in any orientation.
Image A set of samples using a specified color model.
XObject A PDF object referenced by name. The three types of XObjects are:
Image
Form
JavaScriptCommand Parameters
Execute JavaScript kExecJavaScriptName : kASValueText
JavaScript Not currently used
kExecJavaScriptCode : kASValueText
Predefined Cursors
Cursor Design
ARROW_CURSOR
IBEAM_CURSOR
CROSSHAIR_CURSOR
BOX_IBEAM_CURSOR
HAND_CURSOR
FIST_CURSOR
ZOOM_IN_CURSOR
ZOOM_OUT_CURSOR
ZOOM_MAX_CURSOR
LINK_CURSOR
GROW_CURSOR
BAR_IBEAM_CURSOR
WAIT_CURSOR
MOVEPAGE_CURSOR
COPYPAGE_CURSOR
MOVEPAGES_CURSOR
COPYPAGES_CURSOR
REPLACEPAGE_CURSOR
REPLACEPAGES_CURSOR
NOP_CURSOR
THREAD_CURSOR
WORDFINDER_CURSOR
HIDDEN_CURSOR
GROWTOPLEFT_CURSOR
GROWBOTTOMLEFT_CURSOR
Cursor Design
MOVE_CURSOR
HAND_THREAD_UP_CURSOR
HAND_THREAD_END_CURSOR
HAND_THREAD_UP_END_CURSOR
HAND_THREAD_BEGIN_CURSOR
THREAD_CONNECT_CURSOR
THREAD_END_CURSOR
VERT_IBEAM_CURSOR
GROWLEFTRIGHT_CURSOR
HIGHLIGHT_CURSOR
GROWTOPBOTTOM_CURSOR
CROPTOOL_CURSOR
CROPTOOL_SCISSORS_CURSOR
DRAGLEFTRIGHT_CURSOR
DRAGUPDOWN_CURSOR
VERTBEAMNOBAR_CURSOR
E n u m e rato r s
ASCabEnum
ASEnumExtensions
AVAppEnumActionHandlers
AVAppEnumAnnotHandlers
AVAppEnumDocs
AVAppEnumSystemFonts
AVAppEnumTools
AVAppEnumTransHandlers
AVConversionEnumFromPDFConverters
AVConversionEnumToPDFConverters
AVDocEnumSelection
AVDocSelectionEnumPageRanges
AVMenubarAcquireMenuByPredicate
AVMenubarAcquireMenuItemByPredicate
AVToolBarEnumButtons
CosDocEnumEOFs
CosDocEnumEOFs64
CosDocEnumIndirect
CosObjEnum
EnumElementsWithUserPropertiesProc
JPXColorSpaceGetEnumAttrs
PDCharProcEnum
PDDocEnumFonts
PDDocEnumLoadedFonts
PDDocEnumOCGs
PDDocEnumPDSElementsWithUserProperties
PDEAttrEnumTable
PDEEnumElements
PDEClipFlattenedEnumElems
PDEnumDocs
PDEnumSysFonts
PDEObjectDump
PDFontEnumCharProcs
PDFormEnumPaintProc
PDFormEnumResources
PDNameTreeEnum
PDNumTreeEnum
PDPageEnumContents
PDPageEnumInksEx
PDPageEnumResources
PDPathEnum
PDSElementEnumKidsWithUserProperties
PDSElementEnumUserPropertiesAsASTextProc
PDSElementEnumUserPropertiesAsCosObjProc
PDTextEnum
PDTextSelectEnumQuads
PDTextSelectEnumText
PDTextSelectEnumTextUCS
PDWordFinderEnumWords
PDXObjectEnumFilters
PDXObjectGetData
Fo nt Sub t y pe s
Methods: PDFontGetSubtype
Subtype Description
CIDFontType0 Type 0 CID font
Gl yp h Na m es o f Wo rd S ep arato r s
Methods: PDDocCreateWordFinder
PDDocCreateWordFinderUCS
PDWordSplitString
Key Co de s
Header file: ASKey.h
ASKEY_ARROW_L 28
ASKEY_ARROW_R 29
ASKEY_ARROW_U 30
ASKEY_ESCAPE 27
ASKEY_HELP 5
ASKEY_PAGE_D 12
ASKEY_PAGE_U 11
ASKEY_SPACE 32
ASKEY_TAB 9
ASKEY_END 1
ASKEY_ENTER 13
ASKEY_HOME 4
ASKEY_MENU 2
ASKEY_CR 13
ASKEY_DEL 8
ASKEY_END 4
ASKEY_HOME 1
ASKEY_CR 13
ASKEY_DEL 8
ASKEY_END 4
ASKEY_ENTER 10
ASKEY_HOME 1
L a n gu a g e Cod e s
The following codes represent the supported languages in the supported formats (see
AVAppLanguageFormat).
Methods: AVAppGetLanguage
AVAppGetLanguageWithParams
M e n u a n d M e n u I te m N a m e s
The following example dump of the Acrobat Professional 7.0 File Menu shows the
language-independent name of this built-in menu and its menu items , as returned by the
JavaScript command app.listMenuItems().
NOTE: Results will differ according to the Acrobat product on which the JavaScript
command is being executed (Professional vs Standard, etc.).
Methods: AVMenubarAcquireMenuByName
AVMenubarAcquireMenuItemByName
File Menu
[cName:File, oChildren:[
[cName:Open],
[cName:NewDocument,oChildren:[
[cName:NewDocFromFile],
[cName:NewDocFromMultiple],
[cName:Scan],
[cName:Web2PDF:OpnURL],
[cName:ImageConversion:Clipboard]
]],
[cName:Organizer, oChildren:[
[cName:OpenOrganizer],
[cName:],
[cName:AddToOrganizer],
[cName:OrganizerFavorites]
]],
[cName:AcroSendMail:SendMail],
[cName:endSendGroup],
[cName:Close],
[cName:Save],
[cName:SaveAs],
[cName:DIGSIG:SaveAndAuthenticate],
[cName:Revert],
[cName:endSaveGroup],
[cName:ReduceFileSize],
[cName:endOptimizeGroup],
[cName:Annots:SendForReviewMenu, oChildren:[
[cName:SendForReview],
[cName:Annots:BrowserBasedReview]
]],
[cName:Annots:Separator],
[cName:AcroForm:File_FormData, oChildren:[
[cName:AcroForm:FormData_CollectData],
[cName:AcroForm:FormData_CreateSpreadsheet],
[cName:AcroForm:FormData_ImportData],
[cName:AcroForm:FormData_ExportData],
[cName:AcroForm:Separator],
[cName:AcroForm:FormData_HowTo]
]],
[cName:endFormDataGroup],
[cName:GeneralInfo],
[cName:endDocInfoGroup],
[cName:PageSetup],
[cName:Print],
[cName:Annots:PrintWithComments],
[cName:EFIPrintMe],
[cName:endPrintGroup],
[cName:OrganizerHistory, oChildren:[
[cName:],
[cName:],
[cName:],
[cName:],
[cName:],
[cName:],
[cName:],
[cName:Separator],
[cName:OpenOrganizer]
]],
[cName:RecentFile1],
[cName:RecentFile2],
[cName:RecentFile3],
[cName:RecentFile4],
[cName:RecentFile5],
[cName:endRecentFileGroup],
[cName:Quit]
]]
R e p l a ce a b l e M e t h o d s
These methods are replaceable in Adobe Reader, except as noted.
AVAlert
AVAppCanQuit
AVAppHandleAppleEvent
AVDocClose
AVDocDoPrint (not replaceable in Adobe Reader)
AVDocDoSave (not replaceable in Adobe Reader)
AVDocDoSaveAs (not replaceable in Adobe Reader)
AVDocDoSaveAsWithParams (not replaceable in Adobe Reader)
AVDocOpenFromASFileWithParams
AVDocPrintPages
AVDocPrintPagesWithParams
AVPageViewGetNextView
PDDocSave (not replaceable in Adobe Reader)
PDDocSaveWithParams (not replaceable in Adobe Reader)
PDImageSelectAlternate
S el ec t io n Typ es
Selection types that can be specified when calling AVDocSetSelection. The Details
column specifies what should be used for the data parameter.
To o l b a r a n d To o l b a r B u t t o n N a m e s
Methods: AVAppGetToolBarByName
AVToolBarGetButtonByName
The following are the language-independent names of the built-in toolbars and toolbar
buttons, as returned by the JavaScript command app.listToolbarButtons().
[cName:File, oChildren:[
[cName:Open],
[cName:ADBE:SPDR:OpStatTlButton],
[cName:Save],
[cName:SaveFileAs],
[cName:Print],
[cName:AddToOrganizer],
[cName:Organizer],
[cName:AddAttachments, oChildren:[
[cName:AddAttachments],
[cName:Annots:Tool:FileAttachment, oChildren:[
[cName:Annots:Tool:FileAttachment]
]]
]],
[cName:AcroSendMail:SendMail],
[cName:FindDialog],
[cName:endDialogGroup]
]],
[cName:Tasks, oChildren:[
[cName:NewDocumentTask],
[cName:CommentTask],
[cName:Initiate],
[cName:SecureTask],
[cName:SignTask],
[cName:FormTasks]
]],
[cName:BasicTools, oChildren:[
[cName:Hand],
[cName:Select],
[cName:SelectGraphics],
[cName:endSelectToolsGroup]
]],
[cName:Viewing, oChildren:[
[cName:ZoomIn, oChildren:[
[cName:ZoomIn],
[cName:ZoomOut],
[cName:ZoomDrag],
[cName:Loupe]
]],
[cName:Zoom100],
[cName:FitPage],
[cName:FitVisible],
[cName:ZoomViewOut],
[cName:ZoomTo],
[cName:ZoomViewIn]
]],
[cName:Rotate, oChildren:[
[cName:RotateCW, oChildren:[
[cName:RotateCW],
[cName:RotateCCW]
]],
[cName:endRotateViewGroup]
]],
[cName:HowTo, oChildren:[
[cName:HowTo]
]],
[cName:Find, oChildren:[
[cName:FindEdit]
]],
[cName:WebSearchView, oChildren:[
[cName:WebSearchView]
]],
[cName:Commenting, oChildren:[
[cName:Annots:Tool:Text],
[cName:Annots:Tool:TextEdits],
[cName:Annots:Tool:Stamp],
[cName:Annots:Tool:Highlight, oChildren:[
[cName:Annots:Tool:Highlight],
[cName:Annots:Tool:Underline],
[cName:Annots:Tool:StrikeOut]
]],
[cName:Annots:Tool:FileAttachmentReal, oChildren:[
[cName:Annots:Tool:FileAttachmentReal],
[cName:Annots:Tool:Sound]
]],
[cName:Separator],
[cName:Annots:Tool:Filter]
]]
To o l N a m e s
Methods: AVAppGetToolByName
Creators
kAcrobatCreatorCode ASFourCharCode('CARO') Acrobat Creator Code
kPhotoshopCreatorCode ASFourCharCode('8BIM') Photoshop Creator Code
kImageReadyCreatorCode ASFourCharCode('MeSa') ImageReady Creator Code
kIllustratorCreatorCode ASFourCharCode('ART5') Illustrator Creator Code
Other Types/Creators
kTextTypeCode ASFourCharCode('TEXT') Text File
kTextCreatorCode ASFourCharCode('ttxt') SimpleText
kQuickTimeTypeCode ASFourCharCode('MooV') QuickTime File
kQuickTimeCreatorCode ASFourCharCode('TVOD') QuickTime Player
kHTMLTypeCode ASFourCharCode('TEXT') HTML File
kHTMLCreatorCode ASFourCharCode('MSIE') Microsoft IE
View D es t in at io n Fit Ty pe s
Fit Fits the page into the window, corresponding to the Acrobat viewers
FitPage menu item.
FitH Fits the widths of the page into the window, corresponding to the
Acrobat viewers Fit Width menu item.
FitV Fits the height of the page into a window.
FitR Fits the rectangle specified by its upper-left and lower-right corner
points into the window.
FitB Fits the rectangle containing all visible elements on the page (known as
the bounding box) into the window, corresponds to the Acrobat
viewers Fit Visible menu item.
FitBH Fits the width of the bounding box into the window.
FitBV Fits the height of the bounding box into the window.
Error Systems
ErrSysAcroView AcroView
ErrSysPDSEdit PDFEdit
ErrSysPDMetadata PDMetadata
ErrSysPDModel Global PD
ErrSysPDSEdit PDSEdit
ErrSysRaster Rasterizer
Severities
ErrSysAcroView
System: ErrSysAcroViewAcroView (AV) level errors
Severity: ErrAlways
Platforms: All
ErrSysASFile
Error System: ErrSysASFileASFile I/O errors
Severity: ErrAlways
Platforms: All
fileErrNoErr No error.
ErrSysCos
Error System: ErrSysCosCosStore, filter errors
Severities: ErrSuppressable, ErrAlways
Platforms: All
cosErrNoError No error.
ErrSysCosSyntax
Error System: ErrSysCosSyntaxCos syntax errors
Severity: ErrSuppressable
Platforms: All
cosSynErrNoError No error.
ErrSysFontSvr
Error System: ErrSysFontSvrFont server errors
Severity: ErrAlways
Platforms: All
fsErrNoError No error.
ErrSysMDSystem
MacOS
System: ErrSysMDSystemMacOS-specific system errors
Severity: ErrAlways
Platforms: MacOS
Windows
Error System: ErrSysMDSystemWindows-specific system errors
Severity: ErrAlways
Platforms: Windows
ErrSysMDApp
Error System: ErrSysMDAppMacOS-specific application errors
Severity: ErrAlways
Platforms: MacOS
mdAppErrNoError No error.
ErrSysNone
Error System: ErrSysNoneGeneral system and out-of-memory errors
Severity: ErrAlways
Platforms: All
ErrSysPage
Error System: ErrSysPageMacOS-specific application errors
Severities: ErrSuppressable, ErrSilent
Platforms: All
pageErrNoError No error.
ErrSysPDDoc
Error System: ErrSysPDDocPDDoc and family, page tree, bookmark errors
Severities: ErrSuppressable, ErrAlways
Platforms: All
ErrSysPDFEdit
Error System: ErrSysPDFEditPDFEdit errors
Severity: ErrAlways
Platforms: All
peErrNoError No error.
ErrSysPDMetadata
Error System: ErrSysPDMetadataPD metadata errors
Severity: ErrAlways
Platforms: All
ErrSysPDModel
Error System: ErrSysPDModelGlobal PD-level errors
Severity: ErrAlways
Platforms: All
pdModErrNoError No error.
ErrSysPDPage
Error System: ErrSysPDDocPDPage and family, thumbnail, annotion errors
Severities: ErrSuppressable, ErrAlways, ErrSilent
Platforms: All
pdPErrNoError No error.
ErrSysPDSEdit
Error System: ErrSysPDSEditPDSEdit errors
Severity: ErrAlways
Platforms: All
ErrSysRaster
Error System: ErrSysRasterRasterizer errors
Severity: ErrAlways
Platforms: All
rasErrNoError No error.
ErrSysXtnMgr
Error System: ErrSysXtnMgrExtension manager errors. Errors registered by clients (see
ASRegisterErrorString) are automatically assigned to this error system.
Severity: ErrAlways
Platforms: All (some system-specific as noted)
xmErrNoError No error.
A4_GLOBALS
A4_GLOBALS
Description
(Macintosh only) Together with A5_GLOBALS, this specifies the address register off of
which a client references its globals. They are used only for 68xxx Macintosh clients, not for
PowerPC clients. Either A4_GLOBALS or A5_GLOBALS must be defined to be 1, and the
other undefined.
Both A4_GLOBALS and A5_GLOBALS are set automatically by PIPrefix.h.
Header File
PIPrefix.h
Related Macros
A5_GLOBALS
A5_GLOBALS
A5_GLOBALS
Description
(Macintosh only) Together with A4_GLOBALS, this specifies the address register off of
which a client references its globals. They are used only for 68xxx Macintosh clients, not for
PowerPC clients. Either A4_GLOBALS or A5_GLOBALS must be defined to be 1, and the
other undefined.
Both A4_GLOBALS and A5_GLOBALS are set automatically by PIPrefix.h.
Header File
PIPrefix.h
Related Macros
A4_GLOBALS
ACCB1
ACCB1
Description
Macro used when declaring callback functions. Its definition is platform-dependent. Use
this macro in every callback function you declare.
Use ACCB1 before the return value in a function declaration, as shown in the Example.
Header File
MacPlatform.h
WINPLTFM.H
Related Macros
ACCB2
ACCBPROTO1
ACCBPROTO2
Example
static ACCB1 ASAtom ACCB2 SnapZoomToolGetType(AVTool tool){
}
ACCB2
ACCB2
Description
Macro used when declaring callback functions. Its definition is platform-dependent. Use
this macro in every callback function you declare.
Use ACCB2 after the return value in a function declaration, as shown in the Example.
Header File
MacPlatform.h
WINPLTFM.H
Related Macros
ACCB1
ACCBPROTO1
ACCBPROTO2
Example
static ACCB1 ASAtom ACCB2 SnapZoomToolGetType(AVTool tool){
}
ACCBPROTO1
ACCBPROTO1
Description
Macro used when declaring function prototypes. Its definition is platform-dependent. Use
this macro in every function prototype you declare.
Use ACCBPROTO1 before the return value in a function prototype, as shown in the
Example.
Header File
MacPlatform.h
WINPLTFM.H
Related Macros
ACCBPROTO2
ACCB1
ACCB2
Example
static ACCBPROTO1 void (ACCBPROTO2
*DrawImageSelectionCallback)(AVPageView pageView, AVRect* updateRect,
void *data);
ACCBPROTO2
ACCBPROTO2
Description
Macro used when declaring function prototypes. Its definition is platform-dependent. Use
this macro in every function prototype you declare.
Use ACCBPROTO2 after the return value in a function prototype, as shown in the Example.
Header File
MacPlatform.h
WINPLTFM.H
Related Macros
ACCB1
ACCB2
ACCBPROTO1
Example
static ACCBPROTO1 void (ACCBPROTO2
*DrawImageSelectionCallback)(AVPageView pageView, AVRect* updateRect,
void *data);
ACROASSERT
ACROASSERT
Description
A platform-independent version of the ANSI assert function.
Header File
acroassert.h
ASFileSysCreatePathFromCString
ASFileSysCreatePathFromCString(asfs, cPath)
Description
Helper macro for the ASFileSysCreatePathName method. See this method for more
information.
NOTE: This macro uses a local variable named scratchFourBytes (void*
scratchFourBytes). PDF Library users need to provide this variable in order to
utilize the macro; the variable must be local to the client application, not to the
library. Any client can use this macro provided he also has code similar to the
following in the same source file that uses the macro:
static void* scratchFourBytes;
Parameters
asfs (May be NULL) The file system through which the ASPathName is
obtained.
cPath A C string containing the path for which the ASPathName is
obtained.
Header File
ASExpT.h
Related Macros
ASFileSysCreatePathFromDIPath
ASFileSysCreatePathFromFSSpec
ASFileSysCreatePathWithFolderName
ASFileSysCreatePathFromDIPath
ASFileSysCreatePathFromDIPath(asfs, cDIPath, aspRelativeTo)
Description
Helper macro for the ASFileSysCreatePathName method. See this method for more
information.
Parameters
asfs (May be NULL) The file system through which the ASPathName is
obtained.
cDIPath A C string containing the device-independent path for which the
ASPathName is obtained.
aspRelativeTo (May be NULL) An ASPathName that cDIPath will be evaluated
against if it contains a relative path.
Header File
ASExpT.h
Related Macros
ASFileSysCreatePathFromCString
ASFileSysCreatePathFromFSSpec
ASFileSysCreatePathWithFolderName
ASFileSysCreatePathFromFSSpec
ASFileSysCreatePathFromFSSpec(asfs, cPath)
Description
Helper macro for the ASFileSysCreatePathName method. See this method for more
information.
Parameters
asfs (May be NULL) The file system through which the ASPathName is
obtained.
cPath The FSSpec for which the ASPathName is obtained.
Header File
ASExpT.h
Related Macros
ASFileSysCreatePathFromCString
ASFileSysCreatePathFromDIPath
ASFileSysCreatePathWithFolderName
ASFileSysCreatePathWithFolderName
ASFileSysCreatePathWithFolderName(asfs, aspFolder, cFileName)
Description
Helper macro for the ASFileSysCreatePathName method. See this method for more
information.
Parameters
asfs (May be NULL) The file system through which the ASPathName is
obtained.
aspFolder ASPathName contained the path of the folder.
cFileName A C string containing the name of the file. The returned
ASPathName contains the result of appending cFileName to
aspFolder.
Header File
ASExpT.h
Related Macros
ASFileSysCreatePathFromCString
ASFileSysCreatePathFromDIPath
ASFileSysCreatePathFromFSSpec
ASFixedRoundToInt16
ASFixedRoundToInt16(f)
Description
Converts a fixed point number to an ASInt16, rounding the result.
Parameters
Header File
ASExpT.h
Related Macros
Fixed Numbers
ASFixedRoundToInt32
ASFixedTruncToInt16
ASFixedTruncToInt32
ASInt16ToFixed
ASInt32ToFixed
ASFixedRoundToInt32
ASFixedRoundToInt32(f)
Description
Converts a fixed point number to an ASInt32, rounding the result.
Parameters
Header File
ASExpT.h
Related Macros
Fixed Numbers
ASFixedRoundToInt16
ASFixedTruncToInt16
ASFixedTruncToInt32
ASInt16ToFixed
ASInt32ToFixed
ASFixedTruncToInt16
ASFixedTruncToInt16(f)
Description
Converts a fixed point number to an ASInt16, truncating the result.
Parameters
Header File
ASExpT.h
Related Macros
Fixed Numbers
ASFixedRoundToInt16
ASFixedRoundToInt32
ASFixedTruncToInt32
ASInt16ToFixed
ASInt32ToFixed
ASFixedTruncToInt32
ASFixedTruncToInt32(f)
Description
Converts a fixed point number to an ASInt32, truncating the result.
Parameters
Header File
ASExpT.h
Related Macros
Fixed Numbers
ASFixedRoundToInt16
ASFixedRoundToInt32
ASFixedTruncToInt16
ASInt16ToFixed
ASInt32ToFixed
ASInt16ToFixed
ASInt16ToFixed(i)
Description
Converts an ASInt16 to a fixed point number.
Parameters
Header File
ASExpT.h
Related Macros
Fixed Numbers
ASFixedRoundToInt16
ASFixedRoundToInt32
ASFixedTruncToInt16
ASFixedTruncToInt32
ASInt32ToFixed
ASInt32ToFixed
ASInt32ToFixed(i)
Description
Converts an ASInt32 to a fixed point number.
Parameters
Header File
ASExpT.h
Related Macros
Fixed Numbers
ASFixedRoundToInt16
ASFixedRoundToInt32
ASFixedTruncToInt16
ASFixedTruncToInt32
ASInt16ToFixed
CALL_REPLACED_PROC
CALL_REPLACED_PROC(hft, sel, replacer)(args...)
Description
Calls the previous implementation of a replaced method (that is, the code that would have
been executed before the method was replaced using REPLACE).
Parameters
hft The HFT containing the replaced method to execute, for example,
gAcroViewHFT. See HFT Values in the Acrobat and PDF Library
API Reference for a list of the Acrobat viewers built-in HFTs.
sel The selector for the replaced method to execute. The name must
have the characters SEL appended, for example, AVAlertSEL.
replacer The callback whose previous implementation is called. Recall that a
method may be replaced more than once, and all replacements for a
particular method are kept in a linked list. proc must be an element
in that linked list, and the entry before proc is the one that is called.
args... The argument list to pass to the procedure being called.
Header File
ASCalls.h
Related Macros
REPLACE
Related Methods
HFTGetReplacedEntry
Example
CALL_REPLACED_PROC(gAcroViewHFT, AVAlertSEL, myAlertCallback)(iconType,
gsm, button1, button2, button3, beep);
CastToPDAnnot
CastToPDAnnot(a)
Description
Casts a link annotation or a text annotation to a generic annotation.
Parameters
Header File
PDExpT.h
Related Macros
CastToPDLinkAnnot
CastToPDTextAnnot
CastToPDLinkAnnot
CastToPDLinkAnnot(a)
Description
Casts a generic annotation or a text annotation to a link annotation.
Parameters
Header File
PDExpT.h
Related Macros
CastToPDAnnot
CastToPDTextAnnot
CastToPDTextAnnot
CastToPDTextAnnot(a)
Description
Casts a link annotation or a generic annotation to a text annotation.
Parameters
Header File
PDExpT.h
Related Macros
CastToPDAnnot
CastToPDLinkAnnot
DEBUG
DEBUG
Description
Enables and disables compile-time type-checking in various declarations.
Define DEBUG as 1 to enable type-checking (when developing and testing clients) and as 0
to disable type-checking (before shipping your client).
Header File
MacPlatform.h
WINPLTFM.H
Related Methods and Callbacks
ASCallbackCreateNotification
ASCallbackCreateProto
ASCallbackCreateReplacement
Example
#define DEBUG 1
DURING
DURING
Description
Begins the section of code where Acrobat APIs may throw an exception. After calling an
Acrobat API method, execution may jump into the HANDLER clause. This macro is similar to
the TRY clause in the C++ language.
Header File
CorCalls.h
Related Macros
END_HANDLER
E_RETURN
E_RTRN_VOID
HANDLER
END_HANDLER
END_HANDLER
Description
Ends a DURING/HANDLER/END_HANDLER clause.
Header File
CorCalls.h
Related Macros
DURING
E_RETURN
E_RTRN_VOID
HANDLER
E_RETURN
E_RETURN
Description
Returns a value from an enclosing function when nested inside a DURING/HANDLER clause.
Header File
CorCalls.h
Related Macros
DURING
END_HANDLER
E_RTRN_VOID
HANDLER
ERRORCODE
ERRORCODE
Description
Macro defined to call ASGetExceptionErrorCode. Returns an ASInt32 containing
exception error code. See Appendix D, Errors.
Header File
CorCalls.h
Related Macros
DURING
END_HANDLER
E_RETURN
HANDLER
E_RTRN_VOID
E_RTRN_VOID
Description
Returns from an enclosing function when nested inside a DURING/HANDLER clause,
without returning a value.
Header File
CorCalls.h
Related Macros
ErrGetCode
ErrGetSeverity
ErrGetSignedCode
ErrGetSystem
ErrBuildCode
ErrBuildCode(xseverity, xsys, xerror)
Description
Builds an error code for the specified severity, system, and error number. Error codes are
used in exception handling. The ASRaise method takes an error code for its argument;
ASRegisterErrorString returns an error code.
An error code has three components:
Severity: none, warning, severe; 4 bits
System: Cos, PDDoc, and so on; 8 bits
Error: FileOpen, Syntax, and so on; 16 bits
Parameters
Header File
AcroErr.h
Related Macros
ErrGetCode
ErrGetSeverity
ErrGetSignedCode
ErrGetSystem
Related Methods
ASRaise
ASRegisterErrorString
Example
myErrorCode = ErrBuildCode(ErrAlways, ErrSysAcroView,
avErrActionRestricted);
ErrGetCode
ErrGetCode(xcode)
Description
Gets the error number from an error code.
Parameters
Header File
AcroErr.h
Related Macros
ErrBuildCode
ErrGetSeverity
ErrGetSignedCode
ErrGetSystem
Related Methods
ASGetErrorString
ASGetExceptionErrorCode
ASRegisterErrorString
Example
errorNumber = ErrGetCode(errorCode);
ErrGetSeverity
ErrGetSeverity(xcode)
Description
Gets the error severity from an error code. Returns one of Severities.
Parameters
Header File
AcroErr.h
Related Macros
ErrBuildCode
ErrGetCode
ErrGetSignedCode
ErrGetSystem
Related Methods
ASGetErrorString
ASGetExceptionErrorCode
ASRegisterErrorString
Example
errorSeverity = ErrGetSeverity(errorCode);
ErrGetSignedCode
ErrGetSignedCode(xcode)
Description
Gets a signed error number from an error code.
Parameters
Header File
AcroErr.h
Related Macros
ErrBuildCode
ErrGetCode
ErrGetSeverity
ErrGetSystem
Related Methods
ASGetErrorString
ASGetExceptionErrorCode
ASRegisterErrorString
Example
errorSignedNumber = ErrGetSignedCode(errorCode);
ErrGetSystem
ErrGetSystem(xcode)
Description
Gets the error system from an error code. Returns one of Error Systems.
Parameters
Header File
AcroErr.h
Related Macros
ErrBuildCode
ErrGetCode
ErrGetSeverity
ErrGetSignedCode
Related Methods
ASGetErrorString
ASGetExceptionErrorCode
ASRegisterErrorString
Example
errorSystem = ErrGetSystem(errorCode);
Fixed Numbers
Description
A variety of predefined fixed-point constants.
fixedZero fixedFive
fixedHundredth fixedSix
fixedSixteenth fixedSeven
fixedTenth fixedEight
fixedEighth fixedNine
fixedQuarter fixedTen
fixedHalf fixedEleven
fixedThreeQuarters fixedTwelve
fixedPi4 fixedSixteen
fixedSevenEighths fixedThirtyTwo
fixedOne1 fixedFifty
fixedOne fixedSeventyTwo
fixedOneAndQuarter fixedNinety
fixedFourThirds fixedHundred
fixedSqrtTwo fixedHundredFifty
fixedThreeHalves fixedOneEighty
fixedOneAnd3Qtr fixedTwoSeventy
fixedPi2 fixedFiveHundred
fixedGolden fixedThousand
fixedTwo fixedTenThousand
fixedThree fixedNegativeInfinity
fixedFour fixedPositiveInfinity
Header File
ASExpT.h
Related Macros
ASFixedTruncToInt16
ASFixedTruncToInt32
ASFixedRoundToInt16
ASFixedRoundToInt32
ASFixedTruncToInt16
ASInt16ToFixed
ASInt32ToFixed
HANDLER
HANDLER
Description
Follows a DURING macro. Code inserted between HANDLER and END_HANDLER macros
will be executed only if an Acrobat function or other function THROWs. This macro is similar
to the CATCH clause in the C++ language.
Header File
CorCalls.h
Related Macros
DURING
END_HANDLER
E_RETURN
E_RTRN_VOID
MAC_PLATFORM
MAC_PLATFORM
Description
(Macintosh only, previously known as MAC_ENV) Defined if the client is being compiled for a
Macintosh, undefined otherwise. MAC_PLATFORM, WIN_PLATFORM, and
UNIX_PLATFORM should be used by client developers to conditionally compile platform-
dependent code.
MAC_PLATFORM is automatically set by the header files.
Header File
Environ.h (based on a value set in MacPlatform.h)
Related Macros
UNIX_PLATFORM
WIN_PLATFORM
MAC68K
MAC68K
Description
(Macintosh only) Together with POWER_PC, specifies which processor architecture a client
is targeted for. Either POWER_PC or MAC68K must be defined as 1, the other as 0.
POWER_PC and MAC68K are automatically set by PIPrefix.h.
Header File
PIPrefix.h
Related Macros
POWER_PC
PI_ACROSUPPORT_VERSION
PI_ACROSUPPORT_VERSION
Description
Specifies the version of the Acrobat support level HFT.
This is automatically set by PIRequir.h.
Header File
PIRequir.h
Errors
If the HFT version is higher that the viewer loading the client supports, it displays an alert
box with the message There was an error while loading the client '<plug-in name>'. The
client is incompatible with this version of the Viewer.
Related Macros
PI_ACROVIEW_VERSION
PI_CORE_VERSION
PI_COS_VERSION
PI_MACINTOSH_VERSION
PI_PDMODEL_VERSION
PI_UNIX_VERSION
PI_WIN_VERSION
PI_ACROVIEW_VERSION
PI_ACROVIEW_VERSION
Description
Specifies the version of the Acrobat viewer level HFT.
This is automatically set by PIRequir.h.
Header File
PIRequir.h
Errors
If the HFT version is higher that the viewer loading the client supports, it displays an alert
box with the message There was an error while loading the client '<plug-in name>'. The
client is incompatible with this version of the Viewer.
Related Macros
PI_ACROSUPPORT_VERSION
PI_CORE_VERSION
PI_COS_VERSION
PI_MACINTOSH_VERSION
PI_PDMODEL_VERSION
PI_UNIX_VERSION
PI_WIN_VERSION
PI_CORE_VERSION
PI_CORE_VERSION
Description
Specifies the version of the HFT.
This is automatically set by PIRequir.h.
Header File
PIRequir.h
Errors
If the HFT version is higher that the viewer loading the client supports, it displays an alert
box with the message There was an error while loading the client '<plug-in name>'. The
client is incompatible with this version of the viewer.
Related Macros
PI_ACROSUPPORT_VERSION
PI_ACROVIEW_VERSION
PI_COS_VERSION
PI_MACINTOSH_VERSION
PI_PDMODEL_VERSION
PI_UNIX_VERSION
PI_WIN_VERSION
PI_COS_VERSION
PI_COS_VERSION
Description
Specifies the version of the Cos-level HFT.
This is automatically set by PIRequir.h.
Header File
PIRequir.h
Errors
If the HFT version is higher that the viewer loading the client supports, it displays an alert
box with the message There was an error while loading the client '<plug-in name>'. The
client is incompatible with this version of the Viewer.
Related Macros
PI_ACROSUPPORT_VERSION
PI_ACROVIEW_VERSION
PI_CORE_VERSION
PI_MACINTOSH_VERSION
PI_PDMODEL_VERSION
PI_UNIX_VERSION
PI_WIN_VERSION
PI_MACINTOSH_VERSION
PI_MACINTOSH_VERSION
Description
Specifies the version of the Macintosh-only methods HFT.
This is automatically set by PIRequir.h.
Header File
PIRequir.h
Errors
If the HFT version is higher that the viewer loading the client supports, it displays an alert
box with the message There was an error while loading the client '<plug-in name>'. The
client is incompatible with this version of the Viewer.
Related Macros
PI_ACROSUPPORT_VERSION
PI_ACROVIEW_VERSION
PI_CORE_VERSION
PI_COS_VERSION
PI_PDMODEL_VERSION
PI_UNIX_VERSION
PI_WIN_VERSION
PI_PDMODEL_VERSION
PI_PDMODEL_VERSION
Description
Specifies the version of the PD level HFT.
This is automatically set by PIRequir.h.
Header File
PIRequir.h
Errors
If the HFT version is higher that the viewer loading the client supports, it displays an alert
box with the message There was an error while loading the client '<plug-in name>'. The
client is incompatible with this version of the Viewer.
Related Macros
PI_ACROSUPPORT_VERSION
PI_ACROVIEW_VERSION
PI_CORE_VERSION
PI_COS_VERSION
PI_MACINTOSH_VERSION
PI_UNIX_VERSION
PI_WIN_VERSION
PI_UNIX_VERSION
PI_UNIX_VERSION
Description
Specifies the version of the UNIX-only methods HFT.
This is automatically set by PIRequir.h.
Header File
PIRequir.h
Errors
If the HFT version is higher that the viewer loading the client supports, it displays an alert
box with the message There was an error while loading the client '<plug-in name>'. The
client is incompatible with this version of the Viewer.
Related Macros
PI_ACROSUPPORT_VERSION
PI_ACROVIEW_VERSION
PI_CORE_VERSION
PI_COS_VERSION
PI_MACINTOSH_VERSION
PI_PDMODEL_VERSION
PI_WIN_VERSION
PI_WIN_VERSION
PI_WIN_VERSION
Description
Specifies the version of the Windows-only methods HFT.
This is automatically set by PIRequir.h.
Header File
PIRequir.h
Errors
If the HFT version is higher that the viewer loading the client supports, it displays an alert
box with the message There was an error while loading the client '<plug-in name>'. The
client is incompatible with this version of the Viewer.
Related Macros
PI_ACROSUPPORT_VERSION
PI_ACROVIEW_VERSION
PI_CORE_VERSION
PI_COS_VERSION
PI_MACINTOSH_VERSION
PI_PDMODEL_VERSION
PI_UNIX_VERSION
PLATFORM
PLATFORM
Description
Defines the platform-specific header file. Must be "MacPlatform.h" in Mac OS,
"WINPLTFM.H" in Windows.
PLATFORM is automatically set by the header file.
Header File
PIPrefix.h (Macintosh)
ENVIRON.H (Windows)
POWER_PC
POWER_PC
Description
(Macintosh only) Together with MAC68K, specifies which processor architecture a client is
targeted for. Either POWER_PC or MAC68K must be defined as 1, the other as 0.
POWER_PC and MAC68K are automatically set by PIPrefix.h.
Header File
PIPrefix.h
Related Macros
MAC68K
PRODUCT
PRODUCT
Description
Defines the platform-specific header file. Must be Plugin.h in Mac OS and Windows.
PRODUCT is automatically set by the header file.
Header File
PIPrefix.h (Macintosh)
ENVIRON.H (Windows)
REGISTER_NOTIFICATION
REGISTER_NOTIFICATION(nselName, proc, rock)
Description
Macro to register a notification. Uses AVAppRegisterNotification.
Header File
PICommon.h
REPLACE
REPLACE(hft, sel, proc)
Description
Replaces one of the Acrobat viewers built-in methods. The method being replaced must be
one of the Replaceable Methods. The methods HFTEntryReplaceable flag is
automatically set, allowing it to be subsequently replaced.
All clients, and the Acrobat viewer itself, share a single copy of each HFT. As a result, when a
client replaces the implementation of a method, all other clients and the Acrobat viewer
also use the new implementation of that method. In addition, once a methods
implementation has been replaced, there is no way to remove the new implementation
without restarting the Acrobat viewer.
NOTE: The CALL_REPLACED_PROC macro is available to call the previous HFT entry
function that was replaced.
Parameters
Header File
PICommon.h
Related Macros
CALL_REPLACED_PROC
Related Methods
ASCallbackCreateReplacement
HFTReplaceEntry
Examples
myAlertCallback = ASCallbackCreateReplacement(AVAlertSEL, myAlert);
REPLACE(gAcroViewHFT, AVAlertSEL, myAlertCallback);
RERAISE
RERAISE
Description
Re-raises the most recently raised exception and passes it to the next exception handler in
the stack.
Parameters
None
Header File
CorCalls.h
Related Macros
ErrGetCode
ErrGetSeverity
ErrGetSignedCode
ErrGetSystem
Related Methods
ASRaise
UNIX_PLATFORM
UNIX_PLATFORM
Description
(UNIX only) Defined if the client is being compiled for a UNIX platform, undefined
otherwise. MAC_PLATFORM, WIN_PLATFORM, and UNIX_PLATFORM should be
used by client developers to conditionally compile platform-dependent code.
UNIX_PLATFORM must be defined in the arguments to the C compiler. The make files for
the sample clients in the Acrobat SDK do this automatically.
Header File
Environ.h (based on a value set in UNIXPlatform.h)
Related Macros
MAC_PLATFORM
WIN_PLATFORM
WIN_PLATFORM
WIN_PLATFORM
Description
(Windows only, previously known as WIN_ENV) Defined if the client is being compiled for a
Windows machine, undefined otherwise. MAC_PLATFORM, WIN_PLATFORM, and
UNIX_PLATFORM should be used by client developers to conditionally compile platform-
dependent code.
WIN_PLATFORM must be defined in the arguments to the C compiler. The make files for
the sample clients in the Acrobat SDK do this automatically.
Header File
Environ.h (based on a value set in WinPltfm.h)
Related Macros
MAC_PLATFORM
UNIX_PLATFORM
This Appendix consists of a single comprehensive table showing every API and the
platform(s) supported by each.
Version 2.1
Methods
The following methods were added in version 2.1.
Available only if PI_ACROVIEW_VERSION (in PIRequir.h) is set to 0x00020001 or
higher.
AVDocGetClientName
AVDocGetPageText
AVDocSetClientName
Available only if PI_PDMODEL_VERSION (in PIRequir.h) is set to 0x00020001 or
higher.
PDDocClearFlags
PDDrawCosObjToWindow
PDPageNotifyContentsDidChangeEx
Errors
The following errors were added in version 2.1.
xmErrPluginLoadFailed
xmErrNotPrivileged
xmErr68KOnly
xmErrPPCOnly
avErrNoText
Notifications
The following notifications were added in version 2.1.
PDPageContentsDidChangeEx
Version 3.0
Objects
The following object was added in version 3.0.
PDTrans
Methods
The following methods were added in version 3.0.
Available only if PI_ACROSUPPORT_VERSION (in PIRequir.h) is set to 0x00020002 or
higher.
ASFileFromMDFile
ASFileGetFileSysByName
ASFileGetMDFile
ASFilePushData
ASFileRegisterFileSys
ASFileSetMode
ASFileSysAcquireFileSysPath
ASFileSysCreatePathName
ASFileUnregisterFileSys
Available only if PI_ACROVIEW_VERSION (in PIRequir.h) is set to 0x00020002 or
higher.
AVAppEnumTransHandlers
AVAppGetTransHandlerByType
AVAppHandlePlatformEvent
AVAppRegisterTransHandler
AVAuthOpen
AVDocDoActionPropsDialog
AVDocDoSaveAs
AVDocGetViewDef
AVDocIsExternal
AVDocOpenFromASFileWithParamString
AVDocPrintPagesWithParams
AVDocSendAuxData
AVDocSetDead
AVDocSetViewDef
AVHasAuxDataHandler
AVPageViewDrawCosObj
AVPageViewGetFirstVisiblePageNum
AVPageViewGetLastVisiblePageNum
AVPageViewGetLayoutMode
AVPageViewGetNextView
AVPageViewGetSelectedAnnotPageNum
AVPageViewHighlightText
AVPageViewInsetRect
AVPageViewInvalidateText
AVPageViewPageNumIsVisible
AVPageViewPointInText
AVPageViewSetLayoutMode
AVPageViewTrackText
AVPageViewSetPageNum
AVPageViewUseThisDestination
AVRegisterAuxDataHandler
AVToolButtonSetExternal
AVToolButtonSetHelpText
AVUnregisterAuxDataHandler
AVWindowGetCursorAtPoint
AVWindowHandlePlatformEvent
Available only if PI_MACINTOSH_VERSION (in PIRequir.h) is set to 0x00020002 or
higher.
AVAppEnumSystemFonts
Available only if PI_COS_VERSION (in PIRequir.h) is set to 0x00020002 or higher.
CosDocClose
CosDocCreate
CosDocOpenWithParams
CosDocSaveToFile
CosDocSetDirty
ASrealloc
CosDictPut
CosDictRemove
CosNewString
PDDocAuthorize
PDDocCreate
PDDocInsertPages
PDDocSaveWithParams
PDFontAcquireXlateTable
PDFontXlateTableRelease
PDFontXlateString
PDFontXlateWidths
PDPageGetDoc
PDRegisterCryptHandler
PDXlateToPDFDocEnc
The following methods are now replaceable.
AVDocDoSaveAs
AVPageViewGetNextView
PDDocSave
PDDocSaveWithParams
Callbacks
The following callbacks were added in version 3.0.
ASFileCompletionProc
ASFileSysAcquireFileSysPathProc
ASFileSysAsyncAbortProc
ASFileSysAsyncReadProc
ASFileSysAsyncWriteProc
ASFileSysClearOutstandingMReadsProc
ASFileSysCreatePathNameProc
ASFileSysGetFileFlags
ASFileSysGetStatusProc
ASFileSysMReadRequestProc
ASFileSysYieldProc
ASIODoneProc
ASMemFreeProc
AVAnnotHandlerCursorEnterProc
AVAnnotHandlerCursorExitProc
AVAuxDataPerformProc
AVTransHandlerCompleteTransDictProc
AVTransHandlerDoPropertiesProc
AVTransHandlerEnumProc
AVTransHandlerExecuteProc
AVTransHandlerGetButtonTextProc
AVTransHandlerGetInstructionsProc
AVTransHandlerGetStringOneTextProc
AVTransHandlerGetStringTwoTextProc
AVTransHandlerGetTypeProc
AVTransHandlerGetItemUINameProc
AVTransHandlerGetUINameProc
AVTransHandlerInitTransDictProc
PDAuthProcEx
PDCryptFreeAuthDataProc
PDCryptFreeSecurityDataProc
PDLaunchActionProc
PDPageStmImageDataProc
PDPageStmStringOverflowProc
Data
The following data structures were added in version 3.0.
ASFile Flags
ASFileMode (ASFILE_SERIAL and ASFILE_LOCAL)
ASFileStatus Flags
ASFileSysRec (significantly expanded)
ASIORequest
ASPlatformPrinterSpec
AVAnnotHandler (new callbacks)
AVAuxDataHandler
AVDocOpenParams (significantly expanded)
AVDocPrintParams
AVDocViewDef
AVPrefsType (significantly expanded)
AVSystemFont
AVSystemFont Flags
AVTransHandler
AVTransitionPort
CosDocOpenParams
CosDocSaveFlags
CosDocSaveParams
Emit Font Options
Emit Flags
Page Specification
PDCryptHandler (new callbacks)
PDDocReadAhead Flags
PDLayoutMode
PDPageStmToken
Predefined Cursors (cursors added)
AVDocDidAddToSelection
AVDocWantsToDie
AVDocWillOpenFromPDDoc
PDDocWillPrintDoc
PDDocWillSaveEx
Miscellaneous
Values of some types in methods, callbacks, and data have been changed for improved
cross-platform portability.
boolean ASBool
Int8 ASInt8
Int16 ASInt16
Int32 ASInt32
Uns8 ASUns8
Uns16 ASUns16
Uns32 ASUns32
Version 3.0J
Methods
The following methods were added in version 3.0J.
Available only if PI_PDMODEL_VERSION (in PIRequir.h) is set to 0x00020003 or
higher.
PDGetHostEncoding
PDHostMBLen
PDXlateToHostEx
PDXlateToPDFDocEncEx
PDDocCreateWordFinderUCS
PDFontGetCIDSystemInfo
PDFontGetCIDSystemSupplement
PDFontGetDescendant
PDFontGetEncodingName
PDFontXlateToHost
PDFontXlateToUCS
The following methods have new behavior in version 3.0J.
PDWordFilterString
PDWordGetString
PDWordSplitString
Ver s i o n 3 . 0 1
Methods
The following methods were added in version 3.01.
Available only if PI_ACROVIEW_VERSION (in PIRequir.h) is set to 0x00020003 or
higher.
AVDestInfoDestroy
AVDocCopyAction
AVDocCopyActionCommon
AVDocCopyAdditionalActions
AVDocCopyAnnot
AVDocCopyAnnotCommon
AVDocDoCopyAs
AVPageViewDrawCosObjEx
AVPageViewToDestInfo
AVPageViewUseDestInfo
Callbacks
The following callbacks were added in version 3.01.
AVActionCopyProc
AVAnnotHandlerCopyProc
CrossDocLinkWithDestProc
Data
The following data structures were added or changed in version 3.01.
AVAnnotHandler (new flag)
AVDestInfo
Emit Font Options (obsoleted and new flags)
ExternalDocServerCreationData (new callback and data)
Errors
The following errors were added in version 3.01.
avErrBadActionCopy
avErrBadAnnotationCopy
PDEClipGetElem
PDEClipGetNumElems
PDEClipRemoveElems
PDEColorSpaceCreate
PDEColorSpaceCreateFromName
PDEColorSpaceGetBase
PDEColorSpaceGetBaseNumComps
PDEColorSpaceGetCosObj
PDEColorSpaceGetCTable
PDEColorSpaceGetHiVal
PDEColorSpaceGetName
PDEColorSpaceGetNumComps
PDEContainerCreate
PDEContainerGetContent
PDEContainerGetDict
PDEContainerGetMCTag
PDEContainerSetContent
PDEContainerSetDict
PDEContainerSetMCTag
PDEContentAddElem
PDEContentCreate
PDEContentCreateFromCosObj
PDEContentGetAttrs
PDEContentGetElem
PDEContentGetNumElems
PDEContentGetResources
PDEContentRemoveElem
PDEContentToCosObj
PDEElementCopy
PDEElementGetBBox
PDEElementGetClip
PDEElementGetGState
PDEElementGetMatrix
PDEElementSetGState
PDEElementSetMatrix
PDEExtGStateCreate
PDEExtGStateGetCosObj
PDEFontCreate
PDEFontCreateFromCosObj
PDEFontCreateFromSysFont
PDEFontCreateWithParams
PDEFontGetCosObj
PDEFontGetNumCodeBytes
PDEFontSubsetNow
PDFindSysFontForPDEFont
PDEShadingCreateFromCosObj
PDEFormGetContent
PDEFormGetCosObj
PDEImageCreate
PDEImageCreateFromCosObj
PDEImageDataIsEncoded
PDEImageGetAttrs
PDEImageGetColorSpace
PDEImageGetCosObj
PDEImageGetData
PDEImageGetDataLen
PDEImageGetDataStm
PDEImageGetFilterArray
PDEImageIsCosObj
PDEImageSetData
PDEImageSetDataStm
PDEAcquire
PDEAddTag
PDEGetTag
PDEObjectGetType
PDERelease
PDERemoveTag
PDEPathAddSegment
PDEPathCreate
PDEPathGetData
PDEPathGetPaintOp
PDEPathSetData
PDEPathSetPaintOp
PDEPatternCreate
PDEPatternGetCosObj
PDEPlaceCreate
PDEPlaceGetDict
PDEPlaceGetMCTag
PDEPlaceSetDict
PDEPlaceSetMCTag
PDETextAdd
PDETextCreate
PDETextGetAdvanceWidth
PDETextGetBBox
PDETextGetFont
PDETextGetGState
PDETextGetNumBytes
PDETextGetNumRuns
PDETextGetQuad
PDETextGetRunForChar
PDETextGetStrokeMatrix
PDETextGetText
PDETextGetTextMatrix
PDETextGetTextState
PDETextIsAtPoint
PDETextReplaceChars
PDETextRunGetCharOffset
PDETextRunGetNumChars
PDETextRunSetFont
PDETextRunSetGState
PDETextRunSetStrokeMatrix
PDETextRunSetTextMatrix
PDETextRunSetTextState
PDETextSplitRunAt
PDEXObjectCreate
PDEXObjectGetCosObj
PDEnumSysFonts
PDFindSysFont
PDPageAcquirePDEContent
PDPageGetPDEContentFilters
PDPageGetPDEContentFlags
PDPagePDEContentWasChanged
PDPageRegisterForPDEContentChanged
PDPageRegisterForPDEContentNotCached
PDPageReleasePDEContent
PDPageSetPDEContent
PDPageSetPDEContentFilters
PDPageSetPDEContentFlags
PDPageSuspendPDEContentChanged
PDPageUnRegisterForPDEContentNotCached
PDSysFontAcquirePlatformData
PDSysFontGetEncoding
PDSysFontGetInfo
PDSysFontGetName
PDSysFontGetType0Widths
Callbacks
The following callbacks were added for PDFEdit.
PDEAttrEnumProc
PDEElementEnumProc
PDEObjectDumpProc
PDSysFontEnumProc
Data
The following data structures were added, mostly for PDFEdit.
PDFLData (for Adobe PDF Library)
PDEColorSpec
PDEColorValue
PDEContentAttrs
PDEContentFlags
PDEContentToCosObjFlags
PDEDash
PDEElementCopyFlags
PDEEnumElementsFlags
PDEFilterArray
PDEFilterSpec
PDEFontAttrs
PDEFontCreateFlags
PDEFontInfoP
PDEGraphicStateP
PDEGraphicStateWasSetFlags
PDEImageAttrFlags
PDEImageAttrs
PDEImageDataFlags
PDEPathElementType
PDEPathOpFlags
PDETextFlags
PDETextRenderMode
PDETextState
PDETextStateWasSetFlags
PDEType
PDSysFontMatchFlags
Notifications
The following notifications were added for PDFEdit.
PagePDEContentDidChange
PagePDEContentNotCached
Ver s i o n 4
Objects
The following objects were added in version 4.0.
ASExtension
PDEDeviceNColors
PDEGroup
PDEShading
PDEUnknown
PDNameTree
PDNumTree
PDPageLabel
PDSAttrObj
PDSClassMap
PDSElement
PDSMC
PDSRoleMap
PDSTreeRoot
Methods
The following methods were obsoleted in version 4.0.
PDPageEnumContents
PDPageEnumResources
The following methods were added in version 4.0.
Available only if PI_ACROSUPPORT_VERSION (in PIRequir.h) is set to 0x00040000 or
higher.
ASEnumExtensions
ASExtensionGetFileName
ASExtensionGetRegisteredName
ASFileStmWrOpen
ASProcStmWrOpen
HFTIsValid
Available only if PI_ACROVIEW_VERSION (in PIRequir.h) is set to 0x00040000 or
higher.
AVAnnotHandlerDeleteInfo
AVAnnotHandlerGetInfo
AVAppHandlePlatformEvent
AVAppOpenHelpFile
AVDocAlert
AVDocAlertConfirm
AVDocAlertNote
AVDocAlertYesNo
AVDocDoCopyAs
AVDocDoPrint
AVDocDoSaveAsWithParams
AVDocIsReadOnly
AVDocSelectionEnumPageRanges
AVDocSetReadOnly
AVMenuIsHiddenOnMenubar
AVMenubarAddHiddenMenu
AVPageViewAppearanceGetAVMatrix
AVPageViewDeviceRectToPageRZ
AVPageViewDoPopupMenu
AVPageViewDrawAnnotSequence
AVPageViewGetGrayRect
AVPageViewGetVisibleAnnotPage
AVPageViewInvertQuad
AVPageViewShowControl
AVPageViewTransformRectRZ
AVSysAllocTimeStringFromTimeRec
AVToolBarNewFlyout
AVToolButtonGetFlyout
AVToolButtonGetIcon
AVToolButtonGetMenu
AVToolButtonSetFlyout
AVToolButtonSetIcon
AVToolButtonSetMenu
AVWindowHandlePlatformEvent
Available only if PI_ACROVIEW_VERSION (in PIRequir.h) is set to 0x00040005 or
higher.
AVAppRegisterForPageViewKeyDown
AVAppUnregisterForPageViewKeyDown
Available only if PI_COS_VERSION (in PIRequir.h) is set to 0x00040000 or higher.
CosArrayRemoveNth
CosDocEnumEOFs
CosDocEnumIndirect
CosDocGetObjByID
CosDocSaveWithParams
CosObjCopy
CosObjGetGeneration
CosObjGetID
CosObjHash
CosStringGetHexFlag
CosStringSetHexFlag
Available only if PI_COS_VERSION (in PIRequir.h) is set to 0x00040005 or higher.
CosCryptGetVersion
CosDecryptGetMaxKeyBytes
CosEncryptGetMaxKeyBytes
Available only if PI_PDMODEL_VERSION (in PIRequir.h) is set to 0x00040000 or
higher.
PDDocCreateNameTree
PDDocCreateStructTreeRoot
PDDocEnumOCGs
PDDocExportNotes
PDDocFindPageNumForLabel
PDDocFromCosDoc
PDDocGetLabelForPageNum
PDDocGetNameTree
PDDocGetPageLabel
PDDocGetStructTreeRoot
PDDocImportCosDocNotes
PDDocImportNotes
PDDocOpenWithParams
PDDocReadAheadPages
PDDocRemoveNameTree
PDDocRemovePageLabel
PDDocRemoveStructTreeRoot
PDDocSetPageLabel
PDFontFromCosObj
PDGetAnnotHandlerByName
PDImageSelectAlternate
PDImageSelAdjustMatrix
PDImageSelGetDeviceAttr
PDImageSelGetGeoAttr
PDNameTreeEnum
PDNameTreeEqual
PDNameTreeFromCosObj
PDNameTreeGet
PDNameTreeGetCosObj
PDNameTreeIsValid
PDNameTreeNew
PDNameTreePut
PDNameTreeRemove
PDPageGetAnnotSequence
PDPageLabelEqual
PDPageLabelFromCosObj
PDPageLabelGetCosObj
PDPageLabelGetPrefix
PDPageLabelGetStart
PDPageLabelGetStyle
PDPageLabelIsValid
PDPageLabelNew
PDRegisterAnnotHandler
The following methods were added for the Adobe PDF Library.
ASAtomGetCount
ASPurgeMemory
PDFLPrintDoc
The following methods were added for Placed PDF, which is part of the Adobe PDF Library.
AGMCleanup
AGMClip
AGMClosePath
AGMConcat
AGMDeletePort
AGMDeleteRasterDev
AGMFill
AGMInit
AGMLineTo
AGMMoveTo
AGMNewBitmapPort
AGMNewPath
AGMNewRasterDev
AGMNewRasterPort
AGMNewWindowPort
AGMSetAntiAliasPolicy
AGMSetRGBColor
CCSetSystemCalibration
PDDocPrintPages
PDFontDownloadContextCreate
PDFontDownloadContextDestroy
PDFontStreamPS
PDFontWasExtracted
PDFontWasFauxed
PDFreeMemory
PDPageDrawContents
PDPageDrawContentsPlaced
PDPageDrawContentsPlacedToWindow
PDPageEmitPSOrient
The following methods were added for PDFEdit.
Available only if PI_PDFEDIT_READ_VERSION (in PIRequir.h) is set to 0x00040000
or higher.
PDEClipFlattenedEnumElems
PDEContentGetDefaultColorSpace
PDEDeviceNColorsGetColorValue
PDEElementIsAtPoint
PDEElementIsAtRect
PDEFontGetNumCodeBytes
PDEFontGetOneByteEncoding
PDEFontIsMultiByte
PDEFontSumWidths
PDEGroupGetContent
PDEImageGetDecodeArray
PDETextGetNumBytes
PDETextIsAtPoint
PDETextIsAtRect
Available only if PI_PDFEDIT_WRITE_VERSION (in PIRequir.h) is set to
0x00040000 or higher.
PDEClipAddElem
PDEClipCopy
PDEClipCreate
PDEColorSpaceCreate
PDEDeviceNColorsCreate
PDEFontCreateFromSysFontEx
PDEFontCreateWithParams
PDEGroupCreate
PDEGroupSetContent
PDEImageSetDecodeArray
PDEPurgeCache
PDEShadingCreateFromCosObj
PDEUnknownGetOpName
Available only if PI_PDSYSFONT_VERSION (in PIRequir.h) is set to 0x00040000 or
higher.
PDEmbedSysFontForPDEFont
PDFindSysFontEx
PDSysFontAcquirePlatformData
PDSysFontGetCIDSystemInfo
PDSysFontGetType0Widths
PDSysFontGetWidthsEx
PDSysFontReleasePlatformData
The following methods were added for PDS (Structure level).
Available only if PI_PDS_READ_VERSION (in PIRequir.h) is set to 0x00040000 or
higher.
PDSAttrObjGetOwner
PDSClassMapGetAttrObj
PDSClassMapGetNumAttrObjs
PDSElementGetAlt
PDSElementGetAttrObj
PDSElementGetClass
PDSElementGetFirstPage
PDSElementGetID
PDSElementGetKid
PDSElementGetNumAttrObjs
PDSElementGetNumClasses
PDSElementGetNumKids
PDSElementGetParent
PDSElementGetRevision
PDSElementGetStructTreeRoot
PDSElementGetTitle
PDSElementGetType
PDSMCGetInfo
PDSOBJGetParent
PDSRoleMapDoesMap
PDSRoleMapGetDirectMap
PDSTreeRootGetClassMap
PDSTreeRootGetElementFromID
PDSTreeRootGetKid
PDSTreeRootGetNumKids
PDSTreeRootGetRoleMap
Available only if PI_PDS_WRITE_VERSION (in PIRequir.h) is set to 0x00040000 or
higher.
PDSAttrObjCreate
PDSAttrObjCreateFromStream
PDSClassMapAddAttrObj
PDSClassMapRemoveAttrObj
PDSClassMapRemoveClass
PDSElementAddAttrObj
PDSElementAddClass
PDSElementClearID
PDSElementCreate
PDSElementIncrementRevision
PDSElementInsertKid
PDSElementInsertMCAsKid
PDSElementInsertOBJAsKid
PDSElementRemoveAttrObj
PDSElementRemoveAllAttrObjs
PDSElementRemoveAllClasses
PDSElementRemoveClass
PDSElementRemoveKid
PDSElementRemoveKidMC
PDSElementReplaceKid
PDSElementReplaceKidMC
PDSElementReplaceKidOBJ
PDSElementSetAlt
PDSElementSetID
PDSElementSetTitle
PDSElementSetType
PDSRoleMapCopy
PDSRoleMapMap
PDSRoleMapUnMapDst
PDSRoleMapUnMapSrc
PDSTreeRootCreateClassMap
PDSTreeRootCreateRoleMap
PDSTreeRootInsertKid
PDSTreeRootRemoveClassMap
PDSTreeRootRemoveKid
PDSTreeRootRemoveRoleMap
PDSTreeRootReplaceKid
Available only if PI_WIN_VERSION (in PIRequir.h) is set to 0x00040000 or higher.
WinAppGetPrinterHDC
The following methods are now replaceable.
AVDocDoPrint
AVDocDoSaveAsWithParams
AVDocPrintPages
AVDocPrintPagesWithParams
PDImageSelectAlternate
Callbacks
The following callbacks were added in version 4.0.
ASExtensionEnumProc
ASProcStmDestroyProc
ASStmProc
AVAnnotHandlerDeleteInfoProc
AVAnnotHandlerGetInfoProc
AVDocSelectionEnumPageRangesProc
AVDocSelectionGetSelectionTypeProc
AVPageViewKeyDownProc
AVSelectionPageRangeEnumProc
AVWindowDestroyPlatformThingProc
CosDocEnumEOFsProc
CosObjOffsetProc
CosObjSetCallbackFlagProc
DoClickProcType
DoLeaveProcType
GetSelectionServerProcType
PDAnnotHandlerDeleteAnnotInfoProc
PDAnnotHandlerGetAnnotInfoFlagsProc
PDAnnotHandlerGetAnnotInfoProc
PDAnnotHandlerGetTypeProc
PDAnnotWillPrintProc
PDCryptNewCryptDataExProc
PDDocPreSaveProc
PDDocWillExportAnnotCallback
PDDocWillExportAnnotProc
PDDocWillImportAnnotCallback
PDDocWillImportAnnotProc
PDEClipEnumProc
PIExportHFTsProcType
PIHandshake
PIImportReplaceAndRegisterProcType
PIInitProcType
PIUnloadProcType
The following callbacks were added for the Adobe PDF Library.
ASMemAllocProc
ASMemAvailProc
ASMemFreeProc
ASMemReallocProc
PDFLPrintCancelProc
TKResourceAcquireProc
TKResourceReleaseProc
The following callbacks were added for Placed PDF, which is part of the Adobe PDF Library.
AGMMemAllocator
AGMMemDeleter
AGMPortDestructProcPtr
DoCancel
DocBegin
DocEnd
DocSetup
EmitPageContents
EmitPrologString
EmitPSFontBegin
EmitPSFontEncodingBegin
EmitPSFontEncodingEnd
EmitPSFontEnd
EmitPSResourceBegin
EmitPSResourceEnd
EndSetup
FlushString
GetFontVMUsage
NotifyNewPage
PageBegin
PageEnd
PageSetup
PDPrintCanEmitFontProc
PDPrintEmitFontProc
PDPrintEmitPrologResourceProc
PDPrintGetFontEncodingMethodProc
Data
The following data structures were added in version 4.0.
AGMBlackPointFlt
AGMColorRangeFlt
AGMGrayCalFlt
AGMLabCalFlt
AGMRGBCalFlt
AGMWhitePointFlt
AGMXYZColorFlt
AVAnnotHandler
AVAnnotHandlerInfo
AVDocSaveParams
AVIcon
AVPageViewControlID
PDAnnotHandler
PDAnnotInfo
PDDocCopyParams
PDDocOpenParams
PDDocPreSaveInfo
PDEColorSpaceStruct
PDEDeviceNColorData
PDEFontCreateParams
PDEGrayCalFlt
PDEICCBasedColorData
PDEIndexedColorData
PDELabCalFlt
PDEPatternColorSpace
PDERGBCalFlt
PDESeparationColorData
PDFLPrintUserParamsRec (for Adobe PDF Library)
PDFontStyles
PDPageDrawFlags
PIHandshakeData_V0200
StdPassword
StdSecurityData
TKAllocatorProcs (for Adobe PDF Library)
TKResourceProcs (for Adobe PDF Library)
The following data structures were added for Placed PDF, which is part of the Adobe PDF
Library.
AGMCMYKColorRec
AGMColorTab
AGMFixedMatrix
AGMFixedPoint
AGMImageAlphaRecord
AGMInt16Rect
AGMLABColorRec
AGMMemObj
AGMRGBColorRec
PDPageDrawFlags
PDPrintClient
Errors
The following errors were added in version 4.0.
avErrActionExternal
avErrActionFullScreen
avErrActionRestricted
avErrCantOpenDialog
avErrCantOpenPrinting
pageErrBadEPSColorSpace
pageErrBadFunction
pageErrInvalidImageMaskDepth
pdErrCannotMergeWithSubsetFonts
pdErrHostEncodingNotSet
pdErrNoPDDocForCosDoc
ErrSysRaster
peErrCantCreateFontSubset
peErrCantEmbedFont
peErrCantGetAttrs
peErrCantGetWidths
peErrCantReadImage
peErrFontToEmbedNotOnSys
peErrNoError
peErrPStackUnderflow
peErrUnknownPDEColorSpace
peErrUnknownResType
peErrWrongPDEObjectType
Notifications
The following notifications were added in version 4.0.
AVAppWillCloseAllInternalDocs
AVDocDidClickName
AVDocDidPrint
AVDocWillPrint
PDBookmarkDidUnlink
PDDocDidClose
PDDocDidExportAnnots
PDDocDidImportAnnots
PDDocDidInsertPagesEx
PDDocPageLabelDidChange
PDDocWillClose
PDDocWillExportAnnots
PDDocWillImportAnnots
PDDocWillInsertPagesEx
PDNameTreeNameAdded
PDNameTreeNameRemoved
PSPrintAfterBeginPageSetup
PSPrintAfterBeginProlog
PSPrintAfterBeginSetup
PSPrintAfterEmitExtGState
PSPrintAfterPageTrailer
PSPrintAfterTrailer
PSPrintBeforeEndComments
PSPrintBeforeEndSetup
Ver s i o n 5
Objects
The following objects were added in version 5.0.
ASCab
ASText
AVCommand
AVSweetPea
PDEBeginContainer
PDEBeginGroup
PDEEndContainer
PDEEndGroup
PDEPS
PDESoftMask
PDEXGroup
PDSysEncoding
Modifed Objects
The following objects were modified in version 5.0.
PDWord
Methods
The following methods were deprecated in version 5.0.
ASPathFromPlatformPath
AVToolBarGetFrame
The following method was deleted in version 5.0.
AVAppWindowHandlePlatformEvent
The following method UNIX-specific method was added in version 5.0.
UnixMachinePortGetOffscreenPixmap
The following methods were added or modified in version 5.0.
Available only if PI_ASEXTRA_VERSION (in PIRequir.h) is set to 0x00050000 or
higher.
ASCabCopy
ASCabDestroy
ASCabDestroyEmpties
ASCabDetachBinary
ASCabDetachCab
ASCabDetachPathName
ASCabDetachPointer
ASCabDetachString
ASCabDetachText
ASCabDup
ASCabEnum
ASCabEqual
ASCabFromEntryList
ASCabGetAtom
ASCabGetBinary
ASCabGetBinaryCopy
ASCabGetBool
ASCabGetCab
ASCabGetDouble
ASCabGetInt
ASCabGetPathNameCopy
ASCabGetPointer
ASCabGetPointerDestroyProc
ASCabGetPointerType
ASCabGetString
ASCabGetStringCopy
ASCabGetText
ASCabGetType
ASCabKnown
ASCabMakeEmpty
ASCabMunge
ASCabNew
ASCabNumEntries
ASCabPutAtom
ASCabPutBinary
ASCabPutBool
ASCabPutCab
ASCabPutDouble
ASCabPutInt
ASCabPutNull
ASCabPutPathName
ASCabPutPointer
ASCabPutString
ASCabPutText
ASCabReadFromStream
ASCabRemove
ASCabRename
ASCabValueEqual
ASCabWriteToStream
ASScriptFromHostEncoding
ASScriptToHostEncoding
ASTextCat
ASTextCatMany
ASTextCmp
ASTextCopy
ASTextDestroy
ASTextDup
ASTextFromEncoded
ASTextFromInt32
ASTextFromPDText
ASTextFromScriptText
ASTextFromSizedEncoded
ASTextFromSizedPDText
ASTextFromSizedScriptText
ASTextFromSizedUnicode
ASTextFromUnicode
ASTextFromUns32
ASTextGetBestEncoding
ASTextGetBestScript
ASTextGetCountry
ASTextGetEncoded
ASTextGetEncodedCopy
ASTextGetLanguage
ASTextGetPDTextCopy
ASTextGetScriptText
ASTextGetScriptTextCopy
ASTextGetUnicode
ASTextGetUnicodeCopy
ASTextIsEmpty
ASTextMakeEmpty
ASTextNew
ASTextNormalizeEndOfLine
ASTextReplace
ASTextReplaceASCII
ASTextSetCountry
ASTextSetEncoded
ASTextSetLanguage
ASTextSetPDText
ASTextSetScriptText
ASTextSetSizedEncoded
ASTextSetSizedPDText
ASTextSetSizedScriptText
ASTextSetSizedUnicode
ASTextSetUnicode
AVAppRegisterFromPDFHandler
AVAppRegisterGlobalCommand
AVAppRegisterToolBarPosition
AVAppRegisterToPDFHandler
AVAppSaveDialog
AVAppUnregisterGlobalCommand
AVAppYieldToOtherApps
AVCommandCancel
AVCommandDestroy
AVCommandExecute
AVCommandGetAVDoc
AVCommandGetCab
AVCommandGetCancelProc
AVCommandGetConfig
AVCommandGetInputs
AVCommandGetName
AVCommandGetParams
AVCommandGetPDDoc
AVCommandGetProgressMonitor
AVCommandGetProps
AVCommandGetReportProc
AVCommandGetStatus
AVCommandGetUIPolicy
AVCommandNew
AVCommandPutCab
AVCommandReset
AVCommandSetConfig
AVCommandSetInputs
AVCommandSetParams
AVCommandShowDialog
AVCommandWork
AVConversionConvertFromPDFWithHandler
AVConversionConvertToPDF
AVConversionConvertToPDFWithHandler
AVConversionEnumFromPDFConverters
AVConversionEnumToPDFConverters
AVDocFromPDDoc
AVDocIsDead
AVDocPerformActionEx
AVDocPermRequest
AVExtensionAcquireInfo
AVExtensionGetNumPlugIns
AVExtensionReleaseInfo
AVIdentityGetText
AVIdentitySetText
AVPageViewClearFocusAnnot
AVPageViewDeviceToInfo
AVPageViewDragOutNewRectSnapped
AVPageViewDragRectSnapped
AVPageViewDrawRectOutlineWithHandles
AVPageViewFilterKeyDownForFocusAnnot
AVPageViewFocusAnnotPerformOp
AVPageViewGetFocusAnnot
AVPageViewGetMousePositionSnapped
AVPageViewGhostRectOutline
AVPageViewInfoToDevice
AVPageViewInfoToPoint
AVPageViewIsAnnotOfTypeAtPoint
AVPageViewIsFocusAnnot
AVPageViewPointToInfo
AVPageViewResumeOffscreenDrawing
AVPageViewScrollToAnnot
AVPageViewSetFocusAnnot
AVPageViewSnapPoint
AVPageViewSnapRect
AVPageViewSuspendOffscreenDrawing
AVPageViewUpdateInfoPanel
AVRectHandleHitTest
AVSweetPeaGetBasicSuiteP
AVSweetPeaGetPluginRef
AVSweetPeaGetResourceAccess
AVSweetPeaIsADMAvailable
AVSweetPeaProcessADMEvent
AVSweetPeaSetResourceAccess
AVSysSetWaitCursor
AVToolBarNew
AVUtilGetBaseNameAndExtensionByPathName
AVUtilGetBaseNameAndExtensionByString
AVWindowCenter
AVWindowEnsureInBounds
Available only if PI_ACROVIEW_VERSION (in PIRequir.h) is set to 0x00050001 or
higher.
AVMenuClone
Available only if PI_PDMETADATA_VERSION (in PIRequir.h) is set to 0x00050000
or higher.
CosDictGetXAPMetadata
CosDictSetXAPMetadata
PDDocCalculateImplicitMetadata
PDDocGetXAPMetadata
PDDocSetXAPMetadata
PDEContainerGetXAPMetadata
PDEContainerSetXAPMetadata
Available only if PI_COS_VERSION (in PIRequir.h) is set to 0x00050000 or higher.
CosCopyStringValue
CosDocGetID
CosObjCmp
CosStringValueSafe
Available only if PI_PDMODEL_VERSION (in PIRequir.h) is set to 0x00050000 or
higher.
PDBookmarkGetColor
PDBookmarkGetFlags
PDBookmarkRemoveAction
PDBookmarkSetColor
PDBookmarkSetFlags
PDDocExportSomeNotes
PDDocGetPageObjByNum
PDDocPermRequest
PDDocRemoveOpenAction
PDLinkAnnotRemoveAction
PDNameTreeNotifyNameAdded
PDNameTreeNotifyNameRemoved
PDPageDrawContentsToWindowEx
PDPageGetBox
PDPageGetPalette
PDPageHasTransparency
PDPageResumePDEContentChanged
PDPageSetBox
PDTextSelectCreatePageHiliteEx
PDTextSelectCreateRangesEx
PDTextSelectCreateWordHiliteEx
PDTextSelectEnumTextUCS
PDPageSuspendPDEContentChanged
Available only if PI_PDFEDIT_READ_VERSION (in PIRequir.h) is set to
0x00050000 or higher.
PDEBeginContainerGetDict
PDEBeginContainerGetMCTag
PDEElementHasGState
PDEExtGStateAcquireSoftMask
PDEExtGStateGetAIS
PDEExtGStateGetBlendMode
PDEExtGStateGetOpacityFill
PDEExtGStateGetOpacityStroke
PDEExtGStateGetOPFill
PDEExtGStateGetOPM
PDEExtGStateGetOPStroke
PDEExtGStateGetSA
PDEExtGStateGetTK
PDEExtGStateHasSoftMask
PDEFormAcquireXGroup
PDEFormHasXGroup
PDEImageGetMatteArray
PDEImageGetSMask
PDEImageHasSMask
PDESoftMaskAcquireForm
PDESoftMaskGetBackdropColor
PDESoftMaskGetCosObj
PDESoftMaskGetName
PDESoftMaskGetTransferFunction
PDETextGetMatrix
PDETextGetState
PDEXGroupAcquireColorSpace
PDEXGroupGetCosObj
PDEXGroupGetIsolated
PDEXGroupGetKnockout
PDSysEncodingGetWMode
PDSysEncodingIsIdentity
PDSysEncodingIsMultiByte
Available only if PI_PDFEDIT_WRITE_VERSION (in PIRequir.h) is set to
0x00050000 or higher.
PDEBeginContainerCreate
PDEBeginContainerSetDict
PDEBeginContainerSetMCTag
PDEBeginGroupCreate
PDEEndContainerCreate
PDEEndGroupCreate
PDEExtGStateCreateNew
PDEExtGStateSetAIS
PDEExtGStateSetBlendMode
PDEExtGStateSetOpacityFill
PDEExtGStateSetOpacityStroke
PDEExtGStateSetOPFill
PDEExtGStateSetOPM
PDEExtGStateSetOPStroke
PDEExtGStateSetSA
PDEExtGStateSetSoftMask
PDEExtGStateSetTK
PDEFontCreateFromSysFontAndEncoding
PDEFontCreateFromSysFontWithParams
PDEFontCreateToUnicodeNow
PDEFontCreateWidthsNow
PDEFontEmbedNow
PDEFontEmbedNowDontSubset
PDEFontGetCreateNeedFlags
PDEFontGetWidthsNow
PDEFontTranslateGlyphIdsToUnicode
PDEFormSetXGroup
PDEImageSetColorSpace
PDEImageSetMatteArray
PDEImageSetSMask
PDESoftMaskCreate
PDESoftMaskCreateFromCosObj
PDESoftMaskCreateFromName
PDESoftMaskSetBackdropColor
PDESoftMaskSetTransferFunction
PDESoftMaskSetXGroup
PDETextRunSetMatrix
PDETextRunSetState
PDEXGroupCreate
PDEXGroupCreateFromCosObj
PDEXGroupSetColorSpace
PDEXGroupSetIsolated
PDEXGroupSetKnockout
PDSysEncodingCreateFromBaseName
PDSysEncodingCreateFromCMapName
PDSysFontGetCreateFlags
Available only if PI_PDSYSFONT_VERSION (in PIRequir.h) is set to 0x00050000 or
higher.
PDFindSysFontForPDEFont
Available only if PI_PDS_READ_VERSION (in PIRequir.h) is set to 0x00050000 or
higher.
PDSElementGetActualText
PDSElementGetKidEx
PDSElementGetLanguage
PDSElementHasActualText
PDSElementHasAlt
PDSElementHasLanguage
Available only if PI_PDS_WRITE_VERSION (in PIRequir.h) is set to 0x00050000
or higher.
PDSElementRemoveKidOBJ
PDSElementSetActualText
PDSElementSetLanguage
Available only if PI_WIN_VERSION (in PIRequir.h) is set to 0x00050000 or higher.
WinAppRegisterInterface
Callbacks (new or modified)
The following callbacks were added in version 5.0.
ASCabEnumProc
ASCabPointerDestroyProc
ASCancelProc
ASFileSysCreateFolderProc
ASFileSysDestroyFolderIteratorProc
ASFileSysDisplayStringFromPathProc
ASFileSysFirstFolderItemProc
ASFileSysGetItemPropsProc
ASFileSysGetParentProc
ASFileSysGetTypeAndCreatorProc
ASFileSysNextFolderItemProc
ASFileSysRemoveFolderProc
ASFileSysSetTypeAndCreatorProc
ASFileSysURLFromPathProc
ASReportProc
AVActionPerformExProc
AVAnnotHandlerCanPerformOpProc
AVAnnotHandlerDoKeyDownExProc
AVAnnotHandlerDrawExProc
AVAnnotHandlerPerformOpProc
AVCmdHandlerInitProc
AVCmdHandlerTermProc
AVCommandCancelProc
AVCommandCreatedProc
AVCommandDestroyProc
AVCommandGetProc
AVCommandPostflightFileProc
AVCommandPostflightSequenceProc
AVCommandPreflightFileProc
AVCommandPreflightSequenceProc
AVCommandRegisterCommandsProc
AVCommandResetProc
AVCommandSetProc
AVCommandShowDialogProc
AVCommandWorkProc
AVConversionConvertFromPDFProc
AVConversionConvertToPDFProc
AVConversionDefaultSettingsProc
AVConversionFromPDFEnumProc
AVConversionParamDescProc
AVConversionSettingsDialogProc
AVConversionToPDFEnumProc
AVDocPermReqProc
AVDocSelectionGetAVRectProc
AVDocSelectionShowMenuProc
AVOpenSaveDialogSettingsComputeEnabledProc
AVOpenSaveDialogSettingsExecuteProc
AVSetFocusProc
PDCryptAuthorizeExProc
PDCryptBatchAuthorizeProc
PDCryptBatchFreeAuthDataProc
PDCryptBatchNewAuthDataProc
PDCryptBatchParamDescProc
PDCryptBatchPostSequenceProc
PDCryptBatchPreSequenceProc
PDCryptBatchShowDialogProc
PDCryptBatchUpdateSecurityDataProc
PDCryptDisplaySecurityDataProc
PDCryptGetAuthDataExProc
PDCryptReservedProc
PDImplicitMetadataProc
PMSetTextProc
Data (New or modified)
The following data structures were added or changed in version 5.0.
ASCabEntryRec
ASCabMungeAction
ASCabValueType
ASFile Flags
ASFileSysCreatePathFromCString (macro)
ASFileSysCreatePathFromDIPath (macro)
ASFileSysCreatePathFromFSSpec (macro)
ASFileSysCreatePathWithFolderName (macro)
ASFileSysRec
ASFileSysItemProps
ASFileSysItemType
ASFolderIterator
ASFixedRoundToInt16 (macro)
ASHostEncoding
ASMDFile (replaced MDFile)
ASPortRef
ASProgressMonitor
ASReportType
ASScript
ASUnicodeFormat
ASWindowRef
AVAccessColorPolicy
AVActionContext
AVAlertButtonInfo
AVAlertCheckBoxInfo
AVAlert Icons
AVAlertParams
AVAnnotHandler
AVAnnotOp
AVAnnotOpData
AVBatchContext
AVCommandHandler
AVCommandStatus
AVCommandUIPolicy
AVConversionClientData
AVConversionEnumProcData
AVConversionFlags
AVConversionFromPDFHandler
AVConversionStatus
AVConversionToPDFHandler
AVDocOpenParams
AVDocPrintParams
AVDocSaveParams
AVDocSelectionServer
AVExtensionInfo
AVFileDescRec
AVFileFilterRec
AVFullScreenMonitor
AVIconBundle
AVIdentity
AVInfoPanelUpdateType
AVOpenSaveDialogFlags
AVOpenSaveDialogParams
AVPageViewControlID
AVPrefsType
AVRectHandleType
AVSpecialCategory
AVSpecialError
AVSpecialFolder
AVStatusMonitorProcs
AVToolBarDockPosition
AVToolBarLayout
AVToolBarPosition
AVTransitionPort
AVWindow Flags
AVWindowLayer
AVZoomType
Command Keys
Emit Flags
ExternalDocServerCreationData
Modifier Keys
PDAnnotArray
PDAnnotInfo
PDCryptBatchHandler
PDCryptHandler
PDEFontAttrs
PDEFontCreateFromSysFontParams
PDEFontCreateFlags
PDEFontCreateNeedFlags
PDEGrayCalFlt
PDELabCalFlt
PDERGBCalFlt
PDESoftMaskCreateFlags
PDETextState
PDEType
PDEXGroupCreateFlags
PDPermReqObj
PDPermReqOpr
PDPermReqStatus
PDTile
Predefined Cursors
StdSecurityData
Type/Creator Codes
Errors
The following errors were added in version 5.0.
pdErrCannotBeBlankPage
pdErrCannotDeleteAllPages
pdErrExceedEncryptionLength
pdErrExceedEncryptionVersion
pdErrInvalidPageNumber
pdErrMissingGlyphs
pdErrMissingSubsetFont
pdErrNeedJapanese
pdErrNeedKorean
pdErrNeedSimpChinese
pdErrNeedTradChinese
pdErrNotValidPage
pdErrRequireTrustedMode
pdErrStartLessThanEnd
ErrSysPDModel
pdMetadataErrBadPDF
pdMetadataErrCouldntCreateMetaXAP
pdMetadataErrInternalError
Notifications
The following notifications were added in version 5.0.
AVAppOldPrefDidChange
AVAppPrefDidChange
AVAppUsingPDDocForBatch
AVDocDidDeleteSelection
AVPageViewAnnotDidPerformOp
AVPageViewWillDraw
PDDocDidChangePageAreas
PDDocCalculateMetadata
PDDocDidOpen
PDDocDidPrintTiledPage
PDDocPrintingTiledPage
PDDocWillPrintTiledPage
PDPageDidPrintAnnot
PDPageDidPrintAnnots
PDPageWillPrintAnnot
PDPageWillPrintAnnots
PDNameTreeNameAdded
PDNameTreeNameRemoved
PSPrintBeforeAcrobatProcsets
Deleted PDFLibrary-specific Methods, Callbacks, and Data:
The following methods, callbacks, and data were deleted because they are specific to the
PDF Library, so are not available to Acrobat clients. The methods, callbacks, and data that
remain available in the PDF Library are now documented in the PDF Library Supplement to
the Core API Reference. See that document for more information.
NOTE: Many of the following methods, callbacks, and data are no longer available in any
Adobe product. They are mentioned here merely for API record-keeping purposes.
ASAtomGetCount (method)
ASPurgeMemory (method)
AVExtensionMgrRegisterNotification (method)
AVExtensionMgrUnregisterNotification (method)
PDFLGetVersion (method)
PDFLInit (method)
PDFLPrintDoc (method)
PDFLPrintPDF (method)
PDFLTerm (method)
AGMCleanup (method)
AGMClip (method)
AGMClosePath (method)
AGMConcat (method)
AGMDeletePort (method)
AGMDeleteRasterDev (method)
AGMFill (method)
AGMInit (method)
AGMLineTo (method)
AGMMoveTo (method)
AGMNewBitmapPort (method)
AGMNewPath (method)
AGMNewRasterDev (method)
AGMNewRasterPort (method)
AGMNewWindowPort (method)
AGMSetAntiAliasPolicy (method)
AGMSetRGBColor (method)
CCSetSystemCalibration (method)
PDDocPrintPages (method)
PDFontDownloadContextCreate (method)
PDFontDownloadContextDestroy (method)
PDFontStreamPS (method)
PDFontWasExtracted (method)
PDFontWasFauxed (method)
PDFreeMemory (method)
PDPageDrawContents (method)
PDPageDrawContentsPlaced (method)
PDPageDrawContentsPlacedToWindow (method)
PDPageEmitPSOrient (method)
PDSetHostEncoding (method)
AGMMemAllocator (callback)
AGMMemDeleter (callback)
AGMPortDestructProcPtr (callback)
ASMemAllocProc (callback)
ASMemAvailProc (callback)
ASMemFreeProc (callback)
ASMemReallocProc (callback)
DoCancel (callback)
DocBegin (callback)
DocEnd (callback)
DocSetup (callback)
EmitPageContents (callback)
EmitPrologString (callback)
EmitPSFontBegin (callback)
EmitPSFontEncodingBegin (callback)
EmitPSFontEncodingEnd (callback)
EmitPSFontEnd (callback)
EmitPSResourceBegin (callback)
EmitPSResourceEnd (callback)
EndSetup (callback)
FlushString (callback)
GetFontVMUsage (callback)
NotifyNewPage (callback)
PageBegin (callback)
PageEnd (callback)
PageSetup (callback)
PDFLPrintCancelProc (callback)
PDPrintCanEmitFontProc (callback)
PDPrintEmitFontProc (callback)
PDPrintEmitPrologResourceProc (callback)
PDPrintGetFontEncodingMethodProc (callback)
TKResourceAcquireProc (callback)
TKResourceReleaseProc (callback)
AGMBlackPointFlt (data)
AGMCMYKColorRec (data)
AGMColorRangeFlt (data)
AGMColorTab (data)
AGMFixedMatrix (data)
AGMFixedPoint (data)
AGMGrayCalFlt (data)
AGMImageALphaRecord (data)
AGMInt16Rec (data)
AGMLabCalFlt (data)
AGMLABColorRec (data)
AGMMemObj (data)
AGMRGBCalFlt (data)
AGMRGBColorRec (data)
AGMWhitePointFlt (data)
AGMXYZColorFlt (data)
PDFLData (data)
PDFLPrintUserParamsRec (data)
PDInclusion (data)
PDOutputType (data)
PDPrintClient (data)
PDPrintParams (data)
TKAllocatorProcs (data)
TKResourceProcs (data)
Ver s i o n 6
New Objects: introduced in this release
Modified Objects: with new or modified methods in this release
Deprecated Methods and Callbacks
New and Modified Methods: introduced or significantly modified in this release
Methods with Cosmetic Type Changes
New and Modified Callbacks: introduced or significantly modified in this release
Callbacks with Cosmetic Type Changes
New and Modified Data: introduced or significantly modified in this release
Data with Cosmetic Type Changes
New Notifications: introduced in this release
NOTE: Cosmetic Changes: Acrobat 6.0 introduced named cover types that are used in
place of generic numeric types in methods and data structures (generally to support
a future change from 16-bit to 32-bit values). Methods and data that use these
named cover types are listed separately.
In this release, methods and data can be compiled without error if they still use the
generic types, but future releases may conditionally compile the named types
depending on the release version. It is recommended that you update your code to
use the new named types.
New Objects
The following objects were added in version 6.0.
Available only if PI_ASEXTRA_VERSION (in PIRequir.h) is set to 0x00060000 or
higher.
ASDate
ASPlatformPath
ASTimeSpan
Available only if PI_ACROVIEW_VERSION (in PIRequir.h) is set to 0x00060000 or
higher.
AVUndo
Available only if PI_COS_VERSION (in PIRequir.h) is set to 0x00060000 or higher.
CosObjCollection
Available only if PI_PDMODEL_VERSION (in PIRequir.h) is set to 0x00060000 or
higher.
PDOCConfig
PDOCContext
PDOCG
PDOCMD
Available if PI_PDFEDIT_READ_VERSION and PI_PDFEDIT_WRITE_VERSION (in
PIRequir.h) are set to 0x00060000 or higher.
PDETextItem
Modified Objects
The following objects were modified in version 6.0.
ASCab
ASFile
ASFileSys
ASText
AVAnnotHandler
AVApp
AVConversion
AVDoc
AVMenu
AVMenuItem
AVPageView
AVToolButton
AVWindow
HFT
CosDoc
CosObj
PDAnnot
PDDoc
PDPage
PDWord
PDWordFinder
PDEContent
PDEElement
PDEText
AVAnnotHandlerAdjustCursorProc
AVAnnotHandlerDoClickProc
AVAnnotHandlerDoKeyDownProc
AVAnnotHandlerDoPropertiesProc
AVAnnotHandlerDrawProc
AVAnnotHandlerGetLayerProc
PDDocGetPermissions
ASFileCanSetEOF
ASFileHasOutstandingMReads
ASFileSysAcquirePlatformPath
ASFileSysCanPerformOpOnItem
ASFileSysConvertCabToItemProps
ASFileSysConvertItemPropsToCab
ASFileSysDisplayASTextFromPath
ASFileSysDIPathFromPathEx
ASFileSysGetItemPropsAsCab
ASFileSysGetNameFromPathAsASText
ASFileSysPathFromDIPathEx
ASFileSysPerformOpOnItem
ASFileSysReleasePlatformPath
ASIsValidUTF8
ASPlatformPathGetCFURLRefRecPtr
ASPlatformPathGetCstringPtr
ASPlatformPathGetFSRefPtr
ASPlatformPathGetFSRefWithCFStringRefRecPtr
ASPlatformPathGetFSSpecPtr
ASPlatformPathGetPOSIXPathPtr
ASProcStmRdOpenEx
ASStmFlush
ASTextCaseSensitiveCmp
ASTextEval
ASTextFilter
ASTextReplaceBadChars
ASTimeSpanAdd
ASTimeSpanCompare
ASTimeSpanCopy
ASTimeSpanDestroy
ASTimeSpanDiff
ASTimeSpanDup
ASTimeSpanGetASInt32
ASTimeSpanNegate
ASTimeSpanNew
ASTimeSpanSet
ASTimeSpanSetFromASInt32
ASTimeSpanSetFromString
ASUUIDFromCString
ASUUIDGenFromHash
ASUUIDGenFromName
ASUUIDGenUnique
ASUUIDToCString
HFTGetVersion
HFTNewEx
Available only if PI_ACROVIEW_VERSION (in PIRequir.h) is set to 0x00060000 or
higher.
AVAcquireSpecialFilePathNameWithASText
AVAppAutoShowHowToPanel
AVAppCreateIconBundle6
AVAppGetHowToPanelAutoShow
AVAppGetLanguageWithParams
AVAppGetUUID
AVAppHelpSearch
AVAppHelpShowContents
AVAppHelpShowIndex
AVAppOpenHelpFileWithParams
AVAppRegisterAnnotHandler
AVAppRegisterForContextMenuAddition
AVAppRegisterForPageViewAdjustCursor (modified)
AVAppRegisterForPageViewClicks (modified)
AVAppRegisterForPageViewDrawing (modified)
AVAppRegisterForPageViewRightClicks
AVAppRegisterHowToPanel
AVAppRegisterToolBarPosition (modified)
AVAppSetHowToPanelAutoShow
AVAppSetHowToPanelAutoShowText
AVAppSetHowToPanelComputeVisibleProc
AVAppUnregisterForPageViewDrawingEx
AVAppUnregisterForPageViewRightClicks
AVConversionConvertStreamFromPDFWithHandler
AVConversionConvertStreamFromStructNodeWithHandler
AVConversionConvertStreamToPDF
AVConversionConvertStreamToPDFWithHandler
AVDocBeginUndoOperation
AVDocClearUndos
AVDocEndUndoOperation
AVDocGetActiveTool
AVDocGetNthPageView
AVDocGetNumPageViews
AVDocGetPageText
AVDocGetSelectionServerByType
AVDocGetServerType
AVDocGetTopUndo
AVDocGetTopUndoAndRedo
AVDocGetViewDef (modified)
AVDocGetViewDefEx
AVDocIsSlow
AVDocOpenFromASFileWithParams (modified)
AVDocOpenFromASFileWithParamString
AVDocOpenFromFile (modified)
AVDocOpenFromFileWithParamString
AVDocOpenFromPDDoc (modified)
AVDocOpenFromPDDocWithParams (modified)
AVDocOpenFromPDDocWithParamString
AVDocPrintPagesWithParams (modified)
AVDocPrintSeparations
AVDocRegisterSelectionServer
AVDocSetActiveTool
AVDocSetViewDef (modified)
AVDocSetViewDefEx
AVMenuDoPopUp
AVMenuGetTitleAsASText
AVMenuNewWithASText
AVMenuItemClone
AVMenuItemGetTitleAsASText
AVMenuItemIsVisible
AVMenuItemNewWithASText
AVMenuItemSetComputeVisibleProc
AVMenuItemSetTitleWithASText
AVPageViewDevicePointToPage (modified)
AVPageViewDeviceRectToPage (modified)
AVPageViewDeviceRectToPageRZ (modified)
AVPageViewDoPopupMenu (modified)
AVPageViewDragOutNewRect (modified)
AVPageViewDragOutNewRectSnapped (modified)
AVPageViewDragRect (modified)
AVPageViewDragRectSnapped (modified)
AVPageViewDragRectSnappedEx
AVPageViewDrawAnnotSequence (modified)
AVPageViewDrawCosObj (modified)
AVPageViewDrawCosObjEx (modified)
AVPageViewDrawNowWithTransition
AVPageViewDrawPolygon
AVPageViewDrawPolygonOutline
AVPageViewDrawRect (modified)
AVPageViewDrawRectOutline (modified)
AVPageViewDrawRectOutlineWithHandles (modified)
AVPageViewGetAnnotRect (modified)
AVPageViewGetAperture (modified)
AVPageViewGetGrayRect (modified)
AVPageViewGetMousePosition (modified)
AVPageViewGetMousePositionSnapped (modified)
AVPageViewGetNumVisibleInks
AVPageViewGetPageToDevScaling
AVPageViewGetPixelInformationAtPoint
AVPageViewGetVisibleInks
AVPageViewGhostRectOutline (modified)
AVPageViewInsetRect (modified)
AVPageViewInvalidateRect (modified)
AVPageViewInvertQuad (modified)
AVPageViewInvertRect (modified)
AVPageViewIsAnnotAtPoint (modified)
AVPageViewIsAnnotOfTypeAtPoint (modified)
AVPageViewIsBeadAtPoint (modified)
AVPageViewPointInText (modified)
AVPageViewPointToDevice (modified)
AVPageViewRectToDevice (modified)
AVPageViewSetAnnotLocation (modified)
AVPageViewSetInkPreview
AVPageViewSetVisibleInks
AVPageViewScrollTo (modified)
AVPageViewScrollToRect (modified)
AVPageViewSnapPoint (modified)
AVPageViewSnapPointEx
AVPageViewSnapRect (modified)
AVPageViewTrackText (modified)
AVRectHandleHitTest (modified)
AVSysGetIconFromFilename
AVSysGetIconFromMimeType
AVSysGetIconFromTypeAndCreator
AVSysGetUsePenForInput
AVToolButtonGetLabelText
AVToolButtonIsVisible
AVToolButtonSetComputeVisibleProc
AVToolButtonSetLabelText
AVToolButtonSetNotifyTooltipProc
AVUndoGetAVDoc
AVUndoGetData
AVUndoGetType
AVUndoNew
AVUndoSetData
AVUtilGetBaseNameAndExtensionEx
AVWindowDoModal
AVWindowEndModal
AVWindowGetBorderWidths
AVWindowGetDesktopBounds
AVWindowGetFrame (modified)
AVWindowGetInterior (modified)
AVWindowGetMinMaxSize (modified)
AVWindowGetTitle (modified)
AVWindowInvalidateRect (modified)
AVWindowNew (modified)
AVWindowNewFromPlatformThing (modified)
AVWindowSetFrame (modified)
AVWindowSetMinMaxSize (modified)
AVWindowSetTitle (modified)
Available if PI_COS_VERSION (in PIRequir.h) is set to 0x00060000 or higher.
CosDocHasFullCompression
CosDocHasPartialCompression
CosDocObjIsWithinRange
CosDocSaveToFile
CosDocSaveWithParams
CosNewObjCollection
CosObjAddToCollection
CosObjCollectionEnum
CosObjCollectionEqual
CosObjCollectionIsNull
CosObjCollectionSize
CosObjGetCollection
CosObjGetCompressibility
CosObjIsCompressed
CosObjRefreshAfterLinearizedSave
CosObjRemoveFromCollection
CosObjSetCompressibility
CosSetMaxDocStorages
Available only if PI_PDMODEL_VERSION (in PIRequir.h) is set to 0x00060000 or
higher.
PDActionCanCopy
PDActionCanPaste
PDActionCopy
PDActionDestroyClipboardData
PDActionPaste
PDAnnotCanCopy
PDAnnotCanPaste
PDAnnotCopy
PDAnnotDestroyClipboardData
PDAnnotGetOCMD
PDAnnotIsCurrentlyVisible
PDAnnotPaste
PDAnnotRemoveOCMD
PDAnnotSetOCMD
PDCharProcEnumWithParams
PDCryptAuthorizeFilterAccess
PDDocCreateWordFinderEx
PDDocEnumOCConfigs
PDDocEnumOCGs
PDDocFindPageNumForLabelEx
PDDocFlattenOC
PDDocGetLabelForPageNumEx
PDDocGetNumOCGs
PDDocGetOCConfig
PDDocGetOCContext
PDDocGetOCGs
PDDocGetTrapped
PDDocGetXAPMetadataProperty
PDDocHasOC
PDDocReadAheadEmbeddedFile
PDDocReplaceOCG
PDDocRequestEntireFile
PDDocRequestPages
PDDocSetNewCryptFilterData
PDDocSetNewCryptFilterMethod
PDDocSetNewCryptHandlerEx
PDDocSetNewDefaultFilters
PDDocSetTrapped
PDDocSetXAPMetadataProperty
PDDrawCosObjWithParams
PDFontGetASTextName
PDFormEnumPaintProcWithParams
PDOCConfigCreate
PDOCConfigDestroy
PDOCConfigGetAllRadioButtonGroups
PDOCConfigGetCosObj
PDOCConfigGetCreator
PDOCConfigGetInitState
PDOCConfigGetIntent
PDOCConfigGetName
PDOCConfigGetOCGOrder
PDOCConfigGetPDDoc
PDOCConfigGetRadioButtonGroupForOCG
PDOCConfigMakeRadioButtonGroup
PDOCConfigSetCreator
PDOCConfigSetInitState
PDOCConfigSetIntent
PDOCConfigSetName
PDOCConfigSetOCGOrder
PDOCContextApplyAutoStateChanges
PDOCContextClearAllUserOverrides
PDOCContextContentIsVisible
PDOCContextFindAutoStateChanges
PDOCContextFree
PDOCContextGetIntent
PDOCContextGetNonOCDrawing
PDOCContextGetOCDrawEnumType
PDOCContextGetOCGStates
PDOCContextGetPDDoc
PDOCContextInit
PDOCContextMakeCopy
PDOCContextMakeCopyWithAutoStateChanges
PDOCContextNew
PDOCContextNewWithInitialState
PDOCContextNewWithOCDisabled
PDOCContextPopOCMD
PDOCContextPushOCMD
PDOCContextResetOCMDStack
PDOCContextSetIntent
PDOCContextSetNonOCDrawing
PDOCContextSetOCGStates
PDOCContextXObjectIsVisible
PDOCGCreate
PDOCGCreateFromCosObj
PDOCGDestroy
PDOCGGetCosObj
PDOCGGetCurrentState
PDOCGGetFromCosObj
PDOCGGetInitialState
PDOCGGetIntent
PDOCGGetName
PDOCGGetPDDoc
PDOCGGetUsageEntry
PDOCGGetUserOverride
PDOCGHasUsageInfo
PDOCGRemoveInitialState
PDOCGSetCurrentState
PDOCGSetInitialState
PDOCGSetIntent
PDOCGSetName
PDOCGSetUsageDictEntry
PDOCGUsedInOCConfig
PDOCGUsedInOCContext
PDOCMDCreate
PDOCMDFindOrCreate
PDOCMDGetCosObj
PDOCMDGetFromCosObj
PDOCMDGetOCGs
PDOCMDGetPDDoc
PDOCMDGetVisPolicy
PDOCMDIsCurrentlyVisible
PDOCMDsAreCurrentlyVisible
PDOCMDsMakeContentVisible
PDPageDrawContentsPlacedWithParams
PDPageDrawContentsWithParams
PDPageEnumContents
PDPageEnumInks
PDPageEnumOCGs
PDPageFlattenOC
PDPageGetOCGs
PDPageGetVisibleBBox
PDPageMakeSeparations
PDPageSetPDEContentCanRaise
PDRegisterActionHandler
PDWordCreateTextSelect
PDWordGetASText
PDWordGetAttrEx
PDWordGetByteIdxFromHiliteChar
PDWordGetCharEncFlags
PDWordGetCharOffsetEx
PDWordGetCharQuad
PDWordGetNumHiliteChar
PDWordIsCurrentlyVisible
PDWordMakeVisible
PDWordFinderAcquireVisibleWordList
PDWordFinderEnumVisibleWords
PDWordFinderEnumWordsStr
Available only if PI_PDFEDIT_READ_VERSION (in PIRequir.h) is set to
0x00060000 or higher.
PDEElementGetAllVisibilities
PDEElementGetOCMD
PDEElementIsCurrentlyVisible
PDEFontGetSysEncoding
PDEFontGetSysFont
PDEFontIsEmbedded
PDETextGetAdvance
PDETextGetItem
PDETextItemGetFont
PDETextItemGetGState
PDETextItemGetTextLen
PDETextItemGetTextMatrix
PDETextItemGetTextState
Available only if PI_PDFEDIT_WRITE_VERSION (in PIRequir.h) is set to
0x00060000 or higher.
PDEContentFlattenOC
PDEElementMakeVisible
PDEElementRemoveOCMD
PDEElementSetOCMD
PDEFontSetSysEncoding
PDEFontSetSysFont
PDEFormCreateClone
PDEFormSetContent
PDETextAddItem
PDETextRemoveItems
PDETextItemCopyText
PDETextItemCreate
PDETextItemRemoveChars
PDETextItemReplaceChars
PDETextItemReplaceText
PDETextItemSetFont
PDETextItemSetGState
PDETextItemSetTextMatrix
PDETextItemSetTextState
PDSysEncodingCreateFromCodePage
Available only if PI_PDS_READ_VERSION (in PIRequir.h) is set to 0x00060000 or
higher.
PDSAttrObjGetCosObj
PDSElementGetCosObj
PDSElementGetKidWithMCInfo
PDSMCGetInfo
PDSMCGetPDEContainer
PDSMCIDGetParent
PDSTreeRootReplaceStreamRef
Available only if PI_PDS_WRITE_VERSION (in PIRequir.h) is set to 0x00060000
or higher.
PDSElementInsertStmMCAsKid
ASFilePushData
ASFileRead
ASFileReopen
ASFileSetPos
ASFileWrite
ASFileSysCreateFolder
ASFileSysFlushVolume
ASFileSysGetItemProps
ASFileSysGetNameFromPath
ASFileSysOpenFile
ASFileSysRemoveFile
ASFileSysRemoveFolder
ASStmRead
ASStmWrite
ASTextGetUnicode
ASTextGetUnicodeCopy
ASTextFromSizedEncoded
ASTextFromSizedPDText
ASTextFromSizedScriptText
ASTextFromSizedUnicode
ASTextFromUnicode
ASTextSetSizedEncoded
ASTextSetSizedPDText
ASTextSetSizedScriptText
ASTextSetSizedUnicode
ASTextSetUnicode
ASRaise
ASRegisterErrorString
AVAcquireSpecialFolderPathName
AVAppChooseFolderDialog
AVAppGetNumDocs
AVAppGetVersion
AVAppOpenDialog
AVAppRegisterForPageViewKeyDown
AVAppRegisterTool
AVAppSaveDialog
AVExtensionAcquireInfo
AVExtensionGetNumPlugIns
AVDocGetClientName
AVMenubarGetNumMenus
AVMenuGetNumMenuItems
AVMenuGetTitle
AVMenuItemGetTitle
AVMenuItemNew
AVPageViewAppearanceGetAVMatrix
AVPageViewDeviceToInfo
AVPageViewDrawPolygon
AVPageViewDrawPolygonOutline
AVPageViewFilterKeyDownForFocusAnnot
AVPageViewGetFirstVisiblePageNum
AVPageViewGetLastVisiblePageNum
AVPageViewGetNextView
AVPageViewGetPageNum
AVPageViewGetThreadIndex
AVPageViewGetSelectedAnnotPageNum
AVPageViewGetVisibleAnnotPage
AVPageViewGoTo
AVPageViewInfoToDevice
AVPageViewInvertRect
AVPageViewInvertRectOutline
AVPageViewPageNumIsVisible
AVPageViewSetPageNum
AVToolBarGetNumButtons
AVUtilGetBaseNameAndExtensionByPathName
AVUtilGetBaseNameAndExtensionByString
CosArrayGet
CosArrayInsert
CosArrayLength
CosArrayPut
CosArrayRemoveNth
CosCopyStringValue
CosDecryptData
CosDocCreate
CosDocGetID
CosDocSaveToFile
CosEncryptData
CosNewArray
CosNewDict
CosNewString
CosStreamLength
CosStreamPos
CosStringValue
CosStringValueSafe
AVActionDoPropertiesExProc
AVActionGetDetailsProc
AVActionPerformExProc
AVAnnotHandlerAdjustCursorExProc
AVAnnotHandlerAppearanceDrawingProc
AVAnnotHandlerDoClickExProc
AVAnnotHandlerDoClickProc
AVAnnotHandlerDoKeyDownExProc
AVAnnotHandlerDoKeyDownProc
AVAnnotHandlerDoPropertiesExProc
AVAnnotHandlerGetAppearanceProc
AVAnnotHandlerGetFlagsProc
AVAnnotHandlerGetLayerExProc
AVAnnotHandlerPtInAnnotViewBBoxProc
AVComputeVisibleProc
AVContextMenuAdditionProc
AVConversionConvertStreamFromStructNodeProc
AVConversionConvertStreamToPDFProc
AVDocSelectionAcquireQuadsProc
AVDocSelectionHighlightSelectionExProc
AVDocSelectionKeyDownProc
AVDocSelectionShowMenuProc
AVIconHandlerGetFlagsProc
AVIconHandlerMeasureProc
AVIconHandlerOpenStmProc
AVIconHandlerReleaseProc
AVNotifyTooltipProc
AVPageViewClickProc
AVPageViewCursorProc
AVPageViewKeyDownProc
AVToolDestroyProc
AVToolGetLabelProc
AVToolGetLabelIconProc
AVUndoBeginEndProc
AVUndoGetTitleProc
AVUndoExecuteProc
AVUndoReleaseProc
AVUndoVerifyProc
AVWindowAdjustCursorProc
AVWindowMouseDownProc
DoClickProcType
DoKeyDownProcType
HFTServerProvideHFTProc
PDActionHandlerCanCopyProc
PDActionHandlerCanPasteProc
PDActionHandlerCopyProc
PDActionHandlerDestroyProc
PDActionHandlerDestroyDataProc
PDActionHandlerGetTypeProc
PDActionHandlerPasteProc
PDAnnotHandlerCanCopyProc
PDAnnotHandlerCanPasteProc
PDAnnotHandlerCopyProc
PDAnnotHandlerDestroyProc
PDAnnotHandlerDestroyDataProc
PDAnnotHandlerGetHeelPointProc
PDAnnotHandlerGetPrintAppearanceProc
PDAnnotHandlerPasteProc
PDCryptFilterAuthorizeProc
PDCryptFilterGetDataProc
PDCryptFilterStreamProc
PDCryptFilterStringProc
PDCryptGetDocPermsProc
PDDocPreWriteProc
PDDocRequestEntireFileProc
PDDocRequestPagesProc
PDOCConfigEnumProc
PDOCGEnumProc
AVSelectionPageRangeEnumProc
AVSelectionPageRangeEnumProc
PDAnnotHandlerGetAnnotInfoFlagsProc
AVDocPrintSepsParams
AVDocPrintTileData
AVDocServerType
AVDocViewDef
AVFlagBits16
AVIconBundle6
AVIconColorFormat
AVIconData
AVIconDataFormat
AVIconHandler
AVInkValue
AVlCoord
AVLine
AVOpenSaveDialogParams
AVPageSize
AVResourcePolicy
AVRasterizeFlags
AVRect
AVScreenCoord
AVScreenRect
AVSpecialFolder
AVStructNode
AVSysIconType
AVTileMark
AVTool
AVUndoHandler
AVUndoHandlerData
AVUseValue
AVWindowCoord
AVWindowRect
Code Page Values
CosByte
CosByteMax
CosDocOpenParams
CosDocSaveFlags
Cstring_Ptr
FSRef_Ptr
FSRefWithCFStringRefRec_Ptr
FSSpec_Ptr
HFTData
PDActionClipboardData
PDActionHandler
PDActionHandlerData
PDAnnotClipboardData
PDAnnotHandler
PDAnnotPrintOp
PDCryptHandler
PDCryptFilterHandler
PDDocOCChangeType
PDDocRequestReason
PDDocSaveParams
PDDrawParams
PDGraphicEnumParams
PDHostSepsPlate
PDHostSepsSpec
PDOCConfigBaseState
PDOCContextChangeType
PDOCContextChangeType
PDOCDrawEnumType
PDOCMDVisPolicy
PDPageMarkFlags
PDPrintWhat
PDSaveFlags2
PDSMCInfo
PDWordFinderConfig
POSIXPath_Ptr
Quad
Word Attributes
WordFinder Character Encoding Flags
WordFinder Sort Order Flags
AVDestInfo
AVFilterIndex
AVFlagBits32
AVMenuIndex
AVPageIndex
AVPixelOffset
AVTArraySize
AVTBufferSize
AVTCount
AVTFlagBits
AVTFlagBits16
AVTSmallArraySize
AVTVersionNumPart
CosDocOpenParams
CosDocOpenParams
CosDocSaveParams
PDAnnotInfo
PDCount
PDDocInsertPagesParams
PDFontAngle
PDFontMetrics
PDFontOffset
PDGraphicState
PDiFontMetric
PDImageAttrs
PDImageScalar
PDPageNumber
PDSmallFlagBits
New Notifications
The following notifications were added or changed in version 6.0.
AVAppDidInitExtensions
AVAppSystemLogonSessionSwitched
AVAppToolDidChange
AVAppWillTerminateExtensions
AVDocActivePageViewDidChange
AVDocDidClearSelection
AVPageViewDocDidChange
AVPageViewWasCreated
AVPageViewWillDestroy
PDBookmarkDidChangeOpenState
PDDocOCDidChange
PDDocOCWillChange
PDDocPermsReady
PDDocWillPrintDocInMode
PDOCContextDidChange
PDOCContextWillChange
PDPageDidRemoveAnnotEx
Ver s i o n 7
New Objects
PDEImageFlate (Introduced in PDF Library SDK 6.1)
PDEImageJPX (Introduced in PDF Library SDK 6.1)
New Methods
AFDrawText (Forms extended API)
ASGetRamFileSys (Introduced in PDF Library SDK 6.1)
ASGetTempFileSys (Introduced in PDF Library SDK 6.1)
ASSetTempFileSys (Introduced in PDF Library SDK 6.1)
ASRamFileSysSetLimitKB (Introduced in PDF Library SDK 6.1)
ASCabGetInt64
ASCabGetUns64
ASCabPutInt64
ASCabPutUns64
ASFileGetEOF64
ASFileGetPos64
ASFileSetEOF64
ASFileSetPos64
ASFileSysGetFilePosLimit
ASFileSysGetNameFromPathForDisplay
ASFileSysOpenFile64
ASFixedToFloat (was previously a macro)
AVAppRegisterLateInitProc
AVAppShouldKeyDeleteObject
AVDocDoAnnotProperties
AVDocGetBookmarks
AVDocGetLastActiveTool
AVDocGetNthWindow
AVDocGetNumWindows
AVPageViewGetAVWindow
AVPageViewGetWireframeDrawing
AVPageViewSetWireframeDrawing
CosArrayIsWeakReference
CosArraySetWeakReference
CosCopyNameStringValue
CosDictGetKey
CosDictGetKeyString
CosDictIsWeakReference
CosDictKnownKey
CosDictKnownKeyString
CosDictPutKey
CosDictPutKeyString
CosDictRemoveKey
CosDictRemoveKeyString
CosDictSetWeakReference
CosDocEnumEOFs64
CosDocObjIsWithinRange64
CosFloatValue
CosInteger64Value
CosNewFloat
CosNewInteger64
CosNewNameFromString
CosNewStream64
CosNumberIsWithinASFixedRange
CosNumberIsWithinASInt32Range
CosObjAcquire
CosObjRelease
CosStreamLength64
CosStreamPos64
PDDocEnumPDSElementsWithUserProperties
PDDocGetCryptHandler
PDDocGetLayoutMode
PDDocGetMergedXAPKeywords
PDDocHasUserProperties
PDDocMergeXAPKeywords
PDDocPermRequestNoUB
PDDocSetLayoutMode
PDEContentSetContainingStream
PDEContentSetPage
PDEContentSetStreamOwner
PDEFontAddGlyphs
PDEImageAcquireImageFlate (Introduced in PDF Library SDK 6.1)
PDEImageAcquireImageJPX (Introduced in PDF Library SDK 6.1)
PDEImageFlateAcquireColorSpace (Introduced in PDF Library SDK 6.1)
PDEImageFlateGetAttrs (Introduced in PDF Library SDK 6.1)
PDEImageFlateGetCosObj (Introduced in PDF Library SDK 6.1)
PDEImageFlateGetDataStm (Introduced in PDF Library SDK 6.1)
PDEFontAddGlyphs
PDEImageGetType
PDEImageJPXAcquireColorSpace (Introduced in PDF Library SDK 6.1)
PDEImageJPXAcquireJPXColorSpace (Introduced in PDF Library SDK 6.1)
PDEImageJPXAcquirePalette (Introduced in PDF Library SDK 6.1)
PDEImageJPXGetAttrs (Introduced in PDF Library SDK 6.1)
PDEImageJPXGetCosObj (Introduced in PDF Library SDK 6.1)
PDEImageJPXGetDataStm (Introduced in PDF Library SDK 6.1)
PDEImageJPXGetNumColorSpaces (Introduced in PDF Library SDK 6.1)
PDEImageJPXHasPalette (Introduced in PDF Library SDK 6.1)
PDEReleaseSpan
PDETextAddGlyphs
PDOCConfigGetLockedArray
PDOCConfigSetLockedArray
PDOCGGetLocked
PDOCGSetLocked
PDOCMDFindOrCreateEx
PDOCMDGetVisibilityExpression
PDPageAcquirePage
PDPageEnumInksEx
PDPageGetUserUnitSize
PDPageSetUserUnitSize
PDSElementEnumKidsWithUserProperties
PDSElementEnumUserPropertiesAsCosObj
PDSElementEnumUserPropertiesAsASText
PDSElementFindAncestorWithUserProperties
PDSElementHasUserProperties
PDSElementInsertMCRefAsKid
PDSMCRefCreate
PDSMCRefDestroy
PDSysFontVerifyEncoding
NewCallbacks
AVAnnotHandlerGetAccessibilityStringProc
AVComputeTooltipProc
CosDocEnumEOFsProc64
CosObjOffsetProc64
PDSElementEnumUserPropertiesAsASTextProc
PDSElementEnumUserPropertiesAsCosObjProc
EnumElementsWithUserPropertiesProc
PDDoExtGStateProc (PDF Library only)
New Data
ASInt64
ASUns64
ASFilePos64
AVAnnotHandlerRec
ImageInk (PDF Library only)
ImageInks (PDF Library only)
JPXColorSpace
JPXPalette
PDDocSaveParams
New Notifications
AVDocActivePageViewDidChange
AVDocWIndowWasAdded
AVDocWindowWasRemoved
AVDocAVWindowDidChange
A AVUndo 298
AVWindow 299
Acrobat Support (AS) layer 233
Acrobat viewers, controlling 39
ASAtom 233
action handlers 430
ASCab 233
adding new object types 35
ASCallback 237
Adobe Dialog Manager (ADM) 293
ASDate 238
annotation handlers 430
ASExtension 239
annotation types, new 42
ASFile 239
applications, examples 39
ASFileSys 241
AS layer 24
ASPlatformPath 245
AV layer 23
ASStm 247
AVCommand 431
ASText 248
ASTimespan 252
configuration 253 B
errors 253
batch processing 432
fixed-point math 254
HFT methods 255
memory allocation 255 C
platform-specific utilities 257
cabinets 233
thread-safe multithreading 256
classes, PDFEdit 359
Acrobat Viewer (AV) layer 261
command handlers 431
AVActionHandler 262
complex types 29
AVAlert 263
controlling the Acrobat viewers 39
AVAnnotHandler 263
conversion handlers 434
AVApp 264
converting file formats to and from PDF 273
AVCommand 270
coordinate systems 30
AVConversion 273
device space 31, 32
AVCrypt 274
machine port space 33
AVDoc 275
user space 30, 32
AVGrafSelect 280
core API
AVMenu 280
objects 24
AVMenubar 282
organization 22
AVMenuItem 283
types 27
AVPageView 285
core API organization
AVSweetPea 293
AS layer 24
AVSys 294
AV layer 23
AVTool 295
Cos layer 24
AVToolBar 295
PD layer 23
AVToolButton 296
PDFEdit 23
I
E IAC interfaces 22
encoded text, specifying 248 indexed searching 40
encryption 441 info dictionary access 42
encryption/decryption integrating with an Acrobat viewer 21
Cos layer 428 interapplication communication (IAC) 21
error handling 451, 461 invoking AVCommands programmatically 270