0% found this document useful (0 votes)
261 views27 pages

SPDF Routines

The document provides a complete list of routines supported by the SPDF library. It lists each routine, the layer it belongs to, and its level of implementation support. Some routines have partial implementation or are defined but not yet implemented. New routines are added with each release and partially implemented routines may be fully implemented. Licensees are encouraged to review this document for details on SPDF development.

Uploaded by

rithuik1598
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
261 views27 pages

SPDF Routines

The document provides a complete list of routines supported by the SPDF library. It lists each routine, the layer it belongs to, and its level of implementation support. Some routines have partial implementation or are defined but not yet implemented. New routines are added with each release and partially implemented routines may be fully implemented. Licensees are encouraged to review this document for details on SPDF development.

Uploaded by

rithuik1598
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

May 1, 2001

SPDF API Support (Build 1037)


Roger Dunn

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

1.2 Memory Management Routines


ASmalloc ASrealloc ASfree

1.3 Configuration Routines


ASGetConfiguration

Note: Product key returns SPDF and


Version key returns current build number

1.4 ASPathName Routines


ASPathFromPlatformPath

1.5 ASAtom Routines


ASAtomExistsForString ASAtomFromString ASAtomGetString

2 of 27

SPDF API Support (Build 1037)

AS Layer

1.6 ASFile Routines


ASFileAcquirePathName ASFileClose ASFileFlush ASFileFromMDFile ASFileGetEOF ASFileGetFileSys ASFileGetMDFile ASFileGetPos ASFileIsBusy ASFileRead ASFileSetEOF ASFileSetPos ASFileWrite

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

SPDF API Support (Build 1037)

3 of 27

AS Layer

1.8 ASFileSys Routines


ASFileGetFileSysByName ASFileRegisterFileSys ASFileUnregisterFileSys ASFileSysCopyPath ASFileSysCreatePathName ASFileSysDIPathFromPath ASFileSysOpenFile ASFileSysPathFromDIPath ASFileSysReleasePath ASGetDefaultFileSys

1.9 ASStm Routines


ASFileStmRdOpen ASMemStmRdOpen ASProcStmRdOpen ASStmRead ASStmClose

1.10 Error Handling Routines and Macros


ACROsetjmp ACROlongjmp ACROjmp_buf DURING HANDLER END_HANDLER E_RETURN E_RTRN_VOID ASRaise ASGetErrorString ASPushExceptionFrame ASPopExceptionFrame ASGetErrorCode ASGetExceptionErrorCode

4 of 27

SPDF API Support (Build 1037)

AS Layer

1.11 Callback Routines and Macros


ASCallbackCreateProto ASCallbackDestroy ASCallbackCreateNotification

SPDF API Support (Build 1037)

5 of 27

Cos Layer

2.0 Cos Layer


2.1 Basic CosObj Routines
CosNewNull CosObjCopy CosObjCopyShallow CosObjDestroy CosObjEnum CosObjEqual CosObjGetDoc CosObjGetGeneration CosObjGetID CosObjGetType CosObjIsIndirect CosDecryptData CosEncryptData

(this routine is exclusive to SPDF)

2.2 CosDoc Routines


CosDocClose CosDocCreate CosDocEnumIndirect CosDocGetInfoDict CosDocGetObjByID CosDocGetRoot CosDocOpenWithParams CosDocSaveToFile

2.3 CosDict(ionary) Routines


CosNewDict CosDictGet CosDictKnown CosDictPut CosDictRemove

6 of 27

SPDF API Support (Build 1037)

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

SPDF API Support (Build 1037)

7 of 27

Cos Layer

2.5 CosArray Routines


CosNewArray CosArrayLength CosArrayGet CosArrayInsert CosArrayPut CosArrayRemove CosArrayRemoveNth

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

SPDF API Support (Build 1037)

Cos Layer

2.7 CosString Routines


CosNewString CosStringGetHexFlag CosStringSetHexFlag CosStringValue

2.8 CosName Routines


CosNewName CosNameValue

2.9 CosBoolean Routines


CosBooleanValue CosNewBoolean

2.10 CosInteger Routines


CosIntegerValue CosNewInteger

2.11 CosFixed Routines


CosFixedValue CosNewFixed

2.12 CosStream Routines


CosNewStream CosStreamDict CosStreamLength

SPDF API Support (Build 1037)

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

SPDF API Support (Build 1037)

PD Layer

3.0 PD Layer
3.1 PD General Routines
PDRegisterCryptHandler PDRegisterCryptHandlerEx

3.2 PDAction Routines


PDActionDestroy PDActionEqual PDActionFromCosObj PDActionGetCosObj PDActionGetDest PDActionGetFileSpec PDActionGetSubtype PDActionIsValid PDActionNew PDActionNewFromDest PDActionNewFromFileSpec

