
Adobe Acrobat SDK
Working with Acrobat Extended APIs
Developing Plug-ins and Applications
Forms extended API 235
The AcroForms Widget Annot handler 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
rollbacks prior to signatures.
The largest 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 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].
Forms extended API
The Acrobat Forms plug-in exports its own Host Function Table (HFT), whose methods can be used by
other plug-ins. To use the Acrobat Forms plug-in’s HFT, a plug-in must:
●
Include the FormsHFT.h header file (which includes AF_ExpT.h and AF_Sel.h).
●
Import the HFT using the
ASExtensionMgrGetHFT
method. A convenient way to perform this task is
to use the
Init_AcroFormHFT
macro defined in FORMSHFT.H.
#define Init_AcroFormHFT
ASExtensionMgrGetHFT(ASAtomFromString(AcroFormHFT_NAME),
AcroFormHFT_LATEST_VERSION)
●
Assign the HFT returned by this call to a plug-in-defined global variable named
gAcroFormHFT
.
Data may be imported and exported into Acrobat Forms in forms data format (FDF). FDF is used to submit
form data to a server, as well as to receive the response and incorporate it into a form. FDF is based on PDF
and uses the same syntax and set of basic object types as PDF. It also has the same file structure, except
that the cross-reference table is optional. See the
PDF Reference
for more information about the structure
of a PDF document.
Note:
For information about the APIs included in the Forms extended API, see the
Acrobat and PDF Library
API Reference
.