SPDF Routines
SPDF Routines
The SPDF library supports a number of the routines defined in the Core API Reference to Adobes Acrobat Software Development Kit. This document provides a complete list of the supported routines.
Notes: (1) A level of implementation support is given for each routine listed below. The level of support is color-coded, with the following legend:
Full implementation Partial implementation, may throw an exception under certain conditions; any limitations noted Defined in the interface and available for linkage, but not yet implemented. Will throw an exception if called.
(2) New routines are added with each SPDF successive release. Also, routines with partial or no implementation are moved to full implementation. Licensees are encouraged to review this document and the SPDF read me document for details related to ongoing SPDF development.
1 of 27
AS Layer
1.0 AS Layer
1.1 Fixed Math Routines
FixedRoundToInt16 FixedRoundToInt32 FixedToFloat FixedTruncToInt32 FloatToFixed Int16ToFixed Int32ToFixed ASCStringToFixed ASFixedDiv ASFixedMul ASFixedMatrixConcat ASFixedMatrixTransform ASFixedMatrixTransformRect ASFixedToCString
2 of 27
AS Layer
1.7 SPDF-specific addition to ASFile Routines The following routines is an SPDF-specific addition to the Adobe Core API Reference. This additions facilitates searching an ASFile for a given pattern. Note: because this API is an extensions, and does not exist in Adobes plug-in SDK, application code using this routine will not be portable back to the Acrobat plug-in SDK unless you provide your own implementation of this routine for the plug-in environment.
ASFileFindPattern
3 of 27
AS Layer
4 of 27
AS Layer
5 of 27
Cos Layer
6 of 27
Cos Layer
2.4 SPDF-specific additions to CosDict(ionary) Routines The following routines are SPDF-specific additions to the Adobe Core API Reference. These additions facilitate type-safe use of CosObjects held within dictionaries. Note: because these APIs are extensions, and do not exist in Adobes plug-in SDK, application code using these routines will not be portable back to the Acrobat plug-in SDK unless you provide your own implementations of these routines for the plug-in environment. However, for stand-alone executables, the runtime validation provided by these routines can help to take a lot of the guesswork out of using CosDictionary values.
CosDictGetArray CosDictGetBoolean CosDictGetDict CosDictGetName CosDictGetNumber CosDictGetStream CosDictGetString CosDictGetBooleanValue CosDictGetNameValue CosDictGetFixedValue CosDictGetIntegerValue CosDictGetIntegerValueNullAllowed CosDictGetStringValue CosDictGetRectFromArray CosDictPutNewArray CosDictPutNewArrayFromRect CosDictPutNewBoolean CosDictPutNewDict CosDictPutNewName CosDictPutNewFixed CosDictPutNewInteger CosDictPutNewStream CosDictPutNewString
7 of 27
Cos Layer
2.6 SPDF-specific additions to CosArray Routines The following routines are SPDF-specific additions to the Adobe Core API Reference. These additions facilitate type-safe use of CosObjects held within arrays. Note: because these APIs are extensions, and do not exist in Adobes plug-in SDK, application code using these routines will not be portable back to the Acrobat plug-in SDK unless you provide your own implementations of these routines for the plug-in environment. However, for stand-alone executables, the runtime validation provided by these routines can help to take a lot of the guesswork out of using CosArray values.
CosArrayGetArray CosArrayGetBoolean CosArrayGetDict CosArrayGetName CosArrayGetNumber CosArrayGetStream CosArrayGetString CosArrayGetBooleanValue CosArrayGetNameValue CosArrayGetFixedValue CosArrayGetIntegerValue CosArrayGetIntegerValueNullAllowed CosArrayGetStringValue
8 of 27
Cos Layer
9 of 27
Cos Layer
CosStreamOpenStm
implemented for cosOpenRaw; cosOpenUnfiltered decrypts if RC4 is provided via SPDF_RC4Linkage.cpp; cosOpenFiltered is available for ASCIIHexEncode, ASCII85Encode, RunLengthEncode and FlateEncodea, can be made available for LZWEncode via SPDF_LZWLinkage.cpp, but not yet available for CCITTFaxEncode or DCTEncode.
CosStreamPos
a. Thank you to Jean-loup Gailly and Mark Adler for permission to include and redistribute zlib compression/decompression.
10 of 27
PD Layer
3.0 PD Layer
3.1 PD General Routines
PDRegisterCryptHandler PDRegisterCryptHandlerEx
11 of 27
PD Layer
PDAnnotSetRect PDAnnotSetTitle
12 of 27
PD Layer
13 of 27
PD Layer
PDBookmarkGetNext PDBookmarkGetParent PDBookmarkGetPrev PDBookmarkGetTitle PDBookmarkHasChildren PDBookmarkIsOpen PDBookmarkIsValid PDBookmarkSetAction PDBookmarkSetOpen PDBookmarkSetTitle PDBookmarkUnlink
14 of 27
PD Layer
15 of 27
PD Layer
16 of 27
PD Layer
17 of 27
PD Layer
PDPageGetNumAnnots PDPageGetNumber PDPageGetRotate PDPageNotifyContentsDidChange PDPageNotifyContentsDidChangeEx PDPageNumFromCosObj PDPageRelease PDPageRemoveAnnot PDPageRemoveCosContents PDPageRemoveCosResource
18 of 27
PD Layer
19 of 27
PD Layer
20 of 27
PDFL Layer
21 of 27
FDF Layer
22 of 27
AV Layer
6.0 AV Layer
The AV layer provides user interface support for Acrobat plug-ins. These routines are not applicable for the stand-alone applications for which SPDF was designed. As a jumpstart for developers, SPDF provides many of these routines. It is desirable to be able to build both the plug-in and stand-alone versions of an application out of the same body of source code. Ideally, the application code would be separated into code utilizing the PD and lower layers, and the plug-in code that relies on the higher-level AV layer. However, since most Acrobat code begins as a plug-in and perhaps later evolves into an additional stand-alone version, this separation is not in place when the stand-alone version commences. To facilitate this migration, SPDF provides the interface and linkage for many of the commonly used AV routines. Plug-ins can be compiled and linked against SPDF and then more optimally structured over time, typically by adding command line arguments and then calling into lower-level code. Calling the SPDF implementation of AV layer routines will throw an exception, which facilitates the process of ultimately separating out the GUI and non-GUI layers of application logic.
23 of 27
AV Layer
6.2 AVDocRoutines
AVDocClearSelection AVDocClose AVDocGetAVWindow AVDocGetPageView AVDocGetPDDoc AVDocGetSelection AVDocGetSelectionType AVDocOpenFromFile AVDocOpenFromFileWithParams AVDocSetSelection AVDocShowSelection
24 of 27
AV Layer
AVMenuNew AVMenuRelease
25 of 27
AV Layer
26 of 27
AV Layer
AVPageViewReleaseMachinePort AVPageViewUseThisDestination
27 of 27