A data structure containing callbacks that implement an annotation manager. The callbacks implement the annotation manager functions (for example, view, delete, or export the annotations of a document as a list, sorted by type, author, or date).
To fully use a PDAnnotHandler, the AVAnnotHandler associated with this annotation must have its AVAnnotHandlerGetInfoProc() and AVAnnotHandlerDeleteInfoProc() callbacks defined.
typedef
struct
_t_PDAnnotHandler
*
PDAnnotHandler
;
typedef
void
*
PDAnnotHandlerClipboardData
;
true
if the copy operation is expected to succeed. It tests, for example, whether copying is allowed by document permissions. ASBool
PDAnnotHandlerCanCopyProc(
PDAnnotHandler
pdanh
,
PDPage
sourcePage
,
PDAnnot
pdan
);
pdanh | IN/OUT The annotation handler responsible for this annotation.
|
sourcePage | The page the annotation is on.
|
pdan | IN/OUT The annotation object.
|
true
if the paste operation is expected to succeed. It tests whether data from an annotation that has been copied to a clipboard can be pasted to a location on a page. Pasting can be disallowed by document permissions, or because the annotation cannot be accurately reproduced in the destination document. ASBool
PDAnnotHandlerCanPasteProc(
PDAnnotHandler
pdanh
,
PDPage
destPage
,
const
ASFixedPoint
*
center
,
PDAnnotHandlerClipboardData
data
);
pdanh | The annotation handler responsible for this annotation.
|
destPage | The page to which the annotation would be pasted.
|
center | The location for the center of the annotation on the destination page, or a
NULL pointer to center the annotation on the destination page's crop box. |
data | The copied annotation data to test.
|
PDAnnotHandlerClipboardData
PDAnnotHandlerCopyProc(
PDAnnotHandler
pdanh
,
PDPage
sourcePage
,
PDAnnot
pdan
);
pdanh | The annotation handler responsible for this annotation.
|
sourcePage | The page containing the annotation to be copied.
|
pdan | The annotation object.
|
void
PDAnnotHandlerDeleteAnnotInfoProc(
PDAnnotHandler
pdanh
,
PDAnnotInfo
info
);
pdanh | IN/OUT The annotation handler responsible for this annotation.
|
information | IN/OUT Information associated with the annotation.
|
void
PDAnnotHandlerDestroyDataProc(
PDAnnotHandler
pdanh
,
PDAnnotHandlerClipboardData
data
);
pdanh | The annotation handler responsible for this annotation.
|
data | The copied annotation data to destroy.
|
userData
field. void
PDAnnotHandlerDestroyProc(
PDAnnotHandler
pdanh
);
pdanh | The annotation handler to destroy.
|
ASFlagBits
PDAnnotHandlerGetAnnotInfoFlagsProc(
PDAnnotHandler
pdanh
,
PDAnnot
pdan
);
pdanh | IN/OUT The annotation handler responsible for the annotation.
|
pdan | IN/OUT The annotation.
|
The operations allowed.
The value is an OR of the following flags:
Operation | Description
|
---|---|
It is okay to summarize annotations.
| |
It is okay to filter annotations.
| |
It is okay to manage annotations.
| |
Allow modifying this annotation type in a write-protected document.
| |
All operations are allowed.
|
PDAnnotInfo
PDAnnotHandlerGetAnnotInfoProc(
PDAnnotHandler
pdanh
,
PDAnnot
pdan
,
PDPage
pdpage
);
pdanh | IN/OUT The annotation handler responsible for this annotation.
|
pdan | IN/OUT The annotation for which information is obtained.
|
pdpage | IN/OUT The page associated with the annotation for which information is obtained. If the page associated with the annotation is not known, pass
NULL . |
void
PDAnnotHandlerGetHeelPointProc(
PDAnnotHandler
pdanh
,
PDAnnot
pdan
,
ASFixedPoint
*
point
);
pdanh | The annotation handler whose heel point is obtained.
|
pdan | The annotation object.
|
point | (Filled by the method) The heel point for the annotation.
|
CosObj
PDAnnotHandlerGetPrintAppearanceProc(
PDAnnotHandler
pdanh
,
PDAnnot
pdan
,
ASFixedRect
*
frAnnot
,
PDAnnotPrintOp
op
);
pdanh | The annotation handler whose print appearance is obtained.
|
pdan | The annotation object.
|
frAnnot | The rectangle in user space in which the annotation will be printed. The handler is free to modify it.
|
op | The print operation being performed. This is kPDAnnotPrintStandard for a standard print operation, or kPDAnnotPrintVariableData if the user selected Form Fields Only.
|
ASAtom
PDAnnotHandlerGetTypeProc(
PDAnnotHandler
pdanh
);
pdanh | IN/OUT The annotation handler whose type is returned.
|
PDAnnot
PDAnnotHandlerPasteProc(
PDAnnotHandler
pdanh
,
PDPage
destPage
,
const
ASFixedPoint
*
center
,
PDAnnotHandlerClipboardData
data
);
pdanh | The annotation handler responsible for this annotation.
|
destPage | The page to which the annotation is pasted.
|
center | The location for the center of the annotation on the destination page, or a
NULL pointer to center the annotation in the destination page's crop box. |
data | The copied annotation data to paste.
|
A data structure containing callbacks that implement an annotation manager. The callbacks implement the annotation manager functions (for example, view, delete, or export the annotations of a document as a list, sorted by type, author, or date).
To fully use a PDAnnotHandler, the AVAnnotHandler associated with this annotation must have its AVAnnotHandlerGetInfoProc() and AVAnnotHandlerDeleteInfoProc() callbacks defined.
| |
The size of the data structure. It must be set to
sizeof(PDAnnotHandlerRec) . | |
void * userData ; | A pointer to a block of user-supplied data.
|
|
PDAnnotHandler
PDGetAnnotHandlerByName(
ASAtom
name
);
name | IN/OUT The name of the requested annotation handler. The character string for the name can be converted to an ASAtom using ASAtomFromString().
|
name
. It returns the default annotation handler if no handler services the specified annotation type. Registers a handler for an annotation subtype, replacing any previous handler that had been registered for that subtype. The annotation handler is not registered if its PDAnnotHandlerGetTypeProc() returns NULL
.
To effectively use a PDAnnotHandler, the AVAnnotHandler associated with this annotation must have its AVAnnotHandlerGetInfoProc() and AVAnnotHandlerDeleteInfoProc() callbacks defined.
PDF Library applications can use this method to register their annotation handlers. Link and Watermark annotations have default handlers. For other annotation types, the applications should register their own handlers.
void
PDRegisterAnnotHandler(
PDAnnotHandler
handler
);
handler | IN/OUT A pointer to a structure containing the annotation handler's callbacks. This structure must not be freed after this call, but must be retained.
|