Adobe acrobat 7.0.5 sdk User Manual

Page of 122
Using Online Collaboration and Annotations
Using Annotations in Document Workflows
7
70
Annotations and Plug-ins
The 
PDAnnot
 class is the abstract superclass for all annotations (see the PDF Reference). 
Acrobat and Adobe Reader have two built-in annotation classes: 
PDTextAnnot
 and 
PDLinkAnnot
. Plug-ins can add movie, Widget (form field), and other annotation types. 
You can define new annotation subtypes by creating new annotation handlers (see 
). There are no objects of type 
PDAnnot
, but 
your plug-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. These are:
CastToPDAnnot 
CastToPDTextAnnot 
CastToPDLinkAnnot
The 
PDAnnot
 methods include: 
See the Acrobat and PDF Library API Reference for more information.
Annotations and the IAC API
You can use the 
AcroExch.PDAnnot
 object in the IAC API to set, modify, and access 
annotation information from external applications. 
Creating New Annotation Types
PDF supports many standard annotation types. Your plug-in can create new annotation 
types, including any data they need. For example, a custom annotation type might allow a 
user to draw (not just type) in an annotation, provide support for multiple fonts or text 
styles, or support annotations that can only be viewed by specific users. 
Support for new annotation types 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
For more information, see the Acrobat and PDF Library API Overview.
PDAnnotGetRect
Gets an annotation’s size and location.
PDAnnotGetSubtype
Gets an annotation’s subtype.
PDAnnotIsValid
Tests whether an annotation is valid.