3.3 PDAnnot Routines


PDAnnotEqual PDAnnotFromCosObj PDAnnotGetColor PDAnnotGetCosObj PDAnnotGetDate PDAnnotGetFlags PDAnnotGetRect PDAnnotGetSubtype PDAnnotGetTitle PDAnnotIsValid PDAnnotSetColor PDAnnotSetDate PDAnnotSetFlags

SPDF API Support (Build 1037)

11 of 27

PD Layer

PDAnnotSetRect PDAnnotSetTitle

12 of 27

SPDF API Support (Build 1037)

PD Layer

3.4 PDBead Routines


PDBeadAcquirePage PDBeadDestroy PDBeadEqual PDBeadFromCosObj PDBeadGetCosObj PDBeadGetIndex PDBeadGetNext PDBeadGetPrev PDBeadGetRect PDBeadGetThread PDBeadInsert PDBeadIsValid PDBeadNew PDBeadSetPage PDBeadSetRect

3.5 PDBookmark Routines


PDBookmarkAddChild PDBookmarkAddNewChild PDBookmarkAddNewSibling PDBookmarkAddNext PDBookmarkAddPrev PDBookmarkAddSubtree PDBookmarkDestroy PDBookmarkEqual PDBookmarkFromCosObj PDBookmarkGetAction PDBookmarkGetByTitle PDBookmarkGetCosObj PDBookmarkGetCount PDBookmarkGetFirstChild PDBookmarkGetIndent PDBookmarkGetLastChild

SPDF API Support (Build 1037)

13 of 27

PD Layer

PDBookmarkGetNext PDBookmarkGetParent PDBookmarkGetPrev PDBookmarkGetTitle PDBookmarkHasChildren PDBookmarkIsOpen PDBookmarkIsValid PDBookmarkSetAction PDBookmarkSetOpen PDBookmarkSetTitle PDBookmarkUnlink

14 of 27

SPDF API Support (Build 1037)

PD Layer

3.6 PDDoc Routines


PDDocAcquire PDDocAcquirePage PDDocAuthorize PDDocClearFlags PDDocClose PDDocCreate PDDocCreatePage PDDocCreateWordFinder PDDocDeletePages PDDocEnumFonts PDDocFindPageNumForLabel PDDocFromCosDoc PDDocGetBookmarkRoot PDDocGetCosDoc PDDocGetFile PDDocGetFlags PDDocGetID PDDocGetInfo PDDocGetLabelForPageNum PDDocGetNewCryptHandler PDDocGetNewSecurityData PDDocGetNewSecurityInfo PDDocGetNumPages PDDocGetNumThreads PDDocGetPageMode PDDocGetPermissions PDDocGetSecurityData PDDocGetThread PDDocGetThreadIndex PDDocGetVersion PDDocInsertPages PDDocNewSecurityData PDDocOpen

implemented in SPDF_CP fully implemented except for copying


threads (which are very rare)

SPDF API Support (Build 1037)

15 of 27

PD Layer

PDDocOpenEx PDDocRelease PDDocSave PDDocSetFlags PDDocSetInfo PDDocSetNewCryptHandler PDDocSetNewSecurityData PDDocSetPageMode

16 of 27

SPDF API Support (Build 1037)

PD Layer

3.7 PDFont Routines


PDFontFromCosObj PDFontGetCosObj PDFontGetWidths PDFontGetMetrics PDFontGetName PDFontGetSubtype

3.8 PDInlineImage Routines


PDInlineImageGetAttrs PDInlineImageGetData

3.9 PDLinkAnnot Routines


CastToPDLinkAnnot PDLinkAnnotGetAction PDLinkAnnotSetAction PDLinkAnnotSetBorder

3.10 PDPage Routines


PDPageAddAnnot PDPageAddCosContents PDPageAddCosResource PDPageAddNewAnnot PDPageCreateAnnot PDPageEnumResources PDPageGetAnnot PDPageGetAnnotIndex PDPageGetBBox PDPageGetCosObj PDPageGetCosResources PDPageGetCropBox PDPageGetDefaultMatrix PDPageGetDoc PDPageGetMediaBox

SPDF API Support (Build 1037)

17 of 27

PD Layer

PDPageGetNumAnnots PDPageGetNumber PDPageGetRotate PDPageNotifyContentsDidChange PDPageNotifyContentsDidChangeEx PDPageNumFromCosObj PDPageRelease PDPageRemoveAnnot PDPageRemoveCosContents PDPageRemoveCosResource

18 of 27

SPDF API Support (Build 1037)

PD Layer

3.11 PDTextSelect Routines


PDTextSelectCreatePageHilite

3.12 PDThread Routines


PDThreadDestroy PDThreadFromCosObj PDThreadGetCosObj PDThreadGetFirstBead PDThreadGetInfo PDThreadIsValid PDThreadNew PDThreadSetFirstBead PDThreadSetInfo

3.13 PDViewDest Routines


PDViewDestCreate PDViewDestFromCosObj PDViewDestGetAttr PDViewDestGetCosObj PDViewDestIsValid PDViewDestResolve

3.14 PDWord Routines


PDWordGetCharOffset PDWordGetNthQuad PDWordGetNumQuads PDWordGetString

implemented in SPDF_CP implemented in SPDF_CP implemented in SPDF_CP implemented in SPDF_CP

3.15 PDWordFinder Routines


PDWordFinderAcquireWordList PDWordFinderDestroy PDWordFinderReleaseWordList

implemented in SPDF_CP implemented in SPDF_CP implemented in SPDF_CP

SPDF API Support (Build 1037)

19 of 27

PD Layer

3.16 PDXObject Routines


PDXObjectGetCosObj PDXObjectGetSubtype

20 of 27

SPDF API Support (Build 1037)

PDFL Layer

4.0 PDFL Layer


4.1 PDFL Routines
PDFLGetVersion PDFLInit PDFLTerm

SPDF API Support (Build 1037)

21 of 27

FDF Layer

5.0 FDF Layer


FDF routines are not conventionally considered part of the Core Reference. However, to better support forms-processing applications, SPDF implements the essential routines for opening and traversing the FDF file structure. Using the SPDF implementation eliminates the need for the FDF toolkit library. 5.1 FDF Routines
FDFInitialize FDFFinalize FDFGetVersion FDFOpen FDFClose FDFEnumValues FDFNextFieldName FDFGetValue

22 of 27

SPDF API Support (Build 1037)

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.

SPDF API Support (Build 1037)

23 of 27

AV Layer

6.1 AVApp Routines


AVAppBeginModal AVAppEndModal AVAppEnumDocs AVAppGetActiveDoc AVAppGetDocProgressMonitor AVAppGetLanguage AVAppGetMenubar AVAppGetToolBar AVAppGetVersion AVAppRegisterActionHandler AVAppRegisterAnnotHandler AVAppRegisterNotification AVAppSetPreference AVAppUnregisterNotification

6.2 AVDocRoutines
AVDocClearSelection AVDocClose AVDocGetAVWindow AVDocGetPageView AVDocGetPDDoc AVDocGetSelection AVDocGetSelectionType AVDocOpenFromFile AVDocOpenFromFileWithParams AVDocSetSelection AVDocShowSelection

6.3 AVMenu Routines


AVMenuAcquireMenuItemByIndex AVMenuAddMenuItem AVMenuGetMenuItemIndex AVMenuGetNumMenuItems

24 of 27

SPDF API Support (Build 1037)

AV Layer

AVMenuNew AVMenuRelease

SPDF API Support (Build 1037)

25 of 27

AV Layer

6.4 AVMenubar Routines


AVMenubarAcquireMenuByName AVMenubarAcquireMenuItemByName AVMenubarAddMenu AVMenubarGetMenuIndex

6.5 AVMenuItem Routines


AVMenuItemAcquireSubmenu AVMenuItemExecute AVMenuItemGetName AVMenuItemGetParentMenu AVMenuItemGetTitle AVMenuItemIsEnabled AVMenuItemNew AVMenuItemRelease AVMenuItemRemove AVMenuItemSetComputeEnabledProc AVMenuItemSetExecuteProc AVMenuItemSetTitle

6.6 AVPageView Routines


AVPageViewAcquireMachinePort AVPageViewDevicePointToPage AVPageViewDrawNow AVPageViewGetAnnotRect AVPageViewGetAperture AVPageViewGetAVDoc AVPageViewGetPage AVPageViewGetPageNum AVPageViewGoTo AVPageViewInvalidateRect AVPageViewPageNumIsVisible AVPageViewRectToDevice

26 of 27

SPDF API Support (Build 1037)

AV Layer

AVPageViewReleaseMachinePort AVPageViewUseThisDestination

6.7 AVSys Routines


AVSysGetCursor AVSysGetStandardCursor AVSysSetCursor

6.8 AVToolBar Routines


AVToolBarAddButton AVToolBarGetButtonByName

6.9 AVToolButton Routines


AVToolButtonGetFlyout AVToolButtonNew AVToolButtonRemove AVToolButtonSetComputeEnabledProc AVToolButtonSetExecuteProc AVToolButtonSetExternal AVToolButtonSetHelpText

6.10 AVWindow Routines


AVWindowDestroy AVWindowGetPlatformThing AVWindowGetTitle AVWindowNew

SPDF API Support (Build 1037)

27 of 27

You might also